From eb8bf81fc0bc03b5cd67545dd56f77376297a1da Mon Sep 17 00:00:00 2001 From: mms Date: Fri, 8 Dec 2023 21:16:07 +0100 Subject: feat: digital ownership --- layouts/_default/baseof.html | 5 +++++ layouts/_default/index.html | 5 +++-- layouts/_default/list.html | 2 ++ layouts/partials/article_index.html | 6 ++++++ layouts/partials/article_list_abstract_item.html | 14 ++++++++++++++ layouts/partials/back_nav.html | 23 ++++++++++++----------- 6 files changed, 42 insertions(+), 13 deletions(-) create mode 100644 layouts/partials/article_index.html create mode 100644 layouts/partials/article_list_abstract_item.html (limited to 'layouts') 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 }}
@@ -63,6 +65,9 @@ {{ else if in .Page.Params.category "blog" }} {{ $logo := resources.Get "logos/logo-blog-white.svg" }} + {{ else if in .Page.Params.category "article" }} + {{ $logo := resources.Get "logos/logo-article-white.svg" }} + {{ end }} 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

TOC

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 }}

Articles

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 @@ + + 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 }} -{{ end }} +{{- end }} -- cgit v1.2.3