aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LICENSE20
-rw-r--r--README.md5
-rw-r--r--archetypes/book.md7
-rw-r--r--archetypes/post.md2
-rw-r--r--assets/css/main.css8
-rw-r--r--config.toml8
-rw-r--r--layouts/book/list.html2
-rw-r--r--layouts/book/single.html14
-rw-r--r--layouts/book/summary.html29
-rw-r--r--layouts/partials/header.html8
-rw-r--r--layouts/post/single.html3
11 files changed, 68 insertions, 38 deletions
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 17993f6..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
1The MIT License (MIT)
2
3Copyright (c) 2023 YOUR_NAME_HERE
4
5Permission is hereby granted, free of charge, to any person obtaining a copy of
6this software and associated documentation files (the "Software"), to deal in
7the Software without restriction, including without limitation the rights to
8use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9the Software, and to permit persons to whom the Software is furnished to do so,
10subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in all
13copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
index 597b8b4..e1e8bb1 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,7 @@
1# Blackbear, a hugo theme. 1# Blackbear, a hugo theme.
2 2
3A hugo theme built from the ground up for my personal site. It is not open source. You do not have permission to use it. 3A hugo theme built from the ground up for my personal site.
4 4
5## Features 5## Features
6 6
7- Responsive 7- Responsive \ No newline at end of file
8- Contact form \ No newline at end of file
diff --git a/archetypes/book.md b/archetypes/book.md
index 1c79e82..39928c7 100644
--- a/archetypes/book.md
+++ b/archetypes/book.md
@@ -2,8 +2,15 @@
2title: "{{ replace .File.ContentBaseName "-" " " | title }}" 2title: "{{ replace .File.ContentBaseName "-" " " | title }}"
3author: "" 3author: ""
4image: "" 4image: ""
5description: "Review and notes for {{ replace .File.ContentBaseName "-" " " | title }} by {{ .Params.author }}"
5amazon: "" 6amazon: ""
6rating: 4 7rating: 4
7type: 'book' 8type: 'book'
9genres:
10 - fiction
11categories:
12 - fiction
8date: {{ .Date }} 13date: {{ .Date }}
14last_read: ['{{ dateFormat "2006-01-02" .Date }}']
15headless: true
9--- \ No newline at end of file 16--- \ No newline at end of file
diff --git a/archetypes/post.md b/archetypes/post.md
index 43dca9a..304e9f5 100644
--- a/archetypes/post.md
+++ b/archetypes/post.md
@@ -1,5 +1,7 @@
1--- 1---
2title: "{{ replace .File.ContentBaseName "-" " " | title }}" 2title: "{{ replace .File.ContentBaseName "-" " " | title }}"
3date: {{ .Date }} 3date: {{ .Date }}
4image: ""
5description: "Thoughts about some topic"
4draft: true 6draft: true
5--- 7---
diff --git a/assets/css/main.css b/assets/css/main.css
index 47cb5f5..fff7794 100644
--- a/assets/css/main.css
+++ b/assets/css/main.css
@@ -84,6 +84,14 @@ main {
84 min-width: 250px; 84 min-width: 250px;
85} 85}
86 86
87.gap-1 {
88 gap: 1rem;
89}
90
91.wrap {
92 flex-wrap: wrap;
93}
94
87footer { 95footer {
88 position:relative; 96 position:relative;
89} 97}
diff --git a/config.toml b/config.toml
index c41540e..fb3164e 100644
--- a/config.toml
+++ b/config.toml
@@ -1,3 +1,9 @@
1[taxonomies]
2 _merge = 'deep'
3 tag = 'tags'
4 category = 'categories'
5 genre = 'genres'
6
1[params] 7[params]
2 _merge = 'deep' 8 _merge = 'deep'
3 themeVersion = '0.1' 9 themeVersion = '0.1' \ No newline at end of file
diff --git a/layouts/book/list.html b/layouts/book/list.html
index d1d1263..25976dd 100644
--- a/layouts/book/list.html
+++ b/layouts/book/list.html
@@ -5,7 +5,7 @@
5 {{ end }} 5 {{ end }}
6 <section> 6 <section>
7 {{ if .IsSection }} 7 {{ if .IsSection }}
8 {{ range sort (.Paginator 3).Pages "Date" "desc" }} 8 {{ range sort .Pages "Date" "desc" }}
9 {{ if ne .Layout "list" }} 9 {{ if ne .Layout "list" }}
10 <div>{{ .Render "summary" }}</div> 10 <div>{{ .Render "summary" }}</div>
11 {{ end }} 11 {{ end }}
diff --git a/layouts/book/single.html b/layouts/book/single.html
index 66456e1..baedf32 100644
--- a/layouts/book/single.html
+++ b/layouts/book/single.html
@@ -8,12 +8,14 @@
8 {{ with .Err }} 8 {{ with .Err }}
9 {{ errorf "%s" . }} 9 {{ errorf "%s" . }}
10 {{ else }} 10 {{ else }}
11 <img 11 {{ $image := . }}
12 src="{{ .RelPermalink }}" 12 {{ $image := $image.Resize "250x" }}
13 width="{{ .Width }}" 13 <img
14 height="{{ .Height }}" 14 src="{{ $image.RelPermalink }}"
15 alt="Book cover of the book {{ .Title }}" 15 width="{{ $image.Width }}"
16 /> 16 height="{{ $image.Height }}"
17 alt="Book cover of the book {{ .Title }}"
18 />
17 {{ end }} 19 {{ end }}
18 {{ else }} 20 {{ else }}
19 {{ errorf "unable to get remote resource %q" .Params.image }} 21 {{ errorf "unable to get remote resource %q" .Params.image }}
diff --git a/layouts/book/summary.html b/layouts/book/summary.html
new file mode 100644
index 0000000..900fb87
--- /dev/null
+++ b/layouts/book/summary.html
@@ -0,0 +1,29 @@
1<section class="flex row gap-1">
2 {{ with resources.GetRemote .Params.image }}
3 {{ with .Err }}
4 {{ errorf "%s" . }}
5 {{ else }}
6 {{ $image := . }}
7 {{ $image := $image.Resize "150x" }}
8 <img
9 src="{{ $image.RelPermalink }}"
10 width="{{ $image.Width }}"
11 height="{{ $image.Height }}"
12 alt="Book cover of the book {{ .Title }}"
13 />
14 {{ end }}
15 {{ else }}
16 {{ errorf "unable to get remote resource %q" .Params.image }}
17 {{ end }}
18 <hgroup>
19 <h3 class="f3 near-black">
20 <a href="{{ .RelPermalink }}" class="link black dim">
21 {{ .Title }}
22 </a>
23 </h3>
24 <p>Rating: {{ .Params.rating }} / 5</p>
25 {{ with .Params.last_read }}
26 <p>Last Read: {{ . | time.Format ":date_full" }}</p>
27 {{ end }}
28 </hgroup>
29</section>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 28d3734..0137db1 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,9 +1,9 @@
1<header> 1<header>
2 <div class="container"> 2 <div class="container">
3 <nav> 3 <nav id="nav-main" class="flex wrap">
4 <div class='wordmark'> 4 <div class='wordmark'>
5 {{ .Site.Title }} 5 {{ .Site.Title }}
6 </div> 6 </div>
7 <ul> 7 <ul>
8 {{ range .Site.Menus.main }} 8 {{ range .Site.Menus.main }}
9 <li><a href="{{ .URL }}">{{ .Name }}</a></li> 9 <li><a href="{{ .URL }}">{{ .Name }}</a></li>
diff --git a/layouts/post/single.html b/layouts/post/single.html
index 2c4c23e..ca0f556 100644
--- a/layouts/post/single.html
+++ b/layouts/post/single.html
@@ -2,9 +2,6 @@
2 {{ if not .Params.dontDisclaim }} 2 {{ if not .Params.dontDisclaim }}
3 {{ partial "disclaimer" . }} 3 {{ partial "disclaimer" . }}
4 {{ end }} 4 {{ end }}
5 {{ with .GetTerms "categories" }}
6 {{ (index . 0).RelPermalink }}
7 {{ end }}
8 <hgroup> 5 <hgroup>
9 <h1>{{ .Title }}</h1> 6 <h1>{{ .Title }}</h1>
10 <h6>{{ .Date | time.Format ":date_full" }}</h6> 7 <h6>{{ .Date | time.Format ":date_full" }}</h6>