2022-12-17 18:41:44 +00:00
|
|
|
{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
|
2023-02-18 00:13:50 +00:00
|
|
|
{{ .Scratch.Set "filterCol" "Date Watched" }}
|
2022-12-17 18:41:44 +00:00
|
|
|
{{ .Scratch.Set "filterDir" "desc" }}
|
|
|
|
{{ else }}
|
2023-02-18 00:13:50 +00:00
|
|
|
{{ .Scratch.Set "filterCol" "Title" }}
|
2022-12-17 18:41:44 +00:00
|
|
|
{{ .Scratch.Set "filterDir" "asc" }}
|
|
|
|
{{ end }}
|
|
|
|
|
2023-02-18 00:13:50 +00:00
|
|
|
{{ range ( sort ( sort ( index $.Site.Data.films ( .Scratch.Get "listMode" ) ) "Title" "asc" ) ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }}
|
2022-12-17 18:41:44 +00:00
|
|
|
<tr>
|
2023-02-18 00:13:50 +00:00
|
|
|
<td>{{ time.Format "Jan 2, 2006" ( index . "Date Added" ) }}</td>
|
2022-12-17 18:41:44 +00:00
|
|
|
<td>
|
2023-02-18 00:13:50 +00:00
|
|
|
{{- with ( where ( where $.Site.Pages "Section" "films" ) "Title" .Title ) -}}
|
2022-12-17 18:41:44 +00:00
|
|
|
{{ range . }}
|
|
|
|
<a href="{{ .RelPermalink }}">
|
|
|
|
{{ end }}
|
|
|
|
{{- end -}}
|
2023-02-18 00:13:50 +00:00
|
|
|
<cite class="film">{{ .Title }}</cite>
|
|
|
|
{{- with ( where ( where $.Site.Pages "Section" "films" ) "Title" .Title ) -}}
|
2022-12-17 18:41:44 +00:00
|
|
|
</a>
|
|
|
|
{{- end -}}
|
|
|
|
</td>
|
2023-02-18 00:13:50 +00:00
|
|
|
<td>{{ index . "Release Year" }}</td>
|
2022-12-17 18:41:44 +00:00
|
|
|
<td>
|
2023-02-18 00:13:50 +00:00
|
|
|
{{- if ( index . "Date Watched" ) -}}
|
|
|
|
{{- time.Format "Jan 2, 2006" ( index . "Date Watched" ) -}}
|
|
|
|
{{- if .Rewatch }} ↻{{ end -}}
|
2022-12-17 18:41:44 +00:00
|
|
|
{{- else -}}
|
|
|
|
n/a
|
|
|
|
{{- end -}}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|