From 8640f11fec849d6967b7a35a34beae6a1d2b7622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksa=20Siri=C5=A1ki?= <31509435+aleksasiriski@users.noreply.github.com> Date: Fri, 9 Jun 2023 15:41:27 +0200 Subject: [PATCH] readded complex dropdown as modular, added instructions for cloudflare --- assets/images/global/comments.svg | 7 ++++ assets/images/global/piechart.svg | 8 ++++ assets/images/global/stars.svg | 7 ++++ cloudflare.md | 16 ++++++++ hugo.yaml | 30 ++++++++++++-- hugo.yaml.exampleSite | 30 ++++++++++++-- layouts/index.html | 16 ++++---- layouts/partials/nav.html | 65 ++++++++++++++++++++++++++++++- 8 files changed, 164 insertions(+), 15 deletions(-) create mode 100644 assets/images/global/comments.svg create mode 100644 assets/images/global/piechart.svg create mode 100644 assets/images/global/stars.svg create mode 100644 cloudflare.md diff --git a/assets/images/global/comments.svg b/assets/images/global/comments.svg new file mode 100644 index 0000000..3194e8d --- /dev/null +++ b/assets/images/global/comments.svg @@ -0,0 +1,7 @@ + + + + diff --git a/assets/images/global/piechart.svg b/assets/images/global/piechart.svg new file mode 100644 index 0000000..2bdb6f0 --- /dev/null +++ b/assets/images/global/piechart.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/assets/images/global/stars.svg b/assets/images/global/stars.svg new file mode 100644 index 0000000..5544426 --- /dev/null +++ b/assets/images/global/stars.svg @@ -0,0 +1,7 @@ + + + + diff --git a/cloudflare.md b/cloudflare.md new file mode 100644 index 0000000..d2b9600 --- /dev/null +++ b/cloudflare.md @@ -0,0 +1,16 @@ +# Deploying to cloudflare pages +Use `Hugo` preset and change the command to: +```sh +npm install && hugo --gc --minify +``` + +# Cloudflare Pages v1 +Version 1 uses old Hugo, Go and Node.js version (0.54.0, 1.14.4 and 12.18.0), you need to switch to a supported ones (>= 0.104.0, 1.20, 18) using env vars: +```sh +HUGO_VERSION=0.111.3 +GO_VERSION=1.20.3 +NODE_VERSION=18.16.0 +``` + +# Cloudflare Pages v2 +Version 2 uses appropriate versions of Hugo, Go and Node.js by default. \ No newline at end of file diff --git a/hugo.yaml b/hugo.yaml index 606b71d..b01f7cb 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -86,14 +86,19 @@ menu: name: About url: /about/ weight: 20 - - identifier: dropdown_categories + - identifier: categories + pre: dropdown name: Categories weight: 30 + - identifier: dropdown + pre: complexdropdown + name: Dropdown + weight: 40 - identifier: contact name: Contact url: /contact/ - weight: 40 - dropdown_categories: + weight: 50 + categories: - identifier: prose name: Prose url: /prose/ @@ -102,6 +107,25 @@ menu: name: About url: /about/ weight: 20 + dropdown: + - identifier: appearance + pre: stars # can be stars, comments or piechart + name: Appearance + post: "Easy customization" + url: "#" + weight: 10 + - identifier: comments + pre: comments # can be stars, comments or piechart + name: Comments + post: "Check your latest comments" + url: "#" + weight: 20 + - identifier: analytics + pre: piechart # can be stars, comments or piechart + name: Analytics + post: "Take a look at your statistics" + url: "#" + weight: 30 footer: - identifier: about name: About diff --git a/hugo.yaml.exampleSite b/hugo.yaml.exampleSite index a60d1e6..180dede 100644 --- a/hugo.yaml.exampleSite +++ b/hugo.yaml.exampleSite @@ -85,14 +85,19 @@ menu: name: About url: /about/ weight: 20 - - identifier: dropdown_categories + - identifier: categories + pre: dropdown name: Categories weight: 30 + - identifier: dropdown + pre: complexdropdown + name: Dropdown + weight: 40 - identifier: contact name: Contact url: /contact/ - weight: 40 - dropdown_categories: + weight: 50 + categories: - identifier: prose name: Prose url: /prose/ @@ -101,6 +106,25 @@ menu: name: About url: /about/ weight: 20 + dropdown: + - identifier: appearance + pre: stars # can be stars, comments or piechart + name: Appearance + post: "Easy customization" + url: "#" + weight: 10 + - identifier: comments + pre: comments # can be stars, comments or piechart + name: Comments + post: "Check your latest comments" + url: "#" + weight: 20 + - identifier: analytics + pre: piechart # can be stars, comments or piechart + name: Analytics + post: "Take a look at your statistics" + url: "#" + weight: 30 footer: - identifier: about name: About diff --git a/layouts/index.html b/layouts/index.html index fa59311..b6cf026 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -4,15 +4,15 @@
-

- {{ .Site.Title }}

+

+ {{ .Site.Title }} +

{{ .Site.Params.Moto }}

-

- {{ .Site.Params.Description}}

+

+ {{ .Site.Params.Description}} +

{{ $hero := resources.GetMatch "images/pages/tailbliss-rocket-indigo.png" }} @@ -52,7 +52,7 @@
{{ $p1image := resources.Get .Site.Params.P1.Image }} {{ with $p1image }} - {{ with .Resize (printf "%dx%d webp q80" .Width .Height) }} + {{ with .Resize (printf "%dx%d webp q90" .Width .Height) }} P1 @@ -117,7 +117,7 @@
{{ $p2image := resources.Get .Site.Params.P2.Image }} {{ with $p2image }} - {{ with .Resize (printf "%dx%d webp q80" .Width .Height) }} + {{ with .Resize (printf "%dx%d webp q90" .Width .Height) }} P2 diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 8016d05..a0392af 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -24,7 +24,70 @@