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] [taxonomies]
tag = "tags" tag = "tags"
category = "categories" category = "categories"
skill = "skills"
# Weitere Kategorien die benötigt werden # Weitere Kategorien die benötigt werden
mood = "moods" mood = "moods"
@ -74,6 +75,9 @@ theme = "BlogAMore"
tags = "tags" tags = "tags"
categories = "categories" categories = "categories"
[Params.KnowHow]
skills = "skills"
[Params.Social] [Params.Social]
# Links zur erreichbarkeit des Autors # Links zur erreichbarkeit des Autors
Email = "email@example.com" Email = "email@example.com"

View file

@ -9,3 +9,14 @@
{{ template "partials/pagination.html" . }} {{ template "partials/pagination.html" . }}
{{ end }} {{ 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> <time datetime="{{ $dateTime }}">{{ .PublishDate.Format $dateFormat }}</time>
<i data-feather="user"></i> <i data-feather="user"></i>
{{ .Page.Params.Author }} {{ .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 data-feather="tag"></i>
<i class="bi bi-tag"></i> <!-- TODO: umstellen auf bootstrap-icons??? --> <i class="bi bi-tag"></i> <!-- TODO: umstellen auf bootstrap-icons??? -->
{{ range . }} {{ range . }}
{{ $href := print (absURL "tags/") (urlize .) }} {{ $href := print (absURL (printf "%s/" $tagsIdent)) (urlize .) }}
<a class="btn btn-sm btn-outline-dark tag-btn" href="{{ $href }}">{{ . }}</a> <a class="btn btn-sm btn-outline-dark tag-btn" href="{{ $href | relURL }}">{{ . }}</a>
{{ end }} {{ end }}
<i class="mx-2"></i>
{{ end }} {{ end }}
&nbsp; {{ $catIdent := .Site.Params.Blog.Categories | default "categories" }}
{{ with (index .Params $catIdent) }}
{{ with .Params.categories }}
<!-- list --> <!-- list -->
<i data-feather="award"></i> <i data-feather="award"></i>
{{ range . }} {{ range . }}
{{ $href := print (absURL "categories/") (urlize .) }} {{ $href := print (absURL (printf "%s/" $catIdent)) (urlize .) }}
<a class="btn btn-sm btn-outline-dark tag-btn" href="{{ $href }}">{{ . }}</a> <a class="btn btn-sm btn-outline-dark tag-btn" href="{{ $href | relURL }}">{{ . }}</a>
{{ end }} {{ end }}
<i class="mx-2"></i>
{{ end }} {{ 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 }}