From 9827bb7ba78d1d9ec01b7b5f33de7fcc69d5815f Mon Sep 17 00:00:00 2001
From: Marco Galster
Date: Wed, 23 Nov 2022 00:41:16 +0100
Subject: [PATCH] Sidbare-Elemente in widget-Partials ausgelagert
---
archetypes/default.md | 9 ++-
layouts/_default/baseof.html | 2 +-
layouts/_default/list.html | 78 +++++-------------------
layouts/_default/single.html | 18 ++++--
layouts/blog/list.html | 66 ++++++--------------
layouts/blog/single.html | 5 +-
layouts/knowhow/list.html | 11 ++++
layouts/partials/footer.html | 2 +-
layouts/partials/head.html | 2 +-
layouts/partials/svgs/external-links.svg | 5 ++
layouts/partials/widget/aboutme.html | 11 ++++
layouts/partials/widget/cloud.html | 15 +++++
layouts/partials/widget/header.html | 2 +
layouts/partials/widget/socials.html | 36 +++++++++++
layouts/partials/widget/taglist.html | 9 +++
15 files changed, 151 insertions(+), 120 deletions(-)
create mode 100644 layouts/knowhow/list.html
create mode 100644 layouts/partials/svgs/external-links.svg
create mode 100644 layouts/partials/widget/aboutme.html
create mode 100644 layouts/partials/widget/cloud.html
create mode 100644 layouts/partials/widget/header.html
create mode 100644 layouts/partials/widget/socials.html
create mode 100644 layouts/partials/widget/taglist.html
diff --git a/archetypes/default.md b/archetypes/default.md
index ac36e06..64df988 100644
--- a/archetypes/default.md
+++ b/archetypes/default.md
@@ -1,2 +1,7 @@
-+++
-+++
+---
+title: "{{ replace .Name "-" " " | title }}"
+description: "Descripe {{ title }}"
+date: {{ .Date }}
+draft: true
+---
+
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 2e60d14..c1a52f9 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -11,7 +11,7 @@
{{- block "main" . -}}{{- end }}
-
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 01dbe93..0cd7f85 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,70 +1,22 @@
{{ define "main" }}
-{{ .Title }}
-{{ range .Pages.ByPublishDate.Reverse }}
-
-
- {{ partial "metadata.html" . }}
-
- {{ .Summary }}
-
-
+ {{ range .Pages.ByTitle }}
+
-
-
About Me
- {{ with .Site.Params.Avatar }}
-
-
-
- {{ end }}
-
- {{ with .Site.Params.Description }}
-
- {{ . }}
-
- {{ end }}
+
+ {{- partial "widget/header.html" (dict "title" "About Me") -}}
+ {{- partial "widget/aboutme.html" (dict "avatar" .Site.Params.Avatar "description" .Site.Params.Description) -}}
-
Contact Me
-
-
- {{ with .Site.Params.Social.Email }}
- - {{ . }}
- {{ end }}
-
- {{ with .Site.Params.Social.Phone }}
- - {{ . }}
- {{ end }}
-
- {{ with .Site.Params.Social.VoIP }}
- - {{ . }}
- {{ end }}
-
- {{ with .Site.Params.Social.Github }}
- - {{ . }}
- {{ end }}
-
- {{ with .Site.Params.Social.Twitter }}
- - {{ . }}
- {{ end }}
-
- {{ with .Site.Params.Social.LinkedIn }}
- - {{ . }}
- {{ end }}
-
- {{ with .Site.Params.Social.Matrix }}
- - {{ . }}
- {{ end }}
-
- {{ with .Site.Params.Social.RSS }}
- - RSS
- {{ end }}
-
-
-
-
+ {{ with .Site.Params.Social }}
+ {{- partial "widget/header.html" (dict "title" "Contact Me") -}}
+ {{- partial "widget/socials.html" . -}}
+ {{ end }}
{{ end }}
\ No newline at end of file
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 7d38f89..0319b0f 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,6 +1,16 @@
{{ define "main" }}
-
{{ .Title }}
-{{ partial "metadata.html" . }}
-
-{{ .Content }}
+
{{ .Title }}
+ {{ .Content }}
+{{ end }}
+
+{{ define "sidebar" }}
+
+ {{- partial "widget/header.html" (dict "title" "About Me") -}}
+ {{- partial "widget/aboutme.html" (dict "avatar" .Site.Params.Avatar "description" .Site.Params.Description) -}}
+
+ {{ with .Site.Params.Social }}
+ {{- partial "widget/header.html" (dict "title" "Contact Me") -}}
+ {{- partial "widget/socials.html" . -}}
+ {{ end }}
+
{{ end }}
\ No newline at end of file
diff --git a/layouts/blog/list.html b/layouts/blog/list.html
index f9ebf22..7c25294 100644
--- a/layouts/blog/list.html
+++ b/layouts/blog/list.html
@@ -23,10 +23,9 @@
{{/* Der Paginator wurde in den If-Blöcken zwar erstellt, aber die Variable ist auserhalb nicht sichtbar, daher hier explizit holen.
Dieser kann nach dem ersten erstellen auch nicht mehr verändert werden */}}
{{ $pag := .Paginator }}
-
{{ .Title }}
{{ range $pag.Pages }}
-
+
{{ partial "metadata.html" . }}
{{ .Summary }}
@@ -36,52 +35,27 @@
{{ end }}
{{ define "sidebar" }}
-