summaryrefslogtreecommitdiff
path: root/layouts
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
parentec5bbb879bac8c635f67aa3acaf6367e82d1dffc (diff)
feat: digital ownership
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html5
-rw-r--r--layouts/_default/index.html5
-rw-r--r--layouts/_default/list.html2
-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
6 files changed, 42 insertions, 13 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 9092d68..fe8c5e4 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -50,6 +50,8 @@
{{ $section_class = "bsd" }}
{{ else if in .Page.Params.category "blog" }}
{{ $section_class = "blog" }}
+ {{ else if in .Page.Params.category "article" }}
+ {{ $section_class = "article" }}
{{ end }}
<body class="{{ $section_class }}">
<header>
@@ -63,6 +65,9 @@
{{ else if in .Page.Params.category "blog" }}
{{ $logo := resources.Get "logos/logo-blog-white.svg" }}
<img src="{{$logo.RelPermalink}}" class="blogicon">
+ {{ else if in .Page.Params.category "article" }}
+ {{ $logo := resources.Get "logos/logo-article-white.svg" }}
+ <img src="{{$logo.RelPermalink}}" class="files">
{{ end }}
</div>
diff --git a/layouts/_default/index.html b/layouts/_default/index.html
index 008a958..fc8e840 100644
--- a/layouts/_default/index.html
+++ b/layouts/_default/index.html
@@ -21,11 +21,12 @@ Hey! I'm Michał Sapka, a computer programmer living in Kraków, Poland. This we
<nav>
<P><a class="sec-link" href="/blog/"><b>Blog</b>: my shorter publications withount any theme. You can treat it as E/N site.</a> </p>
- <P><a class="sec-link" href="/bsd/"><b>BSD site</b>: my writings on Berkley Standard Distribution flabors. OSes I use at the daily basis.</a> </p>
+ <P><a class="sec-link" href="/articles/"><b>Articles</b>: longer publications that don't fit blog or any other category.</a> </p>
+ <P><a class="sec-link" href="/bsd/"><b>BSD site</b>: my writings on Berkley Standard Distribution flavors. Those are the OSes I use on the daily basis.</a> </p>
<P><a class="sec-link" href="/star-trek/"><b>Star Trek fan site</b>: my little shrine to the greatest american Sci-Fi that has ever graced our screens.</a> </p>
<P><a class="sec-link" href="/funnies/"><b>Funnies</b>: A small, curated collection of things I found funny or ammusing.</a> </p>
<p><a class="sec-link" href="/vcs/git/"><b>Version control system</b> : My little code repository. I don't expect to cooporate on any of those, so it's just stagit.</a></p>
- <p><a class="sec-link" href="/site/"><b>Site info</b> : you can find site uptates, metrics, statics, and legal thingies here.</a></p>
+ <p><a class="sec-link" href="/site/"><b>Site info</b> : you can find site updates, metrics, statics, and legal thingies here.</a></p>
</nav>
<h2>TOC</h2>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index f1fd111..c26c0c8 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -2,6 +2,8 @@
{{ if in .Page.Params.Category "blog" }}
{{ partial "partials/blog_index.html" . }}
+ {{ else if in .Page.Params.Category "article" }}
+ {{ partial "partials/article_index.html" . }}
{{ else }}
<h2>Articles</h2>
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 }}