{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}

Diary

{{ range ( sort ( where $.Site.Data.films.log "Date Watched" "!=" "" ) "Date Watched" "desc" ) }} {{ time.Format "Jan 2, 2006" ( index . "Date Added" ) }} {{- with ( where ( where $.Site.Pages "Section" "films" ) "Title" .Title ) -}} {{ range . }} {{ end }} {{- end -}} {{ .Title }} {{- with ( where ( where $.Site.Pages "Section" "films" ) "Title" .Title ) -}} {{- end -}} {{ index . "Release Year" }} {{- if ( index . "Date Watched" ) -}} {{- time.Format "Jan 2, 2006" ( index . "Date Watched" ) -}} {{- if .Rewatch }} ↻{{ end -}} {{- else -}} n/a {{- end -}} {{ end }}

Assorted

{{ range ( sort ( where $.Site.Data.films.log "Date Watched" "" ) "Title" "asc" ) }} {{ time.Format "Jan 2, 2006" ( index . "Date Added" ) }} {{- with ( where ( where $.Site.Pages "Section" "films" ) "Title" .Title ) -}} {{ range . }} {{ end }} {{- end -}} {{ .Title }} {{- with ( where ( where $.Site.Pages "Section" "films" ) "Title" .Title ) -}} {{- end -}} {{ index . "Release Year" }} {{- if ( index . "Date Watched" ) -}} {{- time.Format "Jan 2, 2006" ( index . "Date Watched" ) -}} {{- if .Rewatch }} ↻{{ end -}} {{- else -}} n/a {{- end -}} {{ end }} {{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }} {{ range ( sort $.Site.Data.films.wishlist "Title" "asc" ) }} {{ time.Format "Jan 2, 2006" ( index . "Date Added" ) }} {{- with ( where ( where $.Site.Pages "Section" "films" ) "Title" .Title ) -}} {{ range . }} {{ end }} {{- end -}} {{ .Title }} {{- with ( where ( where $.Site.Pages "Section" "films" ) "Title" .Title ) -}} {{- end -}} {{ index . "Release Year" }} {{- if ( index . "Date Watched" ) -}} {{- time.Format "Jan 2, 2006" ( index . "Date Watched" ) -}} {{- if .Rewatch }} ↻{{ end -}} {{- else -}} n/a {{- end -}} {{ end }} {{ end }}