From be11de4217fe2949de9e2f1fb8f86c4c1b88922a Mon Sep 17 00:00:00 2001
From: mdn <1stdragon@gmail.com>
Date: Mon, 28 Nov 2022 21:42:49 +0100
Subject: [PATCH] Taxonomy in Partials ausgelagert
---
layouts/_default/taxonomy.html | 12 +-----------
layouts/partials/taxonomy/description.html | 11 +++++++++++
layouts/partials/taxonomy/summary.html | 11 +++++++++++
layouts/taxonomy/category.html | 12 +-----------
layouts/taxonomy/skill.html | 12 +-----------
layouts/taxonomy/tag.html | 14 +-------------
6 files changed, 26 insertions(+), 46 deletions(-)
create mode 100644 layouts/partials/taxonomy/description.html
create mode 100644 layouts/partials/taxonomy/summary.html
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html
index 9296ba5..1c50987 100644
--- a/layouts/_default/taxonomy.html
+++ b/layouts/_default/taxonomy.html
@@ -1,11 +1 @@
-{{ define "main" }}
-
{{ .Title }}
- {{ range .Pages.ByTitle }}
-
-
- {{ .Description }}
-
- {{ end }}
-{{ end }}
\ No newline at end of file
+{{- partial "taxonomy/description.html" . -}}
\ No newline at end of file
diff --git a/layouts/partials/taxonomy/description.html b/layouts/partials/taxonomy/description.html
new file mode 100644
index 0000000..3157706
--- /dev/null
+++ b/layouts/partials/taxonomy/description.html
@@ -0,0 +1,11 @@
+{{ define "main" }}
+ {{ .Title }}
+ {{ range .Pages.ByTitle }}
+
+
+ {{ .Summary }}
+
+ {{ end }}
+{{ end }}
\ No newline at end of file
diff --git a/layouts/partials/taxonomy/summary.html b/layouts/partials/taxonomy/summary.html
new file mode 100644
index 0000000..3157706
--- /dev/null
+++ b/layouts/partials/taxonomy/summary.html
@@ -0,0 +1,11 @@
+{{ define "main" }}
+ {{ .Title }}
+ {{ range .Pages.ByTitle }}
+
+
+ {{ .Summary }}
+
+ {{ end }}
+{{ end }}
\ No newline at end of file
diff --git a/layouts/taxonomy/category.html b/layouts/taxonomy/category.html
index 3157706..93e1964 100644
--- a/layouts/taxonomy/category.html
+++ b/layouts/taxonomy/category.html
@@ -1,11 +1 @@
-{{ define "main" }}
- {{ .Title }}
- {{ range .Pages.ByTitle }}
-
-
- {{ .Summary }}
-
- {{ end }}
-{{ end }}
\ No newline at end of file
+{{- partial "taxonomy/summary.html" . -}}
\ No newline at end of file
diff --git a/layouts/taxonomy/skill.html b/layouts/taxonomy/skill.html
index 3157706..93e1964 100644
--- a/layouts/taxonomy/skill.html
+++ b/layouts/taxonomy/skill.html
@@ -1,11 +1 @@
-{{ define "main" }}
- {{ .Title }}
- {{ range .Pages.ByTitle }}
-
-
- {{ .Summary }}
-
- {{ end }}
-{{ end }}
\ No newline at end of file
+{{- partial "taxonomy/summary.html" . -}}
\ No newline at end of file
diff --git a/layouts/taxonomy/tag.html b/layouts/taxonomy/tag.html
index 4b4ddef..93e1964 100644
--- a/layouts/taxonomy/tag.html
+++ b/layouts/taxonomy/tag.html
@@ -1,13 +1 @@
-{{/* TODO als Partial auslagern*/}}
-
-{{ define "main" }}
- {{ .Title }}
- {{ range .Pages.ByTitle }}
-
-
- {{ .Summary }}
-
- {{ end }}
-{{ end }}
\ No newline at end of file
+{{- partial "taxonomy/summary.html" . -}}
\ No newline at end of file