From ae5fbeb8af153d358b4d13d7e2bdd16061ca5524 Mon Sep 17 00:00:00 2001 From: Zach Berwaldt Date: Mon, 23 Oct 2023 19:29:28 -0400 Subject: update layouts, readme, config --- README.md | 12 +++++++++++- archetypes/changelog.md | 15 --------------- archetypes/guide-post.md | 5 ----- archetypes/project.md | 9 +++++++++ archetypes/recipe.md | 7 ------- assets/css/main.css | 4 ++++ config.toml | 3 ++- layouts/_default/single.html | 2 +- layouts/book/list.html | 7 +++++-- layouts/book/single.html | 23 +++++++++++++++-------- layouts/book/summary.html | 4 ++++ 11 files changed, 51 insertions(+), 40 deletions(-) delete mode 100644 archetypes/changelog.md delete mode 100644 archetypes/guide-post.md create mode 100644 archetypes/project.md delete mode 100644 archetypes/recipe.md diff --git a/README.md b/README.md index e1e8bb1..263eaa2 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,14 @@ A hugo theme built from the ground up for my personal site. ## Features -- Responsive \ No newline at end of file +- [x] responsive +- [x] dark/light mode +- [x] fullscreen mode +- [x] various content types +- [ ] Accessibility + +## Content Types + +- [x] posts +- [x] guides +- [x] reviews (books) diff --git a/archetypes/changelog.md b/archetypes/changelog.md deleted file mode 100644 index 3a002ba..0000000 --- a/archetypes/changelog.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: {{ .Date }} -date: {{ .Date }} -draft: true ---- - -## Changes - -- Change 1 -- Change 2 - -## Notes - -- Note 1 -- Note 2 \ No newline at end of file diff --git a/archetypes/guide-post.md b/archetypes/guide-post.md deleted file mode 100644 index 8e4b597..0000000 --- a/archetypes/guide-post.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "{{ replace .Name "-" " " | title }}" -date: {{ .Date }} -draft: true ---- \ No newline at end of file diff --git a/archetypes/project.md b/archetypes/project.md new file mode 100644 index 0000000..4e1af79 --- /dev/null +++ b/archetypes/project.md @@ -0,0 +1,9 @@ +--- +title: "{{ replace .File.ContentBaseName "-" " " | title }}" +date: {{ .Date }} +image: "" +draft: true +categories: ["projects"] +dontDisclaim: true +description: "An informal specification for the {{ replace .File.ContentBaseName "-" " " | title }} project" +--- diff --git a/archetypes/recipe.md b/archetypes/recipe.md deleted file mode 100644 index 051745e..0000000 --- a/archetypes/recipe.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: "{{ replace .Name "-" " " | title }}" -date: {{ .Date }} -draft: true -categories: - - Recipes ---- \ No newline at end of file diff --git a/assets/css/main.css b/assets/css/main.css index fff7794..e2f171e 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -148,3 +148,7 @@ html[data-theme="light"] #actions button { padding: .5em .5em; color: white; } + +.footnotes p { + margin: 0; +} \ No newline at end of file diff --git a/config.toml b/config.toml index fb3164e..44cf7b3 100644 --- a/config.toml +++ b/config.toml @@ -6,4 +6,5 @@ [params] _merge = 'deep' - themeVersion = '0.1' \ No newline at end of file + themeVersion = 0.1 + \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 49137fb..518e6e2 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,7 +1,7 @@ {{ define "main" }}

{{- .Title -}}

-

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

+

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

{{- .Content -}} diff --git a/layouts/book/list.html b/layouts/book/list.html index 25976dd..dcca1f9 100644 --- a/layouts/book/list.html +++ b/layouts/book/list.html @@ -1,5 +1,8 @@ {{ define "main" }} -

{{ .Title }}

+
+

{{ .Title }}

+

Books I have read. Rated with the five star system.

+
{{ if .Content }}

{{- .Content -}}

{{ end }} @@ -28,4 +31,4 @@ {{ end }} {{ end }}
-{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/book/single.html b/layouts/book/single.html index baedf32..9179523 100644 --- a/layouts/book/single.html +++ b/layouts/book/single.html @@ -21,20 +21,27 @@ {{ errorf "unable to get remote resource %q" .Params.image }} {{ end }} {{ end }} - {{ if isset .Params "amazon" }} -

- amazon -

- {{ end }} -
-

Rating:

+
+ Rating: {{ if isset .Params "rating" }} {{ $rating := .Params.rating }} - {{ range $i, $num := (seq $rating) }} + {{ range (seq $rating) }} ⭐ {{ end }} + {{ $diff := sub 5 $rating }} + {{ range (seq $diff) }} + ☆ + {{ end }} {{ else }}

N/A

{{ end }}
+ {{ if isset .Params "amazon" }} +

+ amazon +

+ {{ end }} +
+ {{- .Content -}} +
{{ end }} \ No newline at end of file diff --git a/layouts/book/summary.html b/layouts/book/summary.html index 900fb87..56f2ea7 100644 --- a/layouts/book/summary.html +++ b/layouts/book/summary.html @@ -17,9 +17,13 @@ {{ end }}

+ {{ if .Content }} {{ .Title }} + {{ else }} + {{ .Title }} + {{ end }}

Rating: {{ .Params.rating }} / 5

{{ with .Params.last_read }} -- cgit v1.1