diff --git a/assets/css/components/table.scss b/assets/css/components/table.scss index ed51377..3f26b3c 100644 --- a/assets/css/components/table.scss +++ b/assets/css/components/table.scss @@ -1,25 +1,30 @@ -/* TODO: Not currently used */ -@media screen and (max-width: 480px) { - .table-scroller { - overflow-x: auto; - width: 320px; - } -} - -table { - margin: auto; - width: 80%; +/* TODO: Not currently used */ +@media screen and (max-width: 480px) { + .table-scroller { + overflow-x: auto; + width: 320px; + } +} + +table { + margin: auto; + inline-size: 80%; display: table; & thead { border: 2px solid $dark; } - & td { - padding: 0.5em 1em; - border: 1px solid $dark; - } -} + & td { + padding: 0.5em 1em; + border: 1px solid $dark; + + &:nth-of-type(1), + &:nth-last-of-type(1) { + white-space: nowrap; + } + } +} td[colspan] { text-align: center; diff --git a/assets/css/layout/_header.scss b/assets/css/layout/_header.scss index d6c0657..f34e49f 100644 --- a/assets/css/layout/_header.scss +++ b/assets/css/layout/_header.scss @@ -11,7 +11,7 @@ width: 100%; text-align: center; z-index: 1; - + &__title, &__tagline, &__icons, @@ -45,7 +45,7 @@ grid-area: header-nav; margin: auto; width: 100%; - @include mq('desktop') { + @include mq("desktop") { width: 60%; } diff --git a/assets/css/layout/_main.scss b/assets/css/layout/_main.scss index 8955f6f..d94e183 100644 --- a/assets/css/layout/_main.scss +++ b/assets/css/layout/_main.scss @@ -2,7 +2,23 @@ grid-area: page-container; margin-left: 1em; margin-right: 1em; - @include mq('desktop') { + @include mq("desktop") { 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; + } + } } diff --git a/layouts/_default/section.html b/layouts/_default/section.html index ddac409..c58bfe7 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -1,5 +1,6 @@ {{ define "title" }} - {{ .Page.Title | plainify }} | {{ .Site.Title }} + {{ .Page.Title | plainify }} | + {{ .Site.Title }} {{ end }} {{ define "main-class" }}--section{{ end }} @@ -8,42 +9,53 @@ {{ define "item-type" }}{{ .Params.itemsType }}{{ end }} {{ define "main-header" }} -
- {{- .Scratch.Set "section" ( first 1 ( split .File.Dir "/" ) ) -}} - {{- $section := .Scratch.Get "section" -}} - {{ if ( or ( in "books" ( delimit $section "" ) ) ( in "games" ( delimit $section "" ) ) ) }} - Current ~ - {{ end }} - Log ~ - Wishlist - -

{{ .Title | safeHTML }} - {{ range .AlternativeOutputFormats -}} - - - - {{ end }} -

- {{ .Content }} -
-{{ end }} - -{{ define "main-body" }} -
- {{ if .File }} +
+

+ {{ .Title | safeHTML }} + {{ range .AlternativeOutputFormats -}} + + + + {{ end }} +

- {{ .Scratch.Set "page" ( index ( split .File.Dir "/" ) 1 ) }} + {{ with ( default .Parent.Sections .Sections ) }} + + {{ end }} + + +
+ {{ .Content }} +
+
+{{ end }} + +{{ define "main-body" }} +
+ {{ .Scratch.Set "page" .Page.Slug }} {{ if ( in "current log wishlist" ( .Scratch.Get "page" ) ) }} {{ if ( eq ( .Scratch.Get "page" ) "current" ) }} {{ .Scratch.Set "listMode" "current" }} - {{ else if ( eq ( .Scratch.Get "page" ) "log" ) }} {{ .Scratch.Set "listMode" "log" }} - {{ else if ( eq ( .Scratch.Get "page" ) "wishlist" ) }} {{ .Scratch.Set "listMode" "wishlist" }} - {{ end }} {{ partial "stats" . }} @@ -51,6 +63,5 @@ {{ partial "table" . }} {{ end }} - {{ end }} -
+
{{ end }} diff --git a/layouts/partials/books/rows/read-dates.html b/layouts/partials/books/rows/read-dates.html index 0dffc7c..ed871da 100644 --- a/layouts/partials/books/rows/read-dates.html +++ b/layouts/partials/books/rows/read-dates.html @@ -1,9 +1,11 @@ {{- with .date_started -}} - {{- time.Format "Jan 2, 2006" . -}} + {{- time.Format "Jan 2, 2006" . -}} {{- else -}} - Unknown -{{- end -}}–{{- with .date_finished -}} - {{- time.Format "Jan 2, 2006" . -}} + Unknown +{{- end }} +to
+{{ with .date_finished -}} + {{- time.Format "Jan 2, 2006" . -}} {{- else -}} - Unknown + Unknown {{- end -}} diff --git a/layouts/partials/books/table-body.html b/layouts/partials/books/table-body.html index 9fe5ffe..540cc2d 100644 --- a/layouts/partials/books/table-body.html +++ b/layouts/partials/books/table-body.html @@ -1,7 +1,14 @@ {{ 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 }} + + {{ with .date_added }} + {{ time.Format "Jan 2, 2006" . }} + {{ else }} + n/a + {{ end }} + + {{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}} @@ -21,20 +28,28 @@ {{- with .date_started -}} - Since {{ time.Format "Jan 2, 2006" . -}} + Since + {{ time.Format "Jan 2, 2006" . -}} {{- else -}} - Unknown + Unknown {{- end -}} {{ end }} {{ else if ( eq ( .Scratch.Get "listMode" ) "log" ) }} -

Diary

+

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 }} + + {{ with .date_added }} + {{ time.Format "Jan 2, 2006" . }} + {{ else }} + n/a + {{ end }} + + {{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}} @@ -58,11 +73,18 @@ {{ end }} -

