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

Diary

{{ range ( sort ( where $.Site.Data.films.log "date_watched" "!=" "" ) "date_watched" "desc" ) }} {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }} {{ .title }} {{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }} {{- if .date_watched -}} {{- time.Format "Jan 2, 2006" .date_watched -}} {{- if .is_rewatch }} ↻{{ end -}} {{- else -}} n/a {{- end -}} {{ end }}

Assorted

{{ range ( sort ( where $.Site.Data.films.log "date_watched" "" ) "title" "asc" ) }} {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }} {{- with ( where ( where $.Site.Pages "Section" "films" ) "title" .title ) -}} {{ range . }} {{ end }} {{- end -}} {{ .title }} {{- with ( where ( where $.Site.Pages "Section" "films" ) "title" .title ) -}} {{- end -}} {{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }} {{- if .date_watched -}} {{- time.Format "Jan 2, 2006" .date_watched -}} {{- if .is_rewatch }} ↻{{ end -}} {{- else -}} n/a {{- end -}} {{ end }} {{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }} {{ range ( sort $.Site.Data.films.wishlist "title" "asc" ) }} {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }} {{- with ( where ( where $.Site.Pages "Section" "films" ) "title" .title ) -}} {{ range . }} {{ end }} {{- end -}} {{ .title }} {{- with ( where ( where $.Site.Pages "Section" "films" ) "title" .title ) -}} {{- end -}} {{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }} {{- if .date_watched -}} {{- time.Format "Jan 2, 2006" .date_watched -}} {{- if .is_rewatch }} ↻{{ end -}} {{- else -}} n/a {{- end -}} {{ end }} {{ end }}