diff options
author | Zach Berwaldt <zberwaldt@tutamail.com> | 2023-10-12 08:08:37 -0400 |
---|---|---|
committer | Zach Berwaldt <zberwaldt@tutamail.com> | 2023-10-12 08:08:37 -0400 |
commit | 6e6412e4a693ddc2da5e4611363fb882ad6497be (patch) | |
tree | 8c151abcd68613d477773cc6552eeaa22a70e8ea | |
parent | d0e7f43601e90229b95191a1cdc85039e233b622 (diff) |
Switch to light theme. remove articles.
-rw-r--r-- | assets/css/main.css | 12 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 2 | ||||
-rw-r--r-- | layouts/_default/list.html | 44 | ||||
-rw-r--r-- | layouts/_default/single.html | 15 | ||||
-rw-r--r-- | layouts/_default/summary.html | 9 | ||||
-rw-r--r-- | layouts/book/list.html | 2 | ||||
-rw-r--r-- | layouts/book/single.html | 61 | ||||
-rw-r--r-- | layouts/index.html | 4 | ||||
-rw-r--r-- | layouts/partials/updated_posts.html | 17 | ||||
-rw-r--r-- | layouts/post/single.html | 5 |
10 files changed, 96 insertions, 75 deletions
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 { | |||
6 | min-height: 100vh; | 6 | min-height: 100vh; |
7 | } | 7 | } |
8 | 8 | ||
9 | body::-webkit-scrollbar { | ||
10 | display: none;; | ||
11 | } | ||
12 | |||
13 | #content { | ||
14 | width: 65ch; | ||
15 | } | ||
16 | |||
17 | #content::first-letter { | ||
18 | initial-letter: 2; | ||
19 | } | ||
20 | |||
9 | main { | 21 | main { |
10 | height: inherit; | 22 | height: inherit; |
11 | display: flex; | 23 | 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 @@ | |||
1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
2 | <html lang="en" data-theme="dark"> | 2 | <html lang="en" data-theme="light"> |
3 | {{- partial "head.html" . -}} | 3 | {{- partial "head.html" . -}} |
4 | <body> | 4 | <body> |
5 | {{- partial "site-actions" . -}} | 5 | {{- 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 @@ | |||
1 | {{ define "main" }} | 1 | {{ define "main" }} |
2 | <article> | 2 | <h1>{{ .Title }}</h1> |
3 | <h1>{{ .Title }}</h1> | 3 | {{ if .Content }} |
4 | {{ if .Content }} | 4 | <p>{{ .Content }}</p> |
5 | <p>{{ .Content }}</p> | 5 | {{ end }} |
6 | <section> | ||
7 | {{ range sort (.Paginator 3).Pages "Date" "desc" }} | ||
8 | <div>{{ .Render "summary" }}</div> | ||
6 | {{ end }} | 9 | {{ end }} |
7 | <section> | 10 | {{ with .Paginator }} |
8 | {{ range sort (.Paginator 3).Pages "Date" "desc" }} | 11 | <div class="grid"> |
9 | <div>{{ .Render "summary" }}</div> | 12 | <div class='flex'> |
13 | {{ if .HasPrev }} | ||
14 | <a href="{{ .Prev.URL }}">prev</a> | ||
10 | {{ end }} | 15 | {{ end }} |
11 | {{ with .Paginator }} | 16 | {{ if (or (.HasPrev) (.HasNext)) }} |
12 | <div class="grid"> | 17 | <p>{{ .PageNumber }} of {{ .TotalPages }}</p> |
13 | <div class='flex'> | 18 | {{ end }} |
14 | {{ if .HasPrev }} | 19 | {{ if .HasNext }} |
15 | <a href="{{ .Prev.URL }}">prev</a> | 20 | <a href="{{ .Next.URL }}">next</a> |
16 | {{ end }} | ||
17 | {{ if (or (.HasPrev) (.HasNext)) }} | ||
18 | <p>{{ .PageNumber }} of {{ .TotalPages }}</p> | ||
19 | {{ end }} | ||
20 | {{ if .HasNext }} | ||
21 | <a href="{{ .Next.URL }}">next</a> | ||
22 | {{ end }} | ||
23 | </div> | ||
24 | </div> | ||
25 | {{ end }} | 21 | {{ end }} |
26 | </section> | 22 | </div> |
27 | </article> | 23 | </div> |
24 | {{ end }} | ||
25 | </section> | ||
28 | {{ end }} | 26 | {{ 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 @@ | |||
1 | {{ define "main" }} | 1 | {{ define "main" }} |
2 | <article> | 2 | <hgroup> |
3 | <section> | 3 | <h1>{{- .Title -}}</h1> |
4 | <h1>{{- .Title -}}</h1> | 4 | <p>Some dude on the internet with—like—opinions and stuff</p> |
5 | </section> | 5 | </hgroup> |
6 | <section class="content"> | 6 | <section class="content"> |
7 | {{- .Content -}} | 7 | {{- .Content -}} |
8 | </section> | 8 | </section> |
9 | </article> | ||
10 | {{ end }} | 9 | {{ 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 @@ | |||
9 | {{ end }} | 9 | {{ end }} |
10 | </h1> | 10 | </h1> |
11 | <p> | 11 | <p> |
12 | {{ .Date | time.Format ":date_full" }} | 12 | <span>{{ .WordCount }} words</span> |
13 | <span>{{ .ReadingTime }} min read</span> | ||
13 | </p> | 14 | </p> |
14 | <div> | 15 | <p>Published: {{ .Date | time.Format ":date_full" }} |
15 | {{ .Summary | markdownify }} | 16 | </p> |
16 | </div> | 17 | <div>{{ .Summary | markdownify }}</div> |
17 | </div> | 18 | </div> |
18 | </div> | 19 | </div> |
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 @@ | |||
2 | <article> | 2 | <article> |
3 | <h1>{{ .Title }}</h1> | 3 | <h1>{{ .Title }}</h1> |
4 | {{ if .Content }} | 4 | {{ if .Content }} |
5 | <p>{{- .Content -}}</p> | 5 | <p>{{- .Content -}}</p> |
6 | {{ end }} | 6 | {{ end }} |
7 | <section> | 7 | <section> |
8 | {{ if .IsSection }} | 8 | {{ 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 @@ | |||
1 | {{ define "main" }} | 1 | {{ define "main" }} |
2 | <article> | 2 | <hgroup> |
3 | <h1>{{ .Title }}</h1> | 3 | <h1>{{ .Title }}</h1> |
4 | <h4>{{ .Params.author }}</h4> | ||
5 | <h6>{{ .Date | time.Format ":date_full" }}</h6> | 4 | <h6>{{ .Date | time.Format ":date_full" }}</h6> |
6 | {{ if isset .Params "image" }} | 5 | </hgroup> |
7 | {{ with resources.GetRemote .Params.image }} | 6 | {{ if isset .Params "image" }} |
8 | {{ with .Err }} | 7 | {{ with resources.GetRemote .Params.image }} |
9 | {{ errorf "%s" . }} | 8 | {{ with .Err }} |
10 | {{ else }} | 9 | {{ errorf "%s" . }} |
11 | <img | ||
12 | src="{{ .RelPermalink }}" | ||
13 | width="{{ .Width }}" | ||
14 | height="{{ .Height }}" | ||
15 | alt="Book cover of the book {{ .Title }}" | ||
16 | /> | ||
17 | {{ end }} | ||
18 | {{ else }} | 10 | {{ else }} |
19 | {{ errorf "unable to get remote resource %q" .Params.image }} | 11 | <img |
12 | src="{{ .RelPermalink }}" | ||
13 | width="{{ .Width }}" | ||
14 | height="{{ .Height }}" | ||
15 | alt="Book cover of the book {{ .Title }}" | ||
16 | /> | ||
20 | {{ end }} | 17 | {{ end }} |
18 | {{ else }} | ||
19 | {{ errorf "unable to get remote resource %q" .Params.image }} | ||
20 | {{ end }} | ||
21 | {{ end }} | ||
22 | {{ if isset .Params "amazon" }} | ||
23 | <p> | ||
24 | <a href="{{ .Params.amazon }}" target="_blank">amazon</a> | ||
25 | </p> | ||
26 | {{ end }} | ||
27 | <div> | ||
28 | <p>Rating: </p> | ||
29 | {{ if isset .Params "rating" }} | ||
30 | {{ $rating := .Params.rating }} | ||
31 | {{ range $i, $num := (seq $rating) }} | ||
32 | ⭐ | ||
21 | {{ end }} | 33 | {{ end }} |
22 | {{ if isset .Params "amazon" }} | 34 | {{ else }} |
23 | <p> | 35 | <p>N/A</p> |
24 | <a href="{{ .Params.amazon }}" target="_blank">amazon</a> | ||
25 | </p> | ||
26 | {{ end }} | 36 | {{ end }} |
27 | <div> | 37 | </div> |
28 | <p>Rating: </p> | ||
29 | {{ if isset .Params "rating" }} | ||
30 | {{ $rating := .Params.rating }} | ||
31 | {{ range $i, $num := (seq $rating) }} | ||
32 | ⭐ | ||
33 | {{ end }} | ||
34 | {{ else }} | ||
35 | <p>N/A</p> | ||
36 | {{ end }} | ||
37 | </div> | ||
38 | </article> | ||
39 | {{ end }} \ No newline at end of file | 38 | {{ 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 @@ | |||
1 | {{ define "main" }} | 1 | {{ define "main" }} |
2 | <div> | ||
3 | <article> | ||
4 | {{- .Content -}} | 2 | {{- .Content -}} |
5 | </article> | ||
6 | </div> | ||
7 | {{ end }} | 3 | {{ 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 @@ | |||
1 | {{ $lastBuildTime := time "2021-09-08T12:51:38-0400" }} | ||
2 | {{ $updatedPosts := slice }} | ||
3 | |||
4 | {{ range .Site.Pages }} | ||
5 | {{ if .Lastmod.After $lastBuildTime }} | ||
6 | <li>{{ .Title }} - {{ .Lastmod }}</li> | ||
7 | {{ end }} | ||
8 | {{ end }} | ||
9 | |||
10 | <h2>Updated Posts:</h2> | ||
11 | <ul> | ||
12 | {{ range $updatedPosts }} | ||
13 | <li>{{ . }}</li> | ||
14 | {{ end }} | ||
15 | </ul> | ||
16 | |||
17 | {{ $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 @@ | |||
1 | {{ define "main" }} | 1 | {{ define "main" }} |
2 | <article> | 2 | <hgroup> |
3 | <section> | ||
4 | <h1>{{ .Title }}</h1> | 3 | <h1>{{ .Title }}</h1> |
5 | <h6>{{ .Date | time.Format ":date_full" }}</h6> | 4 | <h6>{{ .Date | time.Format ":date_full" }}</h6> |
6 | </section> | 5 | </hgroup> |
7 | <section class="content"> | 6 | <section class="content"> |
8 | {{- .Content -}} | 7 | {{- .Content -}} |
9 | </section> | 8 | </section> |