{{ if ( eq ( .Scratch.Get "listMode" ) "current" ) }} {{ .Scratch.Set "filterCol" "Date Started" }} {{ .Scratch.Set "filterDir" "asc" }} {{ else if ( eq ( .Scratch.Get "listMode" ) "log" ) }} {{ .Scratch.Set "filterCol" "Date Finished" }} {{ .Scratch.Set "filterDir" "desc" }} {{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }} {{ .Scratch.Set "filterCol" "Title" }} {{ .Scratch.Set "filterDir" "asc" }} {{ end }} {{ range ( sort ( sort ( index $.Site.Data.books ( .Scratch.Get "listMode" ) ) "Title" "asc" ) ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }} {{ 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 -}}

{{- index . "Year Published" -}} {{- if ( index . "Original Publication Year" ) -}} (orig. {{ index . "Orginal Publication Year" }}) {{- end -}} {{- 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 }}