Cataloguer/layouts/partials/games/table-body.html
2022-12-17 12:41:44 -06:00

24 lines
750 B
HTML

{{ 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 }}