From 7b4b78ee8458b16a6167170bf7405d7bf911cfbc Mon Sep 17 00:00:00 2001 From: Francesco Date: Mon, 22 Apr 2024 13:19:56 +0200 Subject: Initial --- layouts/partials/footer.html | 5 +++++ layouts/partials/head.html | 10 ++++++++++ layouts/partials/head/css.html | 11 +++++++++++ layouts/partials/head/js.html | 12 ++++++++++++ layouts/partials/header.html | 20 ++++++++++++++++++++ layouts/partials/math.html | 9 +++++++++ layouts/partials/pagination-controls.html | 23 +++++++++++++++++++++++ layouts/partials/post-entry.html | 4 ++++ 8 files changed, 94 insertions(+) create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/head/css.html create mode 100644 layouts/partials/head/js.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/math.html create mode 100644 layouts/partials/pagination-controls.html create mode 100644 layouts/partials/post-entry.html (limited to 'layouts/partials') diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..65f97aa --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,5 @@ +

Powered by + Hugo + {{/* and + tomfran/typo */}} +

\ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..a16d7ea --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,10 @@ + + +{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }} +{{ partialCached "head/css.html" . }} +{{ partialCached "head/js.html" . }} + + +{{ if hugo.IsProduction }} +{{ template "_internal/google_analytics.html" . }} +{{ end }} \ No newline at end of file diff --git a/layouts/partials/head/css.html b/layouts/partials/head/css.html new file mode 100644 index 0000000..abca3b8 --- /dev/null +++ b/layouts/partials/head/css.html @@ -0,0 +1,11 @@ +{{- $CSS := slice +(resources.Get "css/reset.css") +(resources.Get "css/vars.css") +(resources.Get "css/utils.css") +(resources.Get "css/fonts.css") +(resources.Get "css/main.css") | +resources.Concat "assets/combined.css" | +minify | +fingerprint }} + + \ No newline at end of file diff --git a/layouts/partials/head/js.html b/layouts/partials/head/js.html new file mode 100644 index 0000000..18fe842 --- /dev/null +++ b/layouts/partials/head/js.html @@ -0,0 +1,12 @@ +{{- with resources.Get "js/main.js" }} + {{- if eq hugo.Environment "development" }} + {{- with . | js.Build }} + + {{- end }} + {{- else }} + {{- $opts := dict "minify" true }} + {{- with . | js.Build $opts | fingerprint }} + + {{- end }} + {{- end }} +{{- end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..92da9a7 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,20 @@ +{{/* Header */}} + +
+

{{ site.Title }}

+ +
+ {{ $currentPage := . }} + + {{ with site.Params.menu }} + {{ range . }} +

+ + /{{.name }} + +

+ {{ end }} + {{ end }} + +
+
\ No newline at end of file diff --git a/layouts/partials/math.html b/layouts/partials/math.html new file mode 100644 index 0000000..59a0b2d --- /dev/null +++ b/layouts/partials/math.html @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/layouts/partials/pagination-controls.html b/layouts/partials/pagination-controls.html new file mode 100644 index 0000000..b26d609 --- /dev/null +++ b/layouts/partials/pagination-controls.html @@ -0,0 +1,23 @@ +{{ if gt .TotalPages 1 }} + +{{ end }} \ No newline at end of file diff --git a/layouts/partials/post-entry.html b/layouts/partials/post-entry.html new file mode 100644 index 0000000..f3f2a23 --- /dev/null +++ b/layouts/partials/post-entry.html @@ -0,0 +1,4 @@ +
+ +

{{ .Title }}

+
\ No newline at end of file -- cgit v1.2.3