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