From 6e6412e4a693ddc2da5e4611363fb882ad6497be Mon Sep 17 00:00:00 2001 From: Zach Berwaldt Date: Thu, 12 Oct 2023 08:08:37 -0400 Subject: Switch to light theme. remove articles. --- assets/css/main.css | 12 ++++++++ layouts/_default/baseof.html | 2 +- layouts/_default/list.html | 44 +++++++++++++------------- layouts/_default/single.html | 15 +++++---- layouts/_default/summary.html | 9 +++--- layouts/book/list.html | 2 +- layouts/book/single.html | 61 ++++++++++++++++++------------------- layouts/index.html | 4 --- layouts/partials/updated_posts.html | 17 +++++++++++ layouts/post/single.html | 5 ++- 10 files changed, 96 insertions(+), 75 deletions(-) create mode 100644 layouts/partials/updated_posts.html diff --git a/assets/css/main.css b/assets/css/main.css index af25dae..4574690 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -6,6 +6,18 @@ body { min-height: 100vh; } +body::-webkit-scrollbar { + display: none;; +} + +#content { + width: 65ch; +} + +#content::first-letter { + initial-letter: 2; +} + main { height: inherit; display: flex; diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index cceaa25..acb6c6a 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,5 +1,5 @@ - + {{- partial "head.html" . -}} {{- partial "site-actions" . -}} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index c265f91..065f708 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,28 +1,26 @@ {{ define "main" }} -
-

{{ .Title }}

- {{ if .Content }} -

{{ .Content }}

+

{{ .Title }}

+ {{ if .Content }} +

{{ .Content }}

+ {{ end }} +
+ {{ range sort (.Paginator 3).Pages "Date" "desc" }} +
{{ .Render "summary" }}
{{ end }} -
- {{ range sort (.Paginator 3).Pages "Date" "desc" }} -
{{ .Render "summary" }}
+ {{ with .Paginator }} +
+
+ {{ if .HasPrev }} + prev {{ end }} - {{ with .Paginator }} -
-
- {{ if .HasPrev }} - prev - {{ end }} - {{ if (or (.HasPrev) (.HasNext)) }} -

{{ .PageNumber }} of {{ .TotalPages }}

- {{ end }} - {{ if .HasNext }} - next - {{ end }} -
-
+ {{ if (or (.HasPrev) (.HasNext)) }} +

{{ .PageNumber }} of {{ .TotalPages }}

+ {{ end }} + {{ if .HasNext }} + next {{ end }} -
-
+ + + {{ end }} + {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 996ad9e..49137fb 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,10 +1,9 @@ {{ define "main" }} -
-
-

{{- .Title -}}

-
-
- {{- .Content -}} -
-
+
+

{{- .Title -}}

+

Some dude on the internet with—like—opinions and stuff

+
+
+ {{- .Content -}} +
{{ end }} diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index 5e4ac4b..4512b16 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -9,10 +9,11 @@ {{ end }}

- {{ .Date | time.Format ":date_full" }} + {{ .WordCount }} words + {{ .ReadingTime }} min read

-
- {{ .Summary | markdownify }} -
+

Published: {{ .Date | time.Format ":date_full" }} +

+
{{ .Summary | markdownify }}
diff --git a/layouts/book/list.html b/layouts/book/list.html index 628d8b8..346a918 100644 --- a/layouts/book/list.html +++ b/layouts/book/list.html @@ -2,7 +2,7 @@

{{ .Title }}

{{ if .Content }} -

{{- .Content -}}

+

{{- .Content -}}

{{ end }}
{{ if .IsSection }} diff --git a/layouts/book/single.html b/layouts/book/single.html index 0bbd265..66456e1 100644 --- a/layouts/book/single.html +++ b/layouts/book/single.html @@ -1,39 +1,38 @@ {{ define "main" }} -
+

{{ .Title }}

-

{{ .Params.author }}

{{ .Date | time.Format ":date_full" }}
- {{ if isset .Params "image" }} - {{ with resources.GetRemote .Params.image }} - {{ with .Err }} - {{ errorf "%s" . }} - {{ else }} - Book cover of the book {{ .Title }} - {{ end }} +
+ {{ if isset .Params "image" }} + {{ with resources.GetRemote .Params.image }} + {{ with .Err }} + {{ errorf "%s" . }} {{ else }} - {{ errorf "unable to get remote resource %q" .Params.image }} + Book cover of the book {{ .Title }} {{ end }} + {{ else }} + {{ errorf "unable to get remote resource %q" .Params.image }} + {{ end }} + {{ end }} + {{ if isset .Params "amazon" }} +

+ amazon +

+ {{ end }} +
+

Rating:

+ {{ if isset .Params "rating" }} + {{ $rating := .Params.rating }} + {{ range $i, $num := (seq $rating) }} + ⭐ {{ end }} - {{ if isset .Params "amazon" }} -

- amazon -

+ {{ else }} +

N/A

{{ end }} -
-

Rating:

- {{ if isset .Params "rating" }} - {{ $rating := .Params.rating }} - {{ range $i, $num := (seq $rating) }} - ⭐ - {{ end }} - {{ else }} -

N/A

- {{ end }} -
-
+ {{ end }} \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index 2f86fca..7d9bf2a 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,7 +1,3 @@ {{ define "main" }} -
-
{{- .Content -}} -
-
{{ end }} diff --git a/layouts/partials/updated_posts.html b/layouts/partials/updated_posts.html new file mode 100644 index 0000000..7010a5b --- /dev/null +++ b/layouts/partials/updated_posts.html @@ -0,0 +1,17 @@ +{{ $lastBuildTime := time "2021-09-08T12:51:38-0400" }} +{{ $updatedPosts := slice }} + +{{ range .Site.Pages }} + {{ if .Lastmod.After $lastBuildTime }} +
  • {{ .Title }} - {{ .Lastmod }}
  • + {{ end }} +{{ end }} + +

    Updated Posts:

    +
      + {{ range $updatedPosts }} +
    • {{ . }}
    • + {{ end }} +
    + +{{ $currentTime := now.UTC }} diff --git a/layouts/post/single.html b/layouts/post/single.html index f2a333e..166ecd6 100644 --- a/layouts/post/single.html +++ b/layouts/post/single.html @@ -1,9 +1,8 @@ {{ define "main" }} -
    -
    +

    {{ .Title }}

    {{ .Date | time.Format ":date_full" }}
    -
    +
    {{- .Content -}}
    -- cgit v1.1