{{ if ( eq ( .Scratch.Get "listMode" ) "current" ) }} {{ range ( sort $.Site.Data.books.current "Date Started" "desc" ) }} {{ if index . "Date Added" }}{{ time.Format "Jan 2, 2006" ( index . "Date Added" ) }}{{ else }}n/a{{end }} {{- partial "cite" ( dict "c" . "schemaType" "Book" ) -}}

{{ .Author }}

{{- if ( index . "Additional Authors" ) -}}

Additional: {{ index . "Additional Authors" }}

{{- end -}} {{- partial "books/publication-year.html" . -}} {{- if index . "Date Started" -}} {{- time.Format "Jan 2, 2006" ( index . "Date Started" ) -}} {{- end -}}– {{ end }} {{ else if ( eq ( .Scratch.Get "listMode" ) "log" ) }}

Diary

{{ range ( sort ( where $.Site.Data.books.log "Date Finished" "!=" "" ) "Date Finished" "desc" ) }} {{ if index . "Date Added" }}{{ time.Format "Jan 2, 2006" ( index . "Date Added" ) }}{{ else }}n/a{{end }}

{{- with ( where ( where $.Site.Pages "Section" "books" ) "Title" .Title ) -}} {{ range . }} {{ end }} {{- end -}} {{ .Title }}{{ if .Edition }} ({{ .Edition }}){{ end }} {{- with ( where ( where $.Site.Pages "Section" "books" ) "Title" .Title ) -}} {{- end -}}

{{ .Author }}

{{- if ( index . "Additional Authors" ) -}}

Additional: {{ index . "Additional Authors" }}

{{- end -}} {{- partial "books/publication-year.html" . -}} {{- if index . "Date Started" -}} {{- time.Format "Jan 2, 2006" ( index . "Date Started" ) -}} {{- else -}} Unknown {{- end -}}–{{- if index . "Date Finished" -}} {{- time.Format "Jan 2, 2006" ( index . "Date Finished" ) -}} {{- else -}} Unknown {{- end -}} {{ end }}

Assorted

{{ range ( sort ( where $.Site.Data.books.log "Date Finished" "" ) "Title" "asc" ) }} {{ if index . "Date Added" }}{{ time.Format "Jan 2, 2006" ( index . "Date Added" ) }}{{ else }}n/a{{end }}

{{- with ( where ( where $.Site.Pages "Section" "books" ) "Title" .Title ) -}} {{ range . }} {{ end }} {{- end -}} {{ .Title }}{{ if .Edition }} ({{ .Edition }}){{ end }} {{- with ( where ( where $.Site.Pages "Section" "books" ) "Title" .Title ) -}} {{- end -}}

{{ .Author }}

{{- if ( index . "Additional Authors" ) -}}

Additional: {{ index . "Additional Authors" }}

{{- end -}} {{- partial "books/publication-year.html" . -}} {{- if index . "Date Started" -}} {{- time.Format "Jan 2, 2006" ( index . "Date Started" ) -}} {{- else -}} Unknown {{- end -}}–{{- if index . "Date Finished" -}} {{- time.Format "Jan 2, 2006" ( index . "Date Finished" ) -}} {{- else -}} Unknown {{- end -}} {{ end }} {{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }} {{ range ( sort $.Site.Data.books.wishlist "Title" "asc" ) }} {{ if index . "Date Added" }}{{ time.Format "Jan 2, 2006" ( index . "Date Added" ) }}{{ else }}n/a{{end }}

{{- with ( where ( where $.Site.Pages "Section" "books" ) "Title" .Title ) -}} {{ range . }} {{ end }} {{- end -}} {{ .Title }}{{ if .Edition }} ({{ .Edition }}){{ end }} {{- with ( where ( where $.Site.Pages "Section" "books" ) "Title" .Title ) -}} {{- end -}}

{{ .Author }}

{{- if ( index . "Additional Authors" ) -}}

Additional: {{ index . "Additional Authors" }}

{{- end -}} {{- partial "books/publication-year.html" . -}} n/a {{ end }} {{ end }}