Assorted

+

Assorted

{{ range ( sort ( where $.Site.Data.books.log "Date Finished" "" ) "Title" "asc" ) }} - {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ else }}n/a{{ end }} + + {{ with .date_added }} + {{ time.Format "Jan 2, 2006" . }} + {{ else }} + n/a + {{ end }} + + {{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}} @@ -88,7 +110,14 @@ {{ 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 }} + + {{ with .date_added }} + {{ time.Format "Jan 2, 2006" . }} + {{ else }} + n/a + {{ end }} + + {{- partial "books/rows/title.html" ( dict "c" . "g" $ ) -}} @@ -105,8 +134,6 @@ {{- partial "books/rows/publish-date.html" . -}} - - n/a {{ end }} {{ end }} diff --git a/layouts/partials/books/table-header.html b/layouts/partials/books/table-header.html index 341406a..b4a8087 100644 --- a/layouts/partials/books/table-header.html +++ b/layouts/partials/books/table-header.html @@ -2,4 +2,6 @@ Title Author(s) Publication Date -Dates Read +{{ if ( not ( eq ( .Scratch.Get "listMode" ) "wishlist" ) ) }} + Dates Read +{{ end }} diff --git a/layouts/partials/films/table-body.html b/layouts/partials/films/table-body.html index 963e938..96b38b6 100644 --- a/layouts/partials/films/table-body.html +++ b/layouts/partials/films/table-body.html @@ -1,81 +1,78 @@ {{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }} -

Diary

+

Diary

{{ range ( sort ( where $.Site.Data.films.log "date_finished" "!=" "" ) "date_finished" "desc" ) }} - - {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }} + + {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }} - - {{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}} + + {{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}} - {{- with .comments -}} -

Comments: {{ . }}

- {{- end -}} - + {{- with .comments -}} +

Comments: {{ . }}

+ {{- end -}} + - {{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }} + + {{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }} + - - {{- if .date_finished -}} - {{- time.Format "Jan 2, 2006" .date_finished -}} - {{- if .is_repeat }} ↻{{ end -}} - {{- else -}} - n/a - {{- end -}} - - + + {{- if .date_finished -}} + {{- time.Format "Jan 2, 2006" .date_finished -}} + {{- if .is_repeat }}↻{{ end -}} + {{- else -}} + n/a + {{- end -}} + + {{ end }} -

Assorted

+

Assorted

{{ range ( sort ( where $.Site.Data.films.log "date_finished" "" ) "title" "asc" ) }} - - {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }} + + {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }} - - {{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}} + + {{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}} - {{- with .comments -}} -

Comments: {{ . }}

- {{- end -}} - + {{- with .comments -}} +

Comments: {{ . }}

