From c46185654795392977e027abedd3fb4a8de14a8e Mon Sep 17 00:00:00 2001 From: mdn <1stdragon@gmail.com> Date: Mon, 28 Nov 2022 19:58:24 +0100 Subject: [PATCH] =?UTF-8?q?Skills=20bei=20KnowHow=20mit=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++++ layouts/knowhow/list.html | 11 +++++++++++ layouts/knowhow/single.html | 25 +++++++++++++++++++++++++ layouts/partials/metadata.html | 2 +- layouts/partials/metafooter.html | 30 ++++++++++++++++++++++-------- 5 files changed, 63 insertions(+), 9 deletions(-) create mode 100644 layouts/knowhow/single.html diff --git a/README.md b/README.md index 6ec5433..f58a5e7 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ theme = "BlogAMore" [taxonomies] tag = "tags" category = "categories" + skill = "skills" # Weitere Kategorien die benötigt werden mood = "moods" @@ -74,6 +75,9 @@ theme = "BlogAMore" tags = "tags" categories = "categories" +[Params.KnowHow] + skills = "skills" + [Params.Social] # Links zur erreichbarkeit des Autors Email = "email@example.com" diff --git a/layouts/knowhow/list.html b/layouts/knowhow/list.html index e788d5d..de94175 100644 --- a/layouts/knowhow/list.html +++ b/layouts/knowhow/list.html @@ -9,3 +9,14 @@ {{ template "partials/pagination.html" . }} {{ end }} + +{{ define "sidebar" }} +
+ {{ $skillIdent := .Site.Params.KnowHow.Skills | default "skills" }} + {{ $skills := (index $.Site.Taxonomies $skillIdent)}} + {{ if $skills }} + {{- partial "widget/header.html" (dict "title" "Kenntnisse") -}} + {{- partial "widget/taglist.html" (dict "ident" $skillIdent "tax" $skills) -}} + {{ end }} +
+{{ end }} \ No newline at end of file diff --git a/layouts/knowhow/single.html b/layouts/knowhow/single.html new file mode 100644 index 0000000..6878184 --- /dev/null +++ b/layouts/knowhow/single.html @@ -0,0 +1,25 @@ +{{ define "main" }} +
+
+
+
+

{{ .Title }}

+ +
+ {{ .Content }} +
+ +
+
+
+
+{{ end }} + +{{ define "sidebar" }} + +{{ end }} \ No newline at end of file diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html index a0db50b..df1692c 100644 --- a/layouts/partials/metadata.html +++ b/layouts/partials/metadata.html @@ -5,4 +5,4 @@ {{ .Page.Params.Author }} -) + diff --git a/layouts/partials/metafooter.html b/layouts/partials/metafooter.html index 6962eb0..35e182a 100644 --- a/layouts/partials/metafooter.html +++ b/layouts/partials/metafooter.html @@ -1,20 +1,34 @@ -{{ with .Params.tags }} +{{/* TODO Sollte mal aufgeteilt werden*/}} + +{{ $tagsIdent := .Site.Params.Blog.Tags | default "tags" }} +{{ with (index .Params $tagsIdent) }} {{ range . }} - {{ $href := print (absURL "tags/") (urlize .) }} - {{ . }} + {{ $href := print (absURL (printf "%s/" $tagsIdent)) (urlize .) }} + {{ . }} {{ end }} + {{ end }} -  - -{{ with .Params.categories }} +{{ $catIdent := .Site.Params.Blog.Categories | default "categories" }} +{{ with (index .Params $catIdent) }} {{ range . }} - {{ $href := print (absURL "categories/") (urlize .) }} - {{ . }} + {{ $href := print (absURL (printf "%s/" $catIdent)) (urlize .) }} + {{ . }} {{ end }} + {{ end }} +{{ $skillIdent := .Site.Params.KnowHow.Skills | default "skills" }} +{{ with (index .Params $skillIdent) }} + + + {{ range . }} + {{ $href := print (absURL (printf "%s/" $skillIdent)) (urlize .) }} + {{ . }} + {{ end }} + +{{ end }}