Cataloguer/layouts/partials/games/table-body.html

25 lines
750 B
HTML
Raw Normal View History

2022-12-17 18:41:44 +00:00
{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
{{ .Scratch.Set "filterCol" "name" }}
{{ .Scratch.Set "filterDir" "asc" }}
{{ else }}
{{ .Scratch.Set "filterCol" "name" }}
{{ .Scratch.Set "filterDir" "asc" }}
{{ end }}
{{ range ( sort ( index $.Site.Data.games ( .Scratch.Get "listMode" ) ) ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }}
<tr>
<td>
{{- with ( where ( where $.Site.Pages "Section" "games" ) "Title" .Name ) -}}
{{ range . }}
<a href="{{ .RelPermalink }}">
{{ end }}
{{- end -}}
<cite class="game">{{ .name }}</cite>
{{- with ( where ( where $.Site.Pages "Section" "games" ) "Title" .Name ) -}}
</a>
{{- end -}}
</td>
<td>{{ .release_date }}</td>
</tr>
{{ end }}