Update templates

This commit is contained in:
Ben Goldsworthy 2023-02-17 19:13:50 -05:00
parent 24bc1422e2
commit bcb942c669
8 changed files with 70 additions and 44 deletions

View file

@ -140,7 +140,9 @@ cite.article--shortcite::after {
content: none; content: none;
} }
.episode-number { .episode-number,
.authors--addtional,
.year--original {
font-size: 0.75em; font-size: 0.75em;
opacity: 0.8; opacity: 0.8;
} }

View file

@ -1,8 +1,8 @@
{{ if ( eq ( .Scratch.Get "listMode" ) "current" ) }} {{ if ( eq ( .Scratch.Get "listMode" ) "current" ) }}
{{ .Scratch.Set "filterCol" "Started At" }} {{ .Scratch.Set "filterCol" "Date Started" }}
{{ .Scratch.Set "filterDir" "asc" }} {{ .Scratch.Set "filterDir" "asc" }}
{{ else if ( eq ( .Scratch.Get "listMode" ) "log" ) }} {{ else if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
{{ .Scratch.Set "filterCol" "Finished At" }} {{ .Scratch.Set "filterCol" "Date Finished" }}
{{ .Scratch.Set "filterDir" "desc" }} {{ .Scratch.Set "filterDir" "desc" }}
{{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }} {{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }}
{{ .Scratch.Set "filterCol" "Title" }} {{ .Scratch.Set "filterCol" "Title" }}
@ -11,25 +11,41 @@
{{ range ( sort ( sort ( index $.Site.Data.books ( .Scratch.Get "listMode" ) ) "Title" "asc" ) ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }} {{ range ( sort ( sort ( index $.Site.Data.books ( .Scratch.Get "listMode" ) ) "Title" "asc" ) ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }}
<tr> <tr>
<td>{{ index . "Date Added" }}</td> <td>{{ if index . "Date Added" }}{{ time.Format "Jan 2, 2006" ( index . "Date Added" ) }}{{ else }}n/a{{end }}</td>
<td> <td>
<p>
{{- with ( where ( where $.Site.Pages "Section" "books" ) "Title" .Title ) -}} {{- with ( where ( where $.Site.Pages "Section" "books" ) "Title" .Title ) -}}
{{ range . }} {{ range . }}
<a href="{{ .RelPermalink }}"> <a href="{{ .RelPermalink }}">
{{ end }} {{ end }}
{{- end -}} {{- end -}}
<cite class="film">{{ .Title }}</cite> <cite class="book">{{ .Title }}</cite>{{ if .Edition }} <span class="book--edition">({{ .Edition }})</span>{{ end }}
{{- with ( where ( where $.Site.Pages "Section" "books" ) "Title" .Title ) -}} {{- with ( where ( where $.Site.Pages "Section" "books" ) "Title" .Title ) -}}
</a> </a>
{{- end -}} {{- end -}}
</p>
</td> </td>
<td>{{ .Author }}</td>
<td>{{ index . "Year Published" }}</td>
<td> <td>
{{- if ( index . "Finished At" ) -}} <p class="author">{{ .Author }}</p>
{{- index . "Finshed At" -}} {{- if ( index . "Additional Authors" ) -}}
<p class="author--additional">Additional: {{ index . "Additional Authors" }}</p>
{{- end -}}
</td>
<td>
<p class="year">{{- index . "Year Published" -}}
{{- if ( index . "Original Publication Year" ) -}}
<span class="year--original">(orig.&nbsp;{{ index . "Orginal Publication Year" }})</span>
{{- end -}}
</td>
<td>
{{- if index . "Date Started" -}}
{{- time.Format "Jan 2, 2006" ( index . "Date Started" ) -}}
{{- else -}} {{- else -}}
n/a Unknown
{{- end -}}&ndash;{{- if index . "Date Finished" -}}
{{- time.Format "Jan 2, 2006" ( index . "Date Finished" ) -}}
{{- else -}}
Unknown
{{- end -}} {{- end -}}
</td> </td>
</tr> </tr>

View file

@ -2,4 +2,4 @@
<th>Title</th> <th>Title</th>
<th>Author(s)</th> <th>Author(s)</th>
<th>Publication Date</th> <th>Publication Date</th>
<th>Read Date</th> <th>Dates Read</th>

View file

@ -1,35 +1,29 @@
{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }} {{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
{{ .Scratch.Set "filterCol" "Watched Date" }} {{ .Scratch.Set "filterCol" "Date Watched" }}
{{ .Scratch.Set "filterDir" "desc" }} {{ .Scratch.Set "filterDir" "desc" }}
{{ else }} {{ else }}
{{ .Scratch.Set "filterCol" "Name" }} {{ .Scratch.Set "filterCol" "Title" }}
{{ .Scratch.Set "filterDir" "asc" }} {{ .Scratch.Set "filterDir" "asc" }}
{{ end }} {{ end }}
{{ range ( sort ( sort ( index $.Site.Data.films ( .Scratch.Get "listMode" ) ) "Name" "asc" ) ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }} {{ range ( sort ( sort ( index $.Site.Data.films ( .Scratch.Get "listMode" ) ) "Title" "asc" ) ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }}
<tr> <tr>
<td>{{ .Date }}</td> <td>{{ time.Format "Jan 2, 2006" ( index . "Date Added" ) }}</td>
<td> <td>
{{- with ( where ( where $.Site.Pages "Section" "films" ) "Title" .Name ) -}} {{- with ( where ( where $.Site.Pages "Section" "films" ) "Title" .Title ) -}}
{{ range . }} {{ range . }}
<a href="{{ .RelPermalink }}"> <a href="{{ .RelPermalink }}">
{{ end }} {{ end }}
{{- end -}} {{- end -}}
<cite class="film">{{ .Name }}</cite> <cite class="film">{{ .Title }}</cite>
{{- with ( where ( where $.Site.Pages "Section" "films" ) "Title" .Name ) -}} {{- with ( where ( where $.Site.Pages "Section" "films" ) "Title" .Title ) -}}
</a> </a>
{{- end -}} {{- end -}}
</td> </td>
<td>{{ .Year }}</td> <td>{{ index . "Release Year" }}</td>
<td> <td>
{{- if ( index . "Watched Date" ) -}} {{- if ( index . "Date Watched" ) -}}
{{- index . "Watched Date" -}} {{- time.Format "Jan 2, 2006" ( index . "Date Watched" ) -}}
{{- else -}}
n/a
{{- end -}}
</td>
<td>
{{- if ( index . "Watched Date" ) -}}
{{- if .Rewatch }} &#x21BB;{{ end -}} {{- if .Rewatch }} &#x21BB;{{ end -}}
{{- else -}} {{- else -}}
n/a n/a

View file

@ -1,5 +1,4 @@
<th>Date Added</th> <th>Date Added</th>
<th>Title</th> <th>Title</th>
<th>Year</th> <th>Release Year</th>
<th>Watch Date</th> <th>Date Watched</th>
<th>Rewatch?</th>

View file

@ -1,27 +1,40 @@
{{ if ( eq ( .Scratch.Get "listMode" ) "current" ) }} {{ if ( eq ( .Scratch.Get "listMode" ) "current" ) }}
{{ .Scratch.Set "filterCol" "name" }} {{ .Scratch.Set "filterCol" "Title" }}
{{ .Scratch.Set "filterDir" "asc" }} {{ .Scratch.Set "filterDir" "asc" }}
{{ else if ( eq ( .Scratch.Get "listMode" ) "log" ) }} {{ else if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
{{ .Scratch.Set "filterCol" "name" }} {{ .Scratch.Set "filterCol" "Title" }}
{{ .Scratch.Set "filterDir" "asc" }} {{ .Scratch.Set "filterDir" "asc" }}
{{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }} {{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }}
{{ .Scratch.Set "filterCol" "name" }} {{ .Scratch.Set "filterCol" "Title" }}
{{ .Scratch.Set "filterDir" "asc" }} {{ .Scratch.Set "filterDir" "asc" }}
{{ end }} {{ end }}
{{ range ( sort ( index $.Site.Data.games ( .Scratch.Get "listMode" ) ) ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }} {{ range ( sort ( index $.Site.Data.games ( .Scratch.Get "listMode" ) ) ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }}
<tr> <tr>
<td> <td>
{{- with ( where ( where $.Site.Pages "Section" "games" ) "Title" .Name ) -}} {{- with ( where ( where $.Site.Pages "Section" "games" ) "Title" .Title ) -}}
{{ range . }} {{ range . }}
<a href="{{ .RelPermalink }}"> <a href="{{ .RelPermalink }}">
{{ end }} {{ end }}
{{- end -}} {{- end -}}
<cite class="game">{{ .name }}</cite> <cite class="game">{{ .Title }}</cite>
{{- with ( where ( where $.Site.Pages "Section" "games" ) "Title" .Name ) -}} {{- with ( where ( where $.Site.Pages "Section" "games" ) "Title" .Title ) -}}
</a> </a>
{{- end -}} {{- end -}}
</td> </td>
<td>{{ .release_date }}</td> <td>{{ index . "Date Released" }}</td>
<td>{{ .Platforms }}</td>
<td>
{{- if index . "Date Started" -}}
{{- time.Format "Jan 2, 2006" ( index . "Date Started" ) -}}
{{- else -}}
Unknown
{{- end -}}&ndash;{{- if index . "Date Finished" -}}
{{- time.Format "Jan 2, 2006" ( index . "Date Finished" ) -}}
{{- else -}}
Unknown
{{- end -}}
{{- if index . "Level of Completion" }} <span class="games__level-of-completion">({{ index . "Level of Completion" }})</span>{{- end -}}
</td>
</tr> </tr>
{{ end }} {{ end }}

View file

@ -1,2 +1,4 @@
<th>Title</th> <th>Title</th>
<th>Release Date</th> <th>Release Year</th>
<th>Platform(s) Played</th>
<th>Date Played</th>

View file

@ -1,6 +1,6 @@
{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }} {{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }} {{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
{{ .Scratch.Set "filterCol" "Watch Date" }} {{ .Scratch.Set "filterCol" "Date Watched" }}
{{ .Scratch.Set "filterDir" "desc" }} {{ .Scratch.Set "filterDir" "desc" }}
{{ end }} {{ end }}
@ -22,8 +22,8 @@
{{- end -}} {{- end -}}
</td> </td>
<td> <td>
{{- if ( index . "Watch Date" ) -}} {{- if ( index . "Date Watched" ) -}}
{{- time.Format "Jan 2, 2006" ( index . "Watch Date" ) -}} {{- time.Format "Jan 2, 2006" ( index . "Date Watched" ) -}}
{{- else -}} {{- else -}}
n/a n/a
{{- end -}} {{- end -}}