Umstellung der Meta-Daten in Partials

This commit is contained in:
mdn 2022-11-28 22:36:47 +01:00
parent be11de4217
commit 1e520f3f39
9 changed files with 22 additions and 40 deletions

View file

@ -28,7 +28,7 @@
{{ range $pag.Pages }}
<article class="blog-post">
<h3 class="blog-post-title_ mb-1"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
<p class="blog-post-meta">{{ partial "metadata.html" . }}</p>
<p class="blog-post-meta">{{ partial "meta/data.html" . }}</p>
<p>{{ .Summary }}</p>
</article>
{{ end }}

View file

@ -4,11 +4,11 @@
<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="blog-post-meta">{{ partial "meta/data.html" . }}</div>
<div class="content">
{{ .Content }}
</div>
<div class="blog-post-meta mt-5">{{ partial "metafooter.html" . }}</div>
<div class="blog-post-meta mt-5">{{ partial "meta/footer.html" . }}</div>
</div>
</div>
</article>

View file

@ -2,7 +2,7 @@
{{ range .Paginator.Pages.ByTitle }}
<article class="blog-post">
<h3 class="blog-post-title_ mb-1"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
<!--p class="blog-post-meta">{{ partial "metadata.html" . }}</p-->
<!--p class="blog-post-meta">{{ partial "meta/data.html" . }}</p-->
<p>{{ .Summary }}</p>
</article>
{{ end }}

View file

@ -4,11 +4,11 @@
<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="blog-post-meta">{{ partial "meta/data.html" . }}</div>
<div class="content">
{{ .Content }}
</div>
<div class="blog-post-meta mt-5">{{ partial "metafooter.html" . }}</div>
<div class="blog-post-meta mt-5">{{ partial "meta/footer_skill.html" . }}</div>
</div>
</div>
</article>

View file

@ -0,0 +1,5 @@
{{ $tagsIdent := .Site.Params.Blog.Tags | default "tags" }}
{{- partial "taxonomy/metatag.html" (dict "Params" .Params "Ident" $tagsIdent "Feather" "tag") -}}
{{ $catIdent := .Site.Params.Blog.Categories | default "categories" }}
{{- partial "taxonomy/metatag.html" (dict "Params" .Params "Ident" $catIdent "Feather" "award") -}}

View file

@ -0,0 +1,2 @@
{{ $skillIdent := .Site.Params.KnowHow.Skills | default "skills" }}
{{- partial "taxonomy/metatag.html" (dict "Params" .Params "Ident" $skillIdent "Feather" "code") -}}

View file

@ -1,34 +0,0 @@
{{/* 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 (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 }}
{{ $catIdent := .Site.Params.Blog.Categories | default "categories" }}
{{ with (index .Params $catIdent) }}
<!-- list -->
<i data-feather="award"></i>
{{ range . }}
{{ $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 }}

View file

@ -0,0 +1,9 @@
{{ with (index .Params .Ident) }}
<i data-feather="{{ $.Feather }}"></i>
<i class="bi bi-tag"></i> <!-- TODO: umstellen auf bootstrap-icons??? -->
{{ range . }}
{{ $href := print (absURL (printf "%s/" $.Ident)) (urlize .) }}
<a class="btn btn-sm btn-outline-dark tag-btn" href="{{ $href | relURL }}">{{ . }}</a>
{{ end }}
<i class="mx-2"></i>
{{ end }}