This commit is contained in:
Mikolaj 2018-11-21 20:43:02 +01:00
parent e490e96259
commit 8c31e310c8
1 changed files with 30 additions and 0 deletions

30
newsaggtemplate.html Normal file
View File

@ -0,0 +1,30 @@
<head>
<script type="text/javascript" charset="utf8" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.16/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="//cdn.datatables.net/1.10.16/js/jquery.dataTables.js"></script>
</head>
<h1>{{.Title}}</h1>
<table id="fancytable" class="display">
<col width="35%">
<col width="65%">
<thead>
<tr>
<th>Title</th>
<th>Keywords</th>
</tr>
</thead>
<tbody>
{{ range $key, $value := .News }}
<tr>
<td><a href="{{ $value.Location }}" target='_blank'>{{ $key }}</td>
<td>{{ $value.Keyword }}</td>
</tr>
{{ end }}
</tbody>
</table>
<script>$(document).ready(function() {
$('#fancytable').DataTable();
} );</script>