{{ if ( eq ( .Scratch.Get "listMode" ) "current" ) }} {{ range ( sort $.Site.Data.books.current "date_started" "desc" ) }} {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ else }}n/a{{ end }} {{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}} {{- with .comments -}}

Comments: {{ . }}

{{- end -}} {{- partial "books/rows/authors.html" . -}} {{- partial "books/rows/publish-date.html" . -}} {{- partial "books/rows/read-dates.html" . -}} {{ end }} {{ else if ( eq ( .Scratch.Get "listMode" ) "log" ) }}

Diary

{{ range ( sort ( where $.Site.Data.books.log "Date Finished" "!=" "" ) "Date Finished" "desc" ) }} {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ else }}n/a{{ end }} {{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}} {{- with .comments -}}

Comments: {{ . }}

{{- end -}} {{- partial "books/rows/authors.html" . -}} {{- partial "books/rows/publish-date.html" . -}} {{- partial "books/rows/read-dates.html" . -}} {{ end }}

Assorted

{{ range ( sort ( where $.Site.Data.books.log "Date Finished" "" ) "Title" "asc" ) }} {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ else }}n/a{{ end }} {{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}} {{- with .comments -}}

Comments: {{ . }}

{{- end -}} {{- partial "books/rows/authors.html" . -}} {{- partial "books/rows/publish-date.html" . -}} {{- partial "books/rows/read-dates.html" . -}} {{ end }} {{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }} {{ range ( sort $.Site.Data.books.wishlist "Title" "asc" ) }} {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ else }}n/a{{ end }} {{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}} {{- with .comments -}}

Comments: {{ . }}

{{- end -}} {{- partial "books/rows/authors.html" . -}} {{- partial "books/rows/publish-date.html" . -}} n/a {{ end }} {{ end }}