From c427ba9bbe1b5331e2afbd73239623f188e1a115 Mon Sep 17 00:00:00 2001 From: Ben Goldsworthy Date: Mon, 8 Jan 2024 23:58:53 +0100 Subject: [PATCH] update film log template --- layouts/partials/films/table-body.html | 56 +++++++++++++------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/layouts/partials/films/table-body.html b/layouts/partials/films/table-body.html index f36fb08..08fbcb5 100644 --- a/layouts/partials/films/table-body.html +++ b/layouts/partials/films/table-body.html @@ -2,17 +2,17 @@

Diary

- {{ range ( sort ( where $.Site.Data.films.log "Date Watched" "!=" "" ) "Date Watched" "desc" ) }} + {{ range ( sort ( where $.Site.Data.films.log "date_watched" "!=" "" ) "date_watched" "desc" ) }} - {{ time.Format "Jan 2, 2006" ( index . "Date Added" ) }} + {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }} - {{- partial "cite" ( dict "c" . "schemaType" "Movie" ) -}} + {{ .title }} - {{ index . "Release Year" }} + {{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }} - {{- if ( index . "Date Watched" ) -}} - {{- time.Format "Jan 2, 2006" ( index . "Date Watched" ) -}} - {{- if .Rewatch }} ↻{{ end -}} + {{- if .date_watched -}} + {{- time.Format "Jan 2, 2006" .date_watched -}} + {{- if .is_rewatch }} ↻{{ end -}} {{- else -}} n/a {{- end -}} @@ -22,25 +22,25 @@

Assorted

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