feat: custom sections, TV series section, fix table wrapping
This commit is contained in:
parent
995a539fa9
commit
39c64bf51a
17 changed files with 402 additions and 204 deletions
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
table {
|
table {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
width: 80%;
|
inline-size: 80%;
|
||||||
display: table;
|
display: table;
|
||||||
|
|
||||||
& thead {
|
& thead {
|
||||||
|
@ -18,6 +18,11 @@ table {
|
||||||
& td {
|
& td {
|
||||||
padding: 0.5em 1em;
|
padding: 0.5em 1em;
|
||||||
border: 1px solid $dark;
|
border: 1px solid $dark;
|
||||||
|
|
||||||
|
&:nth-of-type(1),
|
||||||
|
&:nth-last-of-type(1) {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
grid-area: header-nav;
|
grid-area: header-nav;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@include mq('desktop') {
|
@include mq("desktop") {
|
||||||
width: 60%;
|
width: 60%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,23 @@
|
||||||
grid-area: page-container;
|
grid-area: page-container;
|
||||||
margin-left: 1em;
|
margin-left: 1em;
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
@include mq('desktop') {
|
@include mq("desktop") {
|
||||||
margin: 2em;
|
margin: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__header {
|
||||||
|
& .section-nav {
|
||||||
|
padding-block-end: 1em;
|
||||||
|
|
||||||
|
& li {
|
||||||
|
float: left;
|
||||||
|
padding-inline: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& .section__desc {
|
||||||
|
border-block: 2px solid $dark;
|
||||||
|
margin-block: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{{ define "title" }}
|
{{ define "title" }}
|
||||||
{{ .Page.Title | plainify }} | {{ .Site.Title }}
|
{{ .Page.Title | plainify }} |
|
||||||
|
{{ .Site.Title }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "main-class" }}--section{{ end }}
|
{{ define "main-class" }}--section{{ end }}
|
||||||
|
@ -8,42 +9,53 @@
|
||||||
{{ define "item-type" }}{{ .Params.itemsType }}{{ end }}
|
{{ define "item-type" }}{{ .Params.itemsType }}{{ end }}
|
||||||
|
|
||||||
{{ define "main-header" }}
|
{{ define "main-header" }}
|
||||||
<header class="site-content__header">
|
<header class="site-content__header">
|
||||||
{{- .Scratch.Set "section" ( first 1 ( split .File.Dir "/" ) ) -}}
|
<h1 class="page-title">
|
||||||
{{- $section := .Scratch.Get "section" -}}
|
{{ .Title | safeHTML }}
|
||||||
{{ if ( or ( in "books" ( delimit $section "" ) ) ( in "games" ( delimit $section "" ) ) ) }}
|
|
||||||
<a href="/{{ delimit $section "" }}/current">Current</a> ~
|
|
||||||
{{ end }}
|
|
||||||
<a href="/{{ delimit $section "" }}/log">Log</a> ~
|
|
||||||
<a href="/{{ delimit $section "" }}/wishlist">Wishlist</a>
|
|
||||||
|
|
||||||
<h1 class="page-title">{{ .Title | safeHTML }}
|
|
||||||
{{ range .AlternativeOutputFormats -}}
|
{{ range .AlternativeOutputFormats -}}
|
||||||
<a href="{{ .RelPermalink }}">
|
<a href="{{ .RelPermalink }}">
|
||||||
<img class="feed-icon" src="/images/feed-icon.svg">
|
<img
|
||||||
|
class="feed-icon"
|
||||||
|
src="/images/feed-icon.svg"
|
||||||
|
/>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
{{ with ( default .Parent.Sections .Sections ) }}
|
||||||
|
<nav class="section-nav">
|
||||||
|
<ul>
|
||||||
|
{{ range .ByWeight }}
|
||||||
|
<li>
|
||||||
|
{{ if eq . $.Page }}
|
||||||
|
<p style="margin: 0;">{{ .Title }}</p>
|
||||||
|
{{ else }}
|
||||||
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||||
|
{{ end }}
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="section__desc">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</header>
|
</div>
|
||||||
|
</header>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "main-body" }}
|
{{ define "main-body" }}
|
||||||
<main class="site-content__body">
|
<main class="site-content__body">
|
||||||
{{ if .File }}
|
{{ .Scratch.Set "page" .Page.Slug }}
|
||||||
|
|
||||||
{{ .Scratch.Set "page" ( index ( split .File.Dir "/" ) 1 ) }}
|
|
||||||
{{ if ( in "current log wishlist" ( .Scratch.Get "page" ) ) }}
|
{{ if ( in "current log wishlist" ( .Scratch.Get "page" ) ) }}
|
||||||
|
|
||||||
{{ if ( eq ( .Scratch.Get "page" ) "current" ) }}
|
{{ if ( eq ( .Scratch.Get "page" ) "current" ) }}
|
||||||
{{ .Scratch.Set "listMode" "current" }}
|
{{ .Scratch.Set "listMode" "current" }}
|
||||||
|
|
||||||
{{ else if ( eq ( .Scratch.Get "page" ) "log" ) }}
|
{{ else if ( eq ( .Scratch.Get "page" ) "log" ) }}
|
||||||
{{ .Scratch.Set "listMode" "log" }}
|
{{ .Scratch.Set "listMode" "log" }}
|
||||||
|
|
||||||
{{ else if ( eq ( .Scratch.Get "page" ) "wishlist" ) }}
|
{{ else if ( eq ( .Scratch.Get "page" ) "wishlist" ) }}
|
||||||
{{ .Scratch.Set "listMode" "wishlist" }}
|
{{ .Scratch.Set "listMode" "wishlist" }}
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "stats" . }}
|
{{ partial "stats" . }}
|
||||||
|
@ -51,6 +63,5 @@
|
||||||
{{ partial "table" . }}
|
{{ partial "table" . }}
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
</main>
|
||||||
</main>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
{{- time.Format "Jan 2, 2006" . -}}
|
{{- time.Format "Jan 2, 2006" . -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
Unknown
|
Unknown
|
||||||
{{- end -}}–{{- with .date_finished -}}
|
{{- end }}
|
||||||
|
to<br />
|
||||||
|
{{ with .date_finished -}}
|
||||||
{{- time.Format "Jan 2, 2006" . -}}
|
{{- time.Format "Jan 2, 2006" . -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
Unknown
|
Unknown
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
{{ if ( eq ( .Scratch.Get "listMode" ) "current" ) }}
|
{{ if ( eq ( .Scratch.Get "listMode" ) "current" ) }}
|
||||||
{{ range ( sort $.Site.Data.books.current "date_started" "desc" ) }}
|
{{ range ( sort $.Site.Data.books.current "date_started" "desc" ) }}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ else }}n/a{{ end }}</td>
|
<td>
|
||||||
|
{{ with .date_added }}
|
||||||
|
{{ time.Format "Jan 2, 2006" . }}
|
||||||
|
{{ else }}
|
||||||
|
n/a
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}}
|
{{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}}
|
||||||
|
@ -21,7 +28,8 @@
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{{- with .date_started -}}
|
{{- with .date_started -}}
|
||||||
Since {{ time.Format "Jan 2, 2006" . -}}
|
Since
|
||||||
|
{{ time.Format "Jan 2, 2006" . -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
Unknown
|
Unknown
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@ -30,11 +38,18 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
|
{{ else if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=5><h3>Diary</h3></td>
|
<td colspan="5"><h3>Diary</h3></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ range ( sort ( where $.Site.Data.books.log "Date Finished" "!=" "" ) "Date Finished" "desc" ) }}
|
{{ range ( sort ( where $.Site.Data.books.log "Date Finished" "!=" "" ) "Date Finished" "desc" ) }}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ else }}n/a{{ end }}</td>
|
<td>
|
||||||
|
{{ with .date_added }}
|
||||||
|
{{ time.Format "Jan 2, 2006" . }}
|
||||||
|
{{ else }}
|
||||||
|
n/a
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}}
|
{{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}}
|
||||||
|
@ -58,11 +73,18 @@
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=5><h3>Assorted</h3></td>
|
<td colspan="5"><h3>Assorted</h3></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ range ( sort ( where $.Site.Data.books.log "Date Finished" "" ) "Title" "asc" ) }}
|
{{ range ( sort ( where $.Site.Data.books.log "Date Finished" "" ) "Title" "asc" ) }}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ else }}n/a{{ end }}</td>
|
<td>
|
||||||
|
{{ with .date_added }}
|
||||||
|
{{ time.Format "Jan 2, 2006" . }}
|
||||||
|
{{ else }}
|
||||||
|
n/a
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}}
|
{{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}}
|
||||||
|
@ -88,7 +110,14 @@
|
||||||
{{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }}
|
{{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }}
|
||||||
{{ range ( sort $.Site.Data.books.wishlist "Title" "asc" ) }}
|
{{ range ( sort $.Site.Data.books.wishlist "Title" "asc" ) }}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ else }}n/a{{ end }}</td>
|
<td>
|
||||||
|
{{ with .date_added }}
|
||||||
|
{{ time.Format "Jan 2, 2006" . }}
|
||||||
|
{{ else }}
|
||||||
|
n/a
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}}
|
{{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}}
|
||||||
|
@ -105,8 +134,6 @@
|
||||||
<td>
|
<td>
|
||||||
{{- partial "books/rows/publish-date.html" . -}}
|
{{- partial "books/rows/publish-date.html" . -}}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>n/a</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -2,4 +2,6 @@
|
||||||
<th>Title</th>
|
<th>Title</th>
|
||||||
<th>Author(s)</th>
|
<th>Author(s)</th>
|
||||||
<th>Publication Date</th>
|
<th>Publication Date</th>
|
||||||
<th>Dates Read</th>
|
{{ if ( not ( eq ( .Scratch.Get "listMode" ) "wishlist" ) ) }}
|
||||||
|
<th>Dates Read</th>
|
||||||
|
{{ end }}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
|
{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=4><h3>Diary</h3></td>
|
<td colspan="4"><h3>Diary</h3></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ range ( sort ( where $.Site.Data.films.log "date_finished" "!=" "" ) "date_finished" "desc" ) }}
|
{{ range ( sort ( where $.Site.Data.films.log "date_finished" "!=" "" ) "date_finished" "desc" ) }}
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -14,12 +14,14 @@
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
|
<td>
|
||||||
|
{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}
|
||||||
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{{- if .date_finished -}}
|
{{- if .date_finished -}}
|
||||||
{{- time.Format "Jan 2, 2006" .date_finished -}}
|
{{- time.Format "Jan 2, 2006" .date_finished -}}
|
||||||
{{- if .is_repeat }} ↻{{ end -}}
|
{{- if .is_repeat }}↻{{ end -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
n/a
|
n/a
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@ -27,7 +29,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=4><h3>Assorted</h3></td>
|
<td colspan="4"><h3>Assorted</h3></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ range ( sort ( where $.Site.Data.films.log "date_finished" "" ) "title" "asc" ) }}
|
{{ range ( sort ( where $.Site.Data.films.log "date_finished" "" ) "title" "asc" ) }}
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -41,12 +43,14 @@
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
|
<td>
|
||||||
|
{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}
|
||||||
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{{- if .date_finished -}}
|
{{- if .date_finished -}}
|
||||||
{{- time.Format "Jan 2, 2006" .date_finished -}}
|
{{- time.Format "Jan 2, 2006" .date_finished -}}
|
||||||
{{- if .is_repeat }} ↻{{ end -}}
|
{{- if .is_repeat }}↻{{ end -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
n/a
|
n/a
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@ -66,15 +70,8 @@
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
|
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{{- if .date_finished -}}
|
{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}
|
||||||
{{- time.Format "Jan 2, 2006" .date_finished -}}
|
|
||||||
{{- if .is_repeat }} ↻{{ end -}}
|
|
||||||
{{- else -}}
|
|
||||||
n/a
|
|
||||||
{{- end -}}
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<th>Date Added</th>
|
<th>Date Added</th>
|
||||||
<th>Title</th>
|
<th>Title</th>
|
||||||
<th>Release Date</th>
|
<th>Release Date</th>
|
||||||
<th>Date Watched</th>
|
{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
|
||||||
|
<th>Date Watched</th>
|
||||||
|
{{ end }}
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
{{ if ( eq ( .Scratch.Get "listMode" ) "current" ) }}
|
{{ if ( eq ( .Scratch.Get "listMode" ) "current" ) }}
|
||||||
{{ range ( sort $.Site.Data.games.current "Date Started" "desc" ) }}
|
{{ range ( sort $.Site.Data.games.current "Date Started" "desc" ) }}
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>TODO</td>
|
||||||
<td>
|
<td>
|
||||||
{{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}}
|
{{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ index . "Date Released" }}</td>
|
|
||||||
<td>{{ .Platforms }}</td>
|
<td>{{ .Platforms }}</td>
|
||||||
|
<td>{{ index . "Date Released" }}</td>
|
||||||
<td>
|
<td>
|
||||||
{{- if index . "Date Started" -}}
|
{{- if index . "Date Started" -}}
|
||||||
Since {{ time.Format "Jan 2, 2006" ( index . "Date Started" ) -}}
|
Since
|
||||||
|
{{ time.Format "Jan 2, 2006" ( index . "Date Started" ) -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
Unknown
|
Unknown
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@ -17,15 +19,21 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
|
{{ else if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=4><h3>Diary</h3></td>
|
<td colspan="6"><h3>Diary</h3></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ range ( sort ( where $.Site.Data.games.log "Date Finished" "!=" "" ) "Date Finished" "desc" ) }}
|
{{ range ( sort ( where $.Site.Data.games.log "Date Finished" "!=" "" ) "Date Finished" "desc" ) }}
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>TODO</td>
|
||||||
<td>
|
<td>
|
||||||
{{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}}
|
{{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ index . "Date Released" }}</td>
|
|
||||||
<td>{{ .Platforms }}</td>
|
<td>{{ .Platforms }}</td>
|
||||||
|
<td>{{ index . "Date Released" }}</td>
|
||||||
|
<td>
|
||||||
|
{{- with index . "Level of Completion" }}
|
||||||
|
{{ . }}
|
||||||
|
{{- end -}}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{- if index . "Date Started" -}}
|
{{- if index . "Date Started" -}}
|
||||||
{{- time.Format "Jan 2, 2006" ( index . "Date Started" ) -}}
|
{{- time.Format "Jan 2, 2006" ( index . "Date Started" ) -}}
|
||||||
|
@ -36,20 +44,25 @@
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
Unknown
|
Unknown
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if index . "Level of Completion" }} <span class="games__level-of-completion">({{ index . "Level of Completion" }})</span>{{- end -}}
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=5><h3>Assorted</h3></td>
|
<td colspan="6"><h3>Assorted</h3></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ range ( sort ( where $.Site.Data.games.log "Date Finished" "" ) "Title" "asc" ) }}
|
{{ range ( sort ( where $.Site.Data.games.log "Date Finished" "" ) "Title" "asc" ) }}
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>TODO</td>
|
||||||
<td>
|
<td>
|
||||||
{{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}}
|
{{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ index . "Date Released" }}</td>
|
|
||||||
<td>{{ .Platforms }}</td>
|
<td>{{ .Platforms }}</td>
|
||||||
|
<td>{{ index . "Date Released" }}</td>
|
||||||
|
<td>
|
||||||
|
{{- with index . "Level of Completion" }}
|
||||||
|
{{ . }}
|
||||||
|
{{- end -}}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{- if index . "Date Started" -}}
|
{{- if index . "Date Started" -}}
|
||||||
{{- time.Format "Jan 2, 2006" ( index . "Date Started" ) -}}
|
{{- time.Format "Jan 2, 2006" ( index . "Date Started" ) -}}
|
||||||
|
@ -60,19 +73,18 @@
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
Unknown
|
Unknown
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if index . "Level of Completion" }} <span class="games__level-of-completion">({{ index . "Level of Completion" }})</span>{{- end -}}
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }}
|
{{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }}
|
||||||
{{ range ( sort $.Site.Data.games.wishlist "Title" "asc" ) }}
|
{{ range ( sort $.Site.Data.games.wishlist "Title" "asc" ) }}
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>TODO</td>
|
||||||
<td>
|
<td>
|
||||||
{{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}}
|
{{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ index . "Date Released" }}</td>
|
|
||||||
<td>{{ .Platforms }}</td>
|
<td>{{ .Platforms }}</td>
|
||||||
<td>n/a</td>
|
<td>{{ index . "Date Released" }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
|
<th>Date Added</th>
|
||||||
<th>Title</th>
|
<th>Title</th>
|
||||||
|
<th>Platform(s)</th>
|
||||||
<th>Release Year</th>
|
<th>Release Year</th>
|
||||||
<th>Platform(s) Played</th>
|
{{ if ( not ( eq ( .Scratch.Get "listMode" ) "wishlist" ) ) }}
|
||||||
<th>Date Played</th>
|
<th>Level of Completion</th>
|
||||||
|
<th>Dates Played</th>
|
||||||
|
{{ end }}
|
||||||
|
|
|
@ -1,12 +1,32 @@
|
||||||
<header class="site-header">
|
<header class="site-header">
|
||||||
{{ block "header" . }}
|
{{ block "header" . }}
|
||||||
<h1 class="site-header__title" itemprop="name"><a href="{{ .Site.Home.RelPermalink }}">{{ .Site.Title }}</a></h1>
|
<h1
|
||||||
<p class="site-header__tagline" itemprop="about">Views my own. Discussion ≠ endorsement. Do try this at home.</p>
|
class="site-header__title"
|
||||||
<p class="site-header__icons">~
|
itemprop="name"
|
||||||
<a href="mailto:{{ $.Site.Author.email }}" rel="me">📧</a> ~
|
>
|
||||||
<a href="{{ .Site.Params.codeURL }}">💻</a> ~
|
<a href="{{ .Site.Home.RelPermalink }}">{{ .Site.Title }}</a>
|
||||||
|
</h1>
|
||||||
|
<p
|
||||||
|
class="site-header__tagline"
|
||||||
|
itemprop="about"
|
||||||
|
>
|
||||||
|
Views my own. Discussion ≠ endorsement. Do try this at home.
|
||||||
|
</p>
|
||||||
|
<p class="site-header__icons">
|
||||||
|
~
|
||||||
|
<a
|
||||||
|
href="mailto:{{ $.Site.Author.email }}"
|
||||||
|
rel="me"
|
||||||
|
>📧</a
|
||||||
|
>
|
||||||
|
~ <a href="{{ .Site.Params.codeURL }}">💻</a> ~
|
||||||
<a href="/{{ .Site.Params.keyfile }}">🔐</a> ~
|
<a href="/{{ .Site.Params.keyfile }}">🔐</a> ~
|
||||||
<a href="/index.xml"><img class="feed-icon" src="/images/feed-icon.svg"></a> ~
|
<a href="/index.xml"
|
||||||
|
><img
|
||||||
|
class="feed-icon"
|
||||||
|
src="/images/feed-icon.svg"
|
||||||
|
/></a>
|
||||||
|
~
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<nav class="site-header__nav">
|
<nav class="site-header__nav">
|
||||||
|
|
|
@ -1,16 +1,25 @@
|
||||||
{{ if ( .Scratch.Get "listMode" ) }}
|
{{ if ( .Scratch.Get "listMode" ) }}
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
{{ if ( and ( in site.Params.mainSections .Section ) ( in "current log wishlist" ( .Scratch.Get "page" ) ) ) }}
|
{{ if ( and ( in site.Params.mainSections .Section ) ( in "current log wishlist" ( .Scratch.Get "page" ) ) ) }}
|
||||||
|
{{ if eq .Type "tv" }}
|
||||||
|
{{ partial ( printf "%s/%s/%s" .Section .Parent.Slug "table-header" ) . }}
|
||||||
|
{{ else }}
|
||||||
{{ partial ( printf "%s/%s" .Section "table-header" ) . }}
|
{{ partial ( printf "%s/%s" .Section "table-header" ) . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{ if ( and ( in site.Params.mainSections .Section ) ( in "current log wishlist" ( .Scratch.Get "page" ) ) ) }}
|
{{ if ( and ( in site.Params.mainSections .Section ) ( in "current log wishlist" ( .Scratch.Get "page" ) ) ) }}
|
||||||
|
{{ if eq .Type "tv" }}
|
||||||
|
{{ partial ( printf "%s/%s/%s" .Section .Parent.Slug "table-body" ) . }}
|
||||||
|
{{ else }}
|
||||||
{{ partial ( printf "%s/%s" .Section "table-body" ) . }}
|
{{ partial ( printf "%s/%s" .Section "table-body" ) . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
</tbody>
|
</tbody>
|
||||||
<table>
|
<table></table>
|
||||||
|
</table>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
86
layouts/partials/tv/series/table-body.html
Normal file
86
layouts/partials/tv/series/table-body.html
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
{{ if ( eq ( .Scratch.Get "listMode" ) "current" ) }}
|
||||||
|
{{ range ( sort $.Site.Data.tv_series.current "date_started" "desc" ) }}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{{ with .date_added }}
|
||||||
|
{{ time.Format "Jan 2, 2006" . }}
|
||||||
|
{{ else }}
|
||||||
|
n/a
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
{{- with ( index . "name" ) -}}
|
||||||
|
<cite
|
||||||
|
class="cite"
|
||||||
|
itemscope
|
||||||
|
itemtype="TVSeries"
|
||||||
|
>{{ . }}</cite
|
||||||
|
>
|
||||||
|
{{- end -}}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
{{- partial "books/rows/read-dates.html" . -}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{ end }}
|
||||||
|
{{ else if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
|
||||||
|
{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
|
||||||
|
{{ .Scratch.Set "filterCol" "date_finished" }}
|
||||||
|
{{ .Scratch.Set "filterDir" "desc" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ range ( sort $.Site.Data.tv_series.log ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{{ with .date_added }}
|
||||||
|
{{ time.Format "Jan 2, 2006" . }}
|
||||||
|
{{ else }}
|
||||||
|
n/a
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
{{- with ( index . "name" ) -}}
|
||||||
|
<cite
|
||||||
|
class="cite"
|
||||||
|
itemscope
|
||||||
|
itemtype="TVSeries"
|
||||||
|
>{{ . }}</cite
|
||||||
|
>
|
||||||
|
{{- end -}}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
{{- partial "books/rows/read-dates.html" . -}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{ end }}
|
||||||
|
{{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }}
|
||||||
|
{{ range ( sort $.Site.Data.tv_series.wishlist "name" "asc" ) }}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{{ with .date_added }}
|
||||||
|
{{ time.Format "Jan 2, 2006" . }}
|
||||||
|
{{ else }}
|
||||||
|
n/a
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
{{- with ( index . "name" ) -}}
|
||||||
|
<cite
|
||||||
|
class="cite"
|
||||||
|
itemscope
|
||||||
|
itemtype="TVSeries"
|
||||||
|
>{{ . }}</cite
|
||||||
|
>
|
||||||
|
{{- end -}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
5
layouts/partials/tv/series/table-header.html
Normal file
5
layouts/partials/tv/series/table-header.html
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<th>Date Added</th>
|
||||||
|
<th>Series Title</th>
|
||||||
|
{{ if ( not ( eq ( .Scratch.Get "listMode" ) "wishlist" ) ) }}
|
||||||
|
<th>Dates Watched</th>
|
||||||
|
{{ end }}
|
Loading…
Reference in a new issue