diff options
| -rw-r--r-- | README.md | 12 | ||||
| -rw-r--r-- | archetypes/changelog.md | 15 | ||||
| -rw-r--r-- | archetypes/guide-post.md | 5 | ||||
| -rw-r--r-- | archetypes/project.md | 9 | ||||
| -rw-r--r-- | archetypes/recipe.md | 7 | ||||
| -rw-r--r-- | assets/css/main.css | 4 | ||||
| -rw-r--r-- | config.toml | 3 | ||||
| -rw-r--r-- | layouts/_default/single.html | 2 | ||||
| -rw-r--r-- | layouts/book/list.html | 7 | ||||
| -rw-r--r-- | layouts/book/single.html | 23 | ||||
| -rw-r--r-- | layouts/book/summary.html | 4 |
11 files changed, 51 insertions, 40 deletions
| @@ -4,4 +4,14 @@ A hugo theme built from the ground up for my personal site. | |||
| 4 | 4 | ||
| 5 | ## Features | 5 | ## Features |
| 6 | 6 | ||
| 7 | - Responsive \ No newline at end of file | 7 | - [x] responsive |
| 8 | - [x] dark/light mode | ||
| 9 | - [x] fullscreen mode | ||
| 10 | - [x] various content types | ||
| 11 | - [ ] Accessibility | ||
| 12 | |||
| 13 | ## Content Types | ||
| 14 | |||
| 15 | - [x] posts | ||
| 16 | - [x] guides | ||
| 17 | - [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 @@ | |||
| 1 | --- | ||
| 2 | title: {{ .Date }} | ||
| 3 | date: {{ .Date }} | ||
| 4 | draft: true | ||
| 5 | --- | ||
| 6 | |||
| 7 | ## Changes | ||
| 8 | |||
| 9 | - Change 1 | ||
| 10 | - Change 2 | ||
| 11 | |||
| 12 | ## Notes | ||
| 13 | |||
| 14 | - Note 1 | ||
| 15 | - 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 @@ | |||
| 1 | --- | ||
| 2 | title: "{{ replace .Name "-" " " | title }}" | ||
| 3 | date: {{ .Date }} | ||
| 4 | draft: true | ||
| 5 | --- \ 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 @@ | |||
| 1 | --- | ||
| 2 | title: "{{ replace .File.ContentBaseName "-" " " | title }}" | ||
| 3 | date: {{ .Date }} | ||
| 4 | image: "" | ||
| 5 | draft: true | ||
| 6 | categories: ["projects"] | ||
| 7 | dontDisclaim: true | ||
| 8 | description: "An informal specification for the {{ replace .File.ContentBaseName "-" " " | title }} project" | ||
| 9 | --- | ||
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 @@ | |||
| 1 | --- | ||
| 2 | title: "{{ replace .Name "-" " " | title }}" | ||
| 3 | date: {{ .Date }} | ||
| 4 | draft: true | ||
| 5 | categories: | ||
| 6 | - Recipes | ||
| 7 | --- \ 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 { | |||
| 148 | padding: .5em .5em; | 148 | padding: .5em .5em; |
| 149 | color: white; | 149 | color: white; |
| 150 | } | 150 | } |
| 151 | |||
| 152 | .footnotes p { | ||
| 153 | margin: 0; | ||
| 154 | } \ 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 @@ | |||
| 6 | 6 | ||
| 7 | [params] | 7 | [params] |
| 8 | _merge = 'deep' | 8 | _merge = 'deep' |
| 9 | themeVersion = '0.1' \ No newline at end of file | 9 | themeVersion = 0.1 |
| 10 | \ 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 @@ | |||
| 1 | {{ define "main" }} | 1 | {{ define "main" }} |
| 2 | <hgroup> | 2 | <hgroup> |
| 3 | <h1>{{- .Title -}}</h1> | 3 | <h1>{{- .Title -}}</h1> |
| 4 | <p>Some dude on the internet with—like—opinions and stuff</p> | 4 | <p>Some dude on the internet with–like–opinions and stuff</p> |
| 5 | </hgroup> | 5 | </hgroup> |
| 6 | <section class="content"> | 6 | <section class="content"> |
| 7 | {{- .Content -}} | 7 | {{- .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 @@ | |||
| 1 | {{ define "main" }} | 1 | {{ define "main" }} |
| 2 | <h1>{{ .Title }}</h1> | 2 | <hgroup> |
| 3 | <h1>{{ .Title }}</h1> | ||
| 4 | <p>Books I have read. Rated with the five star system.</p> | ||
| 5 | </hgroup> | ||
| 3 | {{ if .Content }} | 6 | {{ if .Content }} |
| 4 | <p>{{- .Content -}}</p> | 7 | <p>{{- .Content -}}</p> |
| 5 | {{ end }} | 8 | {{ end }} |
| @@ -28,4 +31,4 @@ | |||
| 28 | {{ end }} | 31 | {{ end }} |
| 29 | {{ end }} | 32 | {{ end }} |
| 30 | </section> | 33 | </section> |
| 31 | {{ end }} \ No newline at end of file | 34 | {{ 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 @@ | |||
| 21 | {{ errorf "unable to get remote resource %q" .Params.image }} | 21 | {{ errorf "unable to get remote resource %q" .Params.image }} |
| 22 | {{ end }} | 22 | {{ end }} |
| 23 | {{ end }} | 23 | {{ end }} |
| 24 | {{ if isset .Params "amazon" }} | 24 | <div class="flex row gap-1"> |
| 25 | <p> | 25 | <strong>Rating:</strong> |
| 26 | <a href="{{ .Params.amazon }}" target="_blank">amazon</a> | ||
| 27 | </p> | ||
| 28 | {{ end }} | ||
| 29 | <div> | ||
| 30 | <p>Rating: </p> | ||
| 31 | {{ if isset .Params "rating" }} | 26 | {{ if isset .Params "rating" }} |
| 32 | {{ $rating := .Params.rating }} | 27 | {{ $rating := .Params.rating }} |
| 33 | {{ range $i, $num := (seq $rating) }} | 28 | {{ range (seq $rating) }} |
| 34 | ⭐ | 29 | ⭐ |
| 35 | {{ end }} | 30 | {{ end }} |
| 31 | {{ $diff := sub 5 $rating }} | ||
| 32 | {{ range (seq $diff) }} | ||
| 33 | ☆ | ||
| 34 | {{ end }} | ||
| 36 | {{ else }} | 35 | {{ else }} |
| 37 | <p>N/A</p> | 36 | <p>N/A</p> |
| 38 | {{ end }} | 37 | {{ end }} |
| 39 | </div> | 38 | </div> |
| 39 | {{ if isset .Params "amazon" }} | ||
| 40 | <p> | ||
| 41 | <a href="{{ .Params.amazon }}" target="_blank">amazon</a> | ||
| 42 | </p> | ||
| 43 | {{ end }} | ||
| 44 | <div> | ||
| 45 | {{- .Content -}} | ||
| 46 | </div> | ||
| 40 | {{ end }} \ No newline at end of file | 47 | {{ 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 @@ | |||
| 17 | {{ end }} | 17 | {{ end }} |
| 18 | <hgroup> | 18 | <hgroup> |
| 19 | <h3 class="f3 near-black"> | 19 | <h3 class="f3 near-black"> |
| 20 | {{ if .Content }} | ||
| 20 | <a href="{{ .RelPermalink }}" class="link black dim"> | 21 | <a href="{{ .RelPermalink }}" class="link black dim"> |
| 21 | {{ .Title }} | 22 | {{ .Title }} |
| 22 | </a> | 23 | </a> |
| 24 | {{ else }} | ||
| 25 | {{ .Title }} | ||
| 26 | {{ end }} | ||
| 23 | </h3> | 27 | </h3> |
| 24 | <p>Rating: {{ .Params.rating }} / 5</p> | 28 | <p>Rating: {{ .Params.rating }} / 5</p> |
| 25 | {{ with .Params.last_read }} | 29 | {{ with .Params.last_read }} |
