From: Danilo M. Date: Sun, 5 Apr 2026 06:41:04 +0000 (+0200) Subject: layout: create base layout, header, footer, hero, and post card partials X-Git-Url: https://git.danix.xyz/?a=commitdiff_plain;h=d605b77f6255a605d5afb9cd78649b1d7e301128;p=danix2-hugo-theme.git layout: create base layout, header, footer, hero, and post card partials --- diff --git a/layouts/_partials/footer.html b/layouts/_partials/footer.html index a7cd916..a9df047 100644 --- a/layouts/_partials/footer.html +++ b/layouts/_partials/footer.html @@ -1 +1,14 @@ -

Copyright {{ now.Year }}. All rights reserved.

+ diff --git a/layouts/_partials/head.html b/layouts/_partials/head.html index 02c2240..1a8a727 100644 --- a/layouts/_partials/head.html +++ b/layouts/_partials/head.html @@ -1,5 +1,8 @@ - -{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }} + + + +{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }} + {{ partialCached "head/css.html" . }} {{ partialCached "head/js.html" . }} diff --git a/layouts/_partials/header.html b/layouts/_partials/header.html index 7980a00..872c207 100644 --- a/layouts/_partials/header.html +++ b/layouts/_partials/header.html @@ -1,2 +1,17 @@ -

{{ site.Title }}

-{{ partial "menu.html" (dict "menuID" "main" "page" .) }} +
+ {{ .Site.Params.author }} +
+ + +
+
diff --git a/layouts/_partials/hero.html b/layouts/_partials/hero.html new file mode 100644 index 0000000..11034be --- /dev/null +++ b/layouts/_partials/hero.html @@ -0,0 +1,11 @@ +
+ {{ partial "matrix-canvas.html" . }} +
+
{{ .Site.Params.avatar }}
+
+

{{ .Site.Params.author }}

+
// engineer • writer • human
+

{{ .Site.Params.description }}

+
+
+
diff --git a/layouts/_partials/matrix-canvas.html b/layouts/_partials/matrix-canvas.html new file mode 100644 index 0000000..b10b471 --- /dev/null +++ b/layouts/_partials/matrix-canvas.html @@ -0,0 +1 @@ + diff --git a/layouts/_partials/post-card.html b/layouts/_partials/post-card.html new file mode 100644 index 0000000..7dd8c9a --- /dev/null +++ b/layouts/_partials/post-card.html @@ -0,0 +1,16 @@ +{{ $featured := .featured }} +
+ {{ if .image }} + {{ .title }} + {{ else }} +
+ {{ end }} +
+
{{ .type }}
+

{{ .title }}

+

{{ .description }}

+
+ {{ dateFormat "Jan 2, 2006" .date }} +
+
+
diff --git a/layouts/baseof.html b/layouts/baseof.html index 7d17aa5..ad6613f 100644 --- a/layouts/baseof.html +++ b/layouts/baseof.html @@ -4,14 +4,9 @@ {{ partial "head.html" . }} -
- {{ partial "header.html" . }} -
-
- {{ block "main" . }}{{ end }} -
- +
+
{{ partial "header.html" . }}
+
{{ block "main" . }}{{ end }}
+