+ {{- end -}} + - {{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }} + + {{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }} + - - {{- if .date_finished -}} - {{- time.Format "Jan 2, 2006" .date_finished -}} - {{- if .is_repeat }} ↻{{ end -}} - {{- else -}} - n/a - {{- end -}} - - + + {{- if .date_finished -}} + {{- time.Format "Jan 2, 2006" .date_finished -}} + {{- if .is_repeat }}↻{{ end -}} + {{- else -}} + n/a + {{- end -}} + + {{ end }} {{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }} {{ range ( sort $.Site.Data.films.wishlist "title" "asc" ) }} - - {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }} + + {{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }} - - {{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}} + + {{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}} - {{- with .comments -}} -

Comments: {{ . }}

- {{- end -}} - + {{- with .comments -}} +

Comments: {{ . }}

+ {{- end -}} + - {{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }} - - - {{- if .date_finished -}} - {{- time.Format "Jan 2, 2006" .date_finished -}} - {{- if .is_repeat }} ↻{{ end -}} - {{- else -}} - n/a - {{- end -}} - - + + {{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }} + + {{ end }} {{ end }} diff --git a/layouts/partials/films/table-header.html b/layouts/partials/films/table-header.html index dd6b0e9..3405b27 100644 --- a/layouts/partials/films/table-header.html +++ b/layouts/partials/films/table-header.html @@ -1,4 +1,6 @@ Date Added Title Release Date -Date Watched +{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }} + Date Watched +{{ end }} diff --git a/layouts/partials/games/table-body.html b/layouts/partials/games/table-body.html index 4d76fa0..43406fb 100644 --- a/layouts/partials/games/table-body.html +++ b/layouts/partials/games/table-body.html @@ -1,78 +1,90 @@ {{ if ( eq ( .Scratch.Get "listMode" ) "current" ) }} {{ range ( sort $.Site.Data.games.current "Date Started" "desc" ) }} - - + + TODO + {{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}} - - {{ index . "Date Released" }} - {{ .Platforms }} - - {{- if index . "Date Started" -}} - Since {{ time.Format "Jan 2, 2006" ( index . "Date Started" ) -}} - {{- else -}} - Unknown - {{- end -}} - - + + {{ .Platforms }} + {{ index . "Date Released" }} + + {{- if index . "Date Started" -}} + Since + {{ time.Format "Jan 2, 2006" ( index . "Date Started" ) -}} + {{- else -}} + Unknown + {{- end -}} + + {{ end }} {{ else if ( eq ( .Scratch.Get "listMode" ) "log" ) }} -

Diary

+

Diary

{{ range ( sort ( where $.Site.Data.games.log "Date Finished" "!=" "" ) "Date Finished" "desc" ) }} - - + + TODO + {{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}} - - {{ index . "Date Released" }} - {{ .Platforms }} - - {{- 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 -}} - {{- if index . "Level of Completion" }} ({{ index . "Level of Completion" }}){{- end -}} - - + + {{ .Platforms }} + {{ index . "Date Released" }} + + {{- with index . "Level of Completion" }} + {{ . }} + {{- 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 }} -

Assorted

+

Assorted

{{ range ( sort ( where $.Site.Data.games.log "Date Finished" "" ) "Title" "asc" ) }} - - + + TODO + {{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}} - - {{ index . "Date Released" }} - {{ .Platforms }} - - {{- 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 -}} - {{- if index . "Level of Completion" }} ({{ index . "Level of Completion" }}){{- end -}} - - + + {{ .Platforms }} + {{ index . "Date Released" }} + + {{- with index . "Level of Completion" }} + {{ . }} + {{- 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 }} {{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }} {{ range ( sort $.Site.Data.games.wishlist "Title" "asc" ) }} - - + + TODO + {{- partial "cite" ( dict "c" . "g" $ "section" "games" "schemaType" "VideoGame" ) -}} - - {{ index . "Date Released" }} - {{ .Platforms }} - n/a - + + {{ .Platforms }} + {{ index . "Date Released" }} + {{ end }} {{ end }} diff --git a/layouts/partials/games/table-header.html b/layouts/partials/games/table-header.html index 04613f6..53d51ea 100644 --- a/layouts/partials/games/table-header.html +++ b/layouts/partials/games/table-header.html @@ -1,4 +1,8 @@ +Date Added Title +Platform(s) Release Year -Platform(s) Played -Date Played +{{ if ( not ( eq ( .Scratch.Get "listMode" ) "wishlist" ) ) }} + Level of Completion + Dates Played +{{ end }} diff --git a/layouts/partials/header/site-header.html b/layouts/partials/header/site-header.html index d164b07..711758f 100644 --- a/layouts/partials/header/site-header.html +++ b/layouts/partials/header/site-header.html @@ -1,18 +1,38 @@ -