only show last X signatures where permissionPub is given. Fixes #66

lektura
max.mehl 2017-09-05 16:54:23 +02:00
parent 17526e4fa3
commit 12465e6abf
1 changed files with 9 additions and 11 deletions

View File

@ -22,20 +22,18 @@
</tr>
</thead>
<tbody>
{{ range .Site.Data.signatures }}
{{ range sort . "timestamp" "desc" }}
{{ if (eq .include_vars.permissionPub "yes") | and (eq .include_vars.permissionPriv "yes") }}
<tr>
<td>{{ .include_vars.name }}</td>
<td>{{ .include_vars.country }}</td>
<td>{{ .include_vars.comment }}</td>
</tr>
{{ end }}
{{ end }}
{{ $json := getJSON "data/signatures/signatures.json" }}
{{ $json := where $json "include_vars.permissionPub" "yes" }}
{{ range sort $json "timestamp" "desc" | first 10 }}
<tr>
<td>{{ .include_vars.name }}</td>
<td>{{ .include_vars.country }}</td>
<td>{{ .include_vars.comment }}</td>
</tr>
{{ end }}
</tbody>
</table>
</div>
</div>
</div>