summaryrefslogtreecommitdiff
path: root/layouts/partials
diff options
context:
space:
mode:
authormms <michal@sapka.me>2023-12-08 21:16:07 +0100
committermms <michal@sapka.me>2023-12-08 21:16:07 +0100
commiteb8bf81fc0bc03b5cd67545dd56f77376297a1da (patch)
tree59a1d1f3afad2a92e70bcd493dbffe1a9ba032f0 /layouts/partials
parentec5bbb879bac8c635f67aa3acaf6367e82d1dffc (diff)
feat: digital ownership
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/article_index.html6
-rw-r--r--layouts/partials/article_list_abstract_item.html14
-rw-r--r--layouts/partials/back_nav.html23
3 files changed, 32 insertions, 11 deletions
diff --git a/layouts/partials/article_index.html b/layouts/partials/article_index.html
new file mode 100644
index 0000000..77d6db8
--- /dev/null
+++ b/layouts/partials/article_index.html
@@ -0,0 +1,6 @@
+{{ .Page.Content }}
+
+{{- $article_category := slice "article" }}
+{{- range (where .Site.RegularPages ".Params.category" "intersect" $article_category) }}
+ {{- partial "partials/article_list_abstract_item.html" . }}
+{{- end }}
diff --git a/layouts/partials/article_list_abstract_item.html b/layouts/partials/article_list_abstract_item.html
new file mode 100644
index 0000000..c429e1a
--- /dev/null
+++ b/layouts/partials/article_list_abstract_item.html
@@ -0,0 +1,14 @@
+
+<article class="article-abstract-list-item">
+ <h2> <a href="{{ .Page.Permalink }}"> {{ .Title }}</a></h2>
+ <a href="{{ .Page.Permalink }}">
+ {{ .Page.Params.abstract }}
+ <aside>
+ Publish date:
+ <time datetime="{{.PublishDate.Format "2006-01-02" }}">
+ {{ .PublishDate.Format "January 2, 2006" }}
+ </time>.<br>
+ Length: {{ .Page.WordCount }} words.
+ </aside>
+ </a>
+</article>
diff --git a/layouts/partials/back_nav.html b/layouts/partials/back_nav.html
index 6358a10..f4d26cc 100644
--- a/layouts/partials/back_nav.html
+++ b/layouts/partials/back_nav.html
@@ -1,20 +1,21 @@
-{{ if not .Page.Params.noback }}
+{{- if not .Page.Params.noback }}
<nav class="back-link">
-{{ if .Page.Params.hardback }}
+{{- if .Page.Params.hardback }}
<a href="/">&larr; back to Homepage</a>
-{{ else if in .Page.Params.category "star-trek" }}
+{{- else if in .Page.Params.category "star-trek" }}
<a href="/star-trek/">&larr; back to Space Cadet Log</a>
-{{ else if in .Page.Params.Category "site-info" }}
+{{- else if in .Page.Params.Category "site-info" }}
<a href="/site/">&larr; Back to Site Info</a>
-{{ else if in .Page.Params.Category "bsd" }}
+{{- else if in .Page.Params.Category "bsd" }}
<a href="/bsd/">&larr; Back to Daemonic BSD Site</a>
-{{ else if in .Page.Params.Category "blog" }}
+{{- else if in .Page.Params.Category "blog" }}
<a href="/blog/">&larr; Back to Michal's blog</a>
-{{ end }}
-
-{{ if not .Page.Params.hardback }}
+{{- else if in .Page.Params.Category "article" }}
+ <a href="/articles/">&larr; Back to Article Library</a>
+{{- end }}
+{{- if not .Page.Params.hardback }}
<br>
<a href="/">&#x219e; back to Homepage</a>
-{{ end }}
+{{- end }}
</nav>
-{{ end }}
+{{- end }}