diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index d77ae12..0000000 --- a/.prettierignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -*.md diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 40f2d3f..0000000 --- a/.prettierrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "plugins": ["prettier-plugin-go-template"], - "proseWrap": "preserve", - "overrides": [ - { - "files": ["*.html"], - "options": { - "parser": "go-template", - "printWidth": 80, - "singleAttributePerLine": true - } - } - ] -} diff --git a/assets/css/components/table.scss b/assets/css/components/table.scss index 3f26b3c..ed51377 100644 --- a/assets/css/components/table.scss +++ b/assets/css/components/table.scss @@ -1,30 +1,25 @@ -/* TODO: Not currently used */ -@media screen and (max-width: 480px) { - .table-scroller { - overflow-x: auto; - width: 320px; - } -} - -table { - margin: auto; - inline-size: 80%; +/* TODO: Not currently used */ +@media screen and (max-width: 480px) { + .table-scroller { + overflow-x: auto; + width: 320px; + } +} + +table { + margin: auto; + width: 80%; display: table; & thead { border: 2px solid $dark; } - & td { - padding: 0.5em 1em; - border: 1px solid $dark; - - &:nth-of-type(1), - &:nth-last-of-type(1) { - white-space: nowrap; - } - } -} + & td { + padding: 0.5em 1em; + border: 1px solid $dark; + } +} td[colspan] { text-align: center; diff --git a/assets/css/layout/_header.scss b/assets/css/layout/_header.scss index f34e49f..d6c0657 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 d94e183..8955f6f 100644 --- a/assets/css/layout/_main.scss +++ b/assets/css/layout/_main.scss @@ -2,23 +2,7 @@ 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/content/books/_index.md b/content/books/_index.md deleted file mode 100644 index af7a188..0000000 --- a/content/books/_index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Books ---- - -Here you can record books that you read. diff --git a/content/books/current/_index.md b/content/books/current/_index.md deleted file mode 100644 index b8bf076..0000000 --- a/content/books/current/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Currently Reading -weight: 4 ---- - -Here you can record books that you are currently reading. diff --git a/content/books/log/_index.md b/content/books/log/_index.md deleted file mode 100644 index 8c2d98d..0000000 --- a/content/books/log/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Read -weight: 2 ---- - -Here you can record books that you have previously read. diff --git a/content/books/wishlist/_index.md b/content/books/wishlist/_index.md deleted file mode 100644 index 61ad06d..0000000 --- a/content/books/wishlist/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: To-Read -weight: 3 ---- - -Here you can record books that you would like to read. diff --git a/content/films/_index.md b/content/films/_index.md deleted file mode 100644 index 2f73334..0000000 --- a/content/films/_index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Films ---- - -Here you can record films that you watch. diff --git a/content/films/log/_index.md b/content/films/log/_index.md deleted file mode 100644 index 917e47a..0000000 --- a/content/films/log/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Watched -weight: 1 ---- - -Here you can record films that you have previously watched. diff --git a/content/films/wishlist/_index.md b/content/films/wishlist/_index.md deleted file mode 100644 index 61cd0bf..0000000 --- a/content/films/wishlist/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: To-Watch -weight: 2 ---- - -Here you can record films that you would like to watch. diff --git a/content/games/_index.md b/content/games/_index.md deleted file mode 100644 index 6af5fa1..0000000 --- a/content/games/_index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Games ---- - -Here you can record games that you play. diff --git a/content/games/current/_index.md b/content/games/current/_index.md deleted file mode 100644 index d009d40..0000000 --- a/content/games/current/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Currently Playing -weight: 1 ---- - -Here you can record games that you are currently playing. diff --git a/content/games/log/_index.md b/content/games/log/_index.md deleted file mode 100644 index 5acc5a5..0000000 --- a/content/games/log/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Played -weight: 2 ---- - -Here you can record games that you have previously played. diff --git a/content/games/wishlist/_index.md b/content/games/wishlist/_index.md deleted file mode 100644 index 7552be3..0000000 --- a/content/games/wishlist/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: To-Play -weight: 3 ---- - -Here you can record games that you would like to play. diff --git a/content/tv/_index.md b/content/tv/_index.md deleted file mode 100644 index 6233e48..0000000 --- a/content/tv/_index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: TV ---- - -Here you can record TV shows that you watch. diff --git a/content/tv/episodes/_index.md b/content/tv/episodes/_index.md deleted file mode 100644 index cb3c211..0000000 --- a/content/tv/episodes/_index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: TV Episodes ---- - -Here you can record TV show episodes that you watch. diff --git a/content/tv/episodes/log/_index.md b/content/tv/episodes/log/_index.md deleted file mode 100644 index e0adfa6..0000000 --- a/content/tv/episodes/log/_index.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Watched -slug: log -weight: 2 ---- - -Here you can record TV show episodes that you have previously watched. diff --git a/content/tv/series/_index.md b/content/tv/series/_index.md deleted file mode 100644 index ba8de4d..0000000 --- a/content/tv/series/_index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: TV Series' ---- - -Here you can record TV series' that you watch. diff --git a/content/tv/series/current/_index.md b/content/tv/series/current/_index.md deleted file mode 100644 index 8c6feea..0000000 --- a/content/tv/series/current/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Currently Watching -weight: 1 ---- - -Here you can record TV series' that you are currently watching. diff --git a/content/tv/series/log/_index.md b/content/tv/series/log/_index.md deleted file mode 100644 index a88865c..0000000 --- a/content/tv/series/log/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Watched -weight: 2 ---- - -Here you can record TV series' that you have previously watched. diff --git a/content/tv/series/wishlist/_index.md b/content/tv/series/wishlist/_index.md deleted file mode 100644 index 15b2275..0000000 --- a/content/tv/series/wishlist/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: To-Watch -weight: 3 ---- - -Here you can record TV series' that you have would like to watch. diff --git a/layouts/_default/section.html b/layouts/_default/section.html index c58bfe7..ddac409 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -1,6 +1,5 @@ {{ define "title" }} - {{ .Page.Title | plainify }} | - {{ .Site.Title }} + {{ .Page.Title | plainify }} | {{ .Site.Title }} {{ end }} {{ define "main-class" }}--section{{ end }} @@ -9,53 +8,42 @@ {{ define "item-type" }}{{ .Params.itemsType }}{{ end }} {{ define "main-header" }} -
-

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

- - {{ with ( default .Parent.Sections .Sections ) }} - - {{ end }} - - -
- {{ .Content }} -
-
+
+ {{- .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" }} -
- {{ .Scratch.Set "page" .Page.Slug }} +
+ {{ if .File }} + + {{ .Scratch.Set "page" ( index ( split .File.Dir "/" ) 1 ) }} {{ 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" . }} @@ -63,5 +51,6 @@ {{ partial "table" . }} {{ end }} -
+ {{ end }} +
{{ end }} diff --git a/layouts/partials/books/rows/read-dates.html b/layouts/partials/books/rows/read-dates.html index ed871da..0dffc7c 100644 --- a/layouts/partials/books/rows/read-dates.html +++ b/layouts/partials/books/rows/read-dates.html @@ -1,11 +1,9 @@ {{- with .date_started -}} - {{- time.Format "Jan 2, 2006" . -}} + {{- time.Format "Jan 2, 2006" . -}} {{- else -}} - Unknown -{{- end }} -to
-{{ with .date_finished -}} - {{- time.Format "Jan 2, 2006" . -}} + Unknown +{{- end -}}–{{- 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 540cc2d..9fe5ffe 100644 --- a/layouts/partials/books/table-body.html +++ b/layouts/partials/books/table-body.html @@ -1,14 +1,7 @@ {{ 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" $ ) -}} @@ -28,28 +21,20 @@ {{- 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" $ ) -}} @@ -73,18 +58,11 @@ {{ 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" $ ) -}} @@ -110,14 +88,7 @@ {{ 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" $ ) -}} @@ -134,6 +105,8 @@ {{- 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 b4a8087..341406a 100644 --- a/layouts/partials/books/table-header.html +++ b/layouts/partials/books/table-header.html @@ -2,6 +2,4 @@ Title Author(s) Publication Date -{{ if ( not ( eq ( .Scratch.Get "listMode" ) "wishlist" ) ) }} - Dates Read -{{ end }} +Dates Read diff --git a/layouts/partials/films/table-body.html b/layouts/partials/films/table-body.html index 96b38b6..963e938 100644 --- a/layouts/partials/films/table-body.html +++ b/layouts/partials/films/table-body.html @@ -1,78 +1,81 @@ {{ 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 }} - - + {{ 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 -}} + + {{ end }} {{ end }} diff --git a/layouts/partials/films/table-header.html b/layouts/partials/films/table-header.html index 3405b27..dd6b0e9 100644 --- a/layouts/partials/films/table-header.html +++ b/layouts/partials/films/table-header.html @@ -1,6 +1,4 @@ Date Added Title Release Date -{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }} - Date Watched -{{ end }} +Date Watched diff --git a/layouts/partials/games/table-body.html b/layouts/partials/games/table-body.html index 43406fb..4d76fa0 100644 --- a/layouts/partials/games/table-body.html +++ b/layouts/partials/games/table-body.html @@ -1,90 +1,78 @@ {{ 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" ) -}} - - {{ .Platforms }} - {{ index . "Date Released" }} - - {{- if index . "Date Started" -}} - Since - {{ time.Format "Jan 2, 2006" ( index . "Date Started" ) -}} - {{- else -}} - Unknown - {{- end -}} - - + + {{ index . "Date Released" }} + {{ .Platforms }} + + {{- 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" ) -}} - - {{ .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 -}} - - + + {{ 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 -}} + + {{ end }} -

Assorted

+

Assorted

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