diff --git a/assets/css/layout/_main.scss b/assets/css/layout/_main.scss index d94e183..eee3588 100644 --- a/assets/css/layout/_main.scss +++ b/assets/css/layout/_main.scss @@ -8,10 +8,7 @@ &__header { & .section-nav { - padding-block-end: 1em; - & li { - float: left; padding-inline: 1em; } } diff --git a/content/books/_index.md b/content/books/_index.md index af7a188..efee449 100644 --- a/content/books/_index.md +++ b/content/books/_index.md @@ -1,5 +1,6 @@ --- title: Books +slug: books --- Here you can record books that you read. diff --git a/content/books/current/_index.md b/content/books/current/_index.md index b8bf076..1c67b43 100644 --- a/content/books/current/_index.md +++ b/content/books/current/_index.md @@ -1,6 +1,7 @@ --- title: Currently Reading weight: 4 +slug: current --- Here you can record books that you are currently reading. diff --git a/content/books/log/_index.md b/content/books/log/_index.md index 8c2d98d..a5774b7 100644 --- a/content/books/log/_index.md +++ b/content/books/log/_index.md @@ -1,6 +1,7 @@ --- title: Read weight: 2 +slug: log --- Here you can record books that you have previously read. diff --git a/content/books/wishlist/_index.md b/content/books/wishlist/_index.md index 61ad06d..3237adf 100644 --- a/content/books/wishlist/_index.md +++ b/content/books/wishlist/_index.md @@ -1,6 +1,7 @@ --- title: To-Read weight: 3 +slug: wishlist --- Here you can record books that you would like to read. diff --git a/content/films/_index.md b/content/films/_index.md index 2f73334..dc30e71 100644 --- a/content/films/_index.md +++ b/content/films/_index.md @@ -1,5 +1,6 @@ --- title: Films +slug: films --- Here you can record films that you watch. diff --git a/content/films/log/_index.md b/content/films/log/_index.md index 917e47a..81530c6 100644 --- a/content/films/log/_index.md +++ b/content/films/log/_index.md @@ -1,6 +1,7 @@ --- title: Watched weight: 1 +slug: log --- Here you can record films that you have previously watched. diff --git a/content/films/wishlist/_index.md b/content/films/wishlist/_index.md index 61cd0bf..f1b8915 100644 --- a/content/films/wishlist/_index.md +++ b/content/films/wishlist/_index.md @@ -1,6 +1,7 @@ --- title: To-Watch weight: 2 +slug: wishlist --- Here you can record films that you would like to watch. diff --git a/content/games/_index.md b/content/games/_index.md index 6af5fa1..bc14ae8 100644 --- a/content/games/_index.md +++ b/content/games/_index.md @@ -1,5 +1,6 @@ --- title: Games +slug: games --- Here you can record games that you play. diff --git a/content/games/current/_index.md b/content/games/current/_index.md index d009d40..75e6c50 100644 --- a/content/games/current/_index.md +++ b/content/games/current/_index.md @@ -1,6 +1,7 @@ --- title: Currently Playing weight: 1 +slug: current --- Here you can record games that you are currently playing. diff --git a/content/games/log/_index.md b/content/games/log/_index.md index 5acc5a5..3e689fb 100644 --- a/content/games/log/_index.md +++ b/content/games/log/_index.md @@ -1,6 +1,7 @@ --- title: Played weight: 2 +slug: log --- Here you can record games that you have previously played. diff --git a/content/games/wishlist/_index.md b/content/games/wishlist/_index.md index 7552be3..f602686 100644 --- a/content/games/wishlist/_index.md +++ b/content/games/wishlist/_index.md @@ -1,6 +1,7 @@ --- title: To-Play weight: 3 +slug: wishlist --- Here you can record games that you would like to play. diff --git a/content/tv/_index.md b/content/tv/_index.md index 6233e48..80e8344 100644 --- a/content/tv/_index.md +++ b/content/tv/_index.md @@ -1,5 +1,6 @@ --- title: TV +slug: tv --- Here you can record TV shows that you watch. diff --git a/content/tv/episodes/_index.md b/content/tv/episodes/_index.md index cb3c211..6830cdb 100644 --- a/content/tv/episodes/_index.md +++ b/content/tv/episodes/_index.md @@ -1,5 +1,6 @@ --- title: TV Episodes +slug: 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 index e0adfa6..74490d3 100644 --- a/content/tv/episodes/log/_index.md +++ b/content/tv/episodes/log/_index.md @@ -1,7 +1,7 @@ --- title: Watched -slug: log weight: 2 +slug: log --- 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 index ba8de4d..fad93c2 100644 --- a/content/tv/series/_index.md +++ b/content/tv/series/_index.md @@ -1,5 +1,6 @@ --- title: TV Series' +slug: 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 index 8c6feea..aaf1cef 100644 --- a/content/tv/series/current/_index.md +++ b/content/tv/series/current/_index.md @@ -1,6 +1,7 @@ --- title: Currently Watching weight: 1 +slug: current --- 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 index a88865c..768f934 100644 --- a/content/tv/series/log/_index.md +++ b/content/tv/series/log/_index.md @@ -1,6 +1,7 @@ --- title: Watched weight: 2 +slug: log --- 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 index 15b2275..3f83440 100644 --- a/content/tv/series/wishlist/_index.md +++ b/content/tv/series/wishlist/_index.md @@ -1,6 +1,7 @@ --- title: To-Watch weight: 3 +slug: wishlist --- Here you can record TV series' that you have would like to watch. diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 6dc1592..bff3110 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,5 +1,6 @@ {{ define "title" }} - {{ .Page.Title | plainify }} | {{ .Site.Title }} + {{ .Page.Title | plainify }} | + {{ .Site.Title }} {{ end }} {{ define "main-class" }}--list{{ end }} @@ -8,30 +9,34 @@ {{ define "item-type" }}{{ .Params.itemsType }}{{ end }} {{ define "main-header" }} -
-

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

- {{ .Content }} -
+
+

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

+ {{ .Content }} +
{{ end }} - -{{ define "main-body" }} -
- {{ if .File }} - {{ if ( eq .File.Dir "log/" ) }} - {{ .Scratch.Set "listMode" "log" }} - {{ else if ( eq .File.Dir "wishlist/" ) }} - {{ .Scratch.Set "listMode" "wishlist" }} - {{ end }} - {{ if ( in "log/ wishlist/" .File.Dir ) }} - {{ partial "table" . }} - {{ end }} - {{ end }} -
+{{ define "main-body" }} +
+ {{ if .File }} + {{ if ( eq .File.Dir "log/" ) }} + {{ .Scratch.Set "listMode" "log" }} + {{ else if ( eq .File.Dir "wishlist/" ) }} + {{ .Scratch.Set "listMode" "wishlist" }} + {{ end }} + + {{ if ( in "log/ wishlist/" .File.Dir ) }} + {{ partial "table" . }} + {{ end }} + {{ end }} +
{{ end }} diff --git a/layouts/_default/section.html b/layouts/_default/section.html index c58bfe7..0e019e7 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -50,6 +50,7 @@ {{ .Scratch.Set "page" .Page.Slug }} {{ if ( in "current log wishlist" ( .Scratch.Get "page" ) ) }} + {{ .Scratch.Get .Page.Slug }} {{ if ( eq ( .Scratch.Get "page" ) "current" ) }} {{ .Scratch.Set "listMode" "current" }} {{ else if ( eq ( .Scratch.Get "page" ) "log" ) }} diff --git a/layouts/partials/games/table-header.html b/layouts/partials/games/table-header.html index 53d51ea..d0f9c21 100644 --- a/layouts/partials/games/table-header.html +++ b/layouts/partials/games/table-header.html @@ -3,6 +3,8 @@ Platform(s) Release Year {{ if ( not ( eq ( .Scratch.Get "listMode" ) "wishlist" ) ) }} - Level of Completion + {{ if ( not ( eq ( .Scratch.Get "listMode" ) "current" ) ) }} + Level of Completion + {{ end }} Dates Played {{ end }} diff --git a/layouts/partials/stats.html b/layouts/partials/stats.html index 4c2da90..e1f06a9 100644 --- a/layouts/partials/stats.html +++ b/layouts/partials/stats.html @@ -3,49 +3,47 @@ {{- $log_file := index ( index $.Site.Data $section ) $list_mode -}} {{- if $log_file -}} - {{- $total := len $log_file -}} + {{- $total := len $log_file -}} - {{- $today := time.Now -}} + {{- $today := time.Now -}} - {{- - $this_year_total := ( - where ( - where $log_file "date_finished" "gt" ( - ( $today.AddDate -1 0 0 ).Format "2006-01-02" - ) - ) "date_finished" "lt" ( $today.Format "2006-01-02" ) - ) | len - -}} + {{- $this_year_total := ( + where ( + where $log_file "date_finished" "gt" ( + ( $today.AddDate -1 0 0 ).Format "2006-01-02" + ) + ) "date_finished" "lt" ( $today.Format "2006-01-02" ) + ) | len + -}} - {{- - $this_quarter_total := ( - where ( - where $log_file "date_finished" "gt" ( - ( $today.AddDate 0 -3 0 ).Format "2006-01-02" - ) - ) "date_finished" "lt" ( $today.Format "2006-01-02" ) - ) | len - -}} - {{- - $this_month_total := ( - where ( - where $log_file "date_finished" "gt" ( - ( $today.AddDate 0 -1 0 ).Format "2006-01-02" - ) - ) "date_finished" "lt" ( $today.Format "2006-01-02" ) - ) | len - -}} + {{- $this_quarter_total := ( + where ( + where $log_file "date_finished" "gt" ( + ( $today.AddDate 0 -3 0 ).Format "2006-01-02" + ) + ) "date_finished" "lt" ( $today.Format "2006-01-02" ) + ) | len + -}} + {{- $this_month_total := ( + where ( + where $log_file "date_finished" "gt" ( + ( $today.AddDate 0 -1 0 ).Format "2006-01-02" + ) + ) "date_finished" "lt" ( $today.Format "2006-01-02" ) + ) | len + -}} -
- Summary -
-

Total: {{ lang.FormatNumber 0 $total }}

- {{- if eq $list_mode "log" -}} -

Last 12 months: {{ lang.FormatNumber 0 $this_year_total }}

-

Last 3 months: {{ lang.FormatNumber 0 $this_quarter_total }}

-

Last month: {{ lang.FormatNumber 0 $this_month_total }}

- {{- end -}} -
-
+
+ Summary + +
+

Total: {{ lang.FormatNumber 0 $total }}

+ {{- if eq $list_mode "log" -}} +

Last 12 months: {{ lang.FormatNumber 0 $this_year_total }}

+

Last 3 months: {{ lang.FormatNumber 0 $this_quarter_total }}

+

Last month: {{ lang.FormatNumber 0 $this_month_total }}

+ {{- end -}} +
+
{{- end -}}