From 4cf3f2e6297878a4a6303a886e24addd5cf4580f Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Wed, 6 Sep 2023 21:44:11 +0200 Subject: Simplify and consolidate page styles Use the section template instead of defining a new page type for the about page. In general I could build on pieces of markdown for each subsection. --- layouts/_default/about.html | 12 ++++++++++++ layouts/_default/baseof.html | 3 ++- layouts/_default/list.html | 8 ++++---- layouts/_default/single.html | 11 +++-------- 4 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 layouts/_default/about.html (limited to 'layouts/_default') diff --git a/layouts/_default/about.html b/layouts/_default/about.html new file mode 100644 index 0000000..6fdfaba --- /dev/null +++ b/layouts/_default/about.html @@ -0,0 +1,12 @@ +{{ define "hero" }} +{{ partial "hero.html" . }} +{{ end }} + +{{ define "main" }} +{{ range .Paginator.Pages }} +
+{{ .Content }} +
+{{ end }} + +{{ end }} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 81ba4d7..b0a5999 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -3,7 +3,8 @@ {{- partial "head.html" . -}} {{- partial "header.html" . -}} -
+ {{ block "hero" . }} {{ end }} +
{{- block "main" . }}{{- end }}
{{- partial "footer.html" . -}} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 8737066..f8b838d 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,10 +1,10 @@ -{{ define "main" }} -
-{{ partial "open_section.html" . }} +{{ define "hero" }} +{{ partial "hero.html" . }} +{{ end }} +{{ define "main" }} {{ range .Paginator.Pages.ByPublishDate.Reverse }} {{ partial "post.html" . }} {{ end }} {{ partial "pagination.html" . }} -
{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 894caf5..d12dd07 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,5 +1,4 @@ {{ define "main" }} -

{{ .Title }} @@ -25,15 +24,11 @@ {{ if isset .Params "metadata" }} {{ partial "metadata.html" . }} {{ end }} - -

- -
+
{{ .Content }} -
-
-
+
+
{{ if isset .Params "metadata" }} {{ partial "author_card" . }} {{ end }} -- cgit v1.2.3