Skills bei KnowHow mit hinzugefügt

This commit is contained in:
mdn 2022-11-28 19:58:24 +01:00
parent ac8d277899
commit c461856547
5 changed files with 63 additions and 9 deletions

View file

@ -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"

View file

@ -9,3 +9,14 @@
{{ template "partials/pagination.html" . }}
{{ end }}
{{ define "sidebar" }}
<div class="position-sticky">
{{ $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 }}
</div>
{{ end }}

View file

@ -0,0 +1,25 @@
{{ define "main" }}
<section class="section">
<article>
<div class="columns is-centered">
<div class="column">
<h1 class="title is-1">{{ .Title }}</h1>
<div class="blog-post-meta">{{ partial "metadata.html" . }}</div>
<div class="content">
{{ .Content }}
</div>
<div class="blog-post-meta mt-5">{{ partial "metafooter.html" . }}</div>
</div>
</div>
</article>
</section>
{{ end }}
{{ define "sidebar" }}
<aside class="position-sticky">
{{- partial "widget/header.html" (dict "title" "Inhaltsverzeichnis")}}
<div>
{{ .TableOfContents }}
</div>
</aside>
{{ end }}

View file

@ -5,4 +5,4 @@
<time datetime="{{ $dateTime }}">{{ .PublishDate.Format $dateFormat }}</time>
<i data-feather="user"></i>
{{ .Page.Params.Author }}
<span class="badge bg-secondary"><time datetime="{{ $dateTimeMod }}">{{ .Lastmod.Format $dateFormat }}</time>)</span>
<span class="badge bg-secondary"><time datetime="{{ $dateTimeMod }}">{{ .Lastmod.Format $dateFormat }}</time></span>

View file

@ -1,20 +1,34 @@
{{ with .Params.tags }}
{{/* TODO Sollte mal aufgeteilt werden*/}}
{{ $tagsIdent := .Site.Params.Blog.Tags | default "tags" }}
{{ with (index .Params $tagsIdent) }}
<i data-feather="tag"></i>
<i class="bi bi-tag"></i> <!-- TODO: umstellen auf bootstrap-icons??? -->
{{ range . }}
{{ $href := print (absURL "tags/") (urlize .) }}
<a class="btn btn-sm btn-outline-dark tag-btn" href="{{ $href }}">{{ . }}</a>
{{ $href := print (absURL (printf "%s/" $tagsIdent)) (urlize .) }}
<a class="btn btn-sm btn-outline-dark tag-btn" href="{{ $href | relURL }}">{{ . }}</a>
{{ end }}
<i class="mx-2"></i>
{{ end }}
&nbsp;
{{ with .Params.categories }}
{{ $catIdent := .Site.Params.Blog.Categories | default "categories" }}
{{ with (index .Params $catIdent) }}
<!-- list -->
<i data-feather="award"></i>
{{ range . }}
{{ $href := print (absURL "categories/") (urlize .) }}
<a class="btn btn-sm btn-outline-dark tag-btn" href="{{ $href }}">{{ . }}</a>
{{ $href := print (absURL (printf "%s/" $catIdent)) (urlize .) }}
<a class="btn btn-sm btn-outline-dark tag-btn" href="{{ $href | relURL }}">{{ . }}</a>
{{ end }}
<i class="mx-2"></i>
{{ end }}
{{ $skillIdent := .Site.Params.KnowHow.Skills | default "skills" }}
{{ with (index .Params $skillIdent) }}
<!-- list -->
<i data-feather="code"></i>
{{ range . }}
{{ $href := print (absURL (printf "%s/" $skillIdent)) (urlize .) }}
<a class="btn btn-sm btn-outline-dark tag-btn" href="{{ $href | relURL }}">{{ . }}</a>
{{ end }}
<i class="mx-2"></i>
{{ end }}