From 4c9e372ef7f34120e844a8037f1c6d4a06d473b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 1 Dec 2023 12:15:20 +0000 Subject: [PATCH 1/7] Heading first-child styling not working --- layouts/_default/_markup/render-heading.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html index cb1514e6..f76eb43c 100644 --- a/layouts/_default/_markup/render-heading.html +++ b/layouts/_default/_markup/render-heading.html @@ -1,8 +1,10 @@ -
{{ .Text | safeHTML }} - {{ if.Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }} + {{ if.Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }} + # + style="text-decoration-line: none !important;" href="#{{ .Anchor | safeURL }}" aria-label="{{ i18n "article.anchor_label" }}"># + {{ end }} From 60bdf84f37c5c9c8b50e8dda245d3218e818e57c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 1 Dec 2023 12:50:30 +0000 Subject: [PATCH 2/7] Don't center-align code within blocks --- assets/css/compiled/main.css | 4 ++++ assets/css/main.css | 4 ++++ exampleSite/content/_index.md | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index baebb65c..e05cb96f 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -4914,6 +4914,10 @@ body:has(#menu-controller:checked) { /* Custom */ +pre { + text-align: left; +} + .thumbnail { min-width: 300px; height: 180px; diff --git a/assets/css/main.css b/assets/css/main.css index bc69caeb..fbb6ce8e 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -339,6 +339,10 @@ body:has(#menu-controller:checked) { /* Custom */ +pre { + text-align: left; +} + .thumbnail { min-width: 300px; height: 180px; diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index 312cf241..eeb5c04f 100755 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -5,6 +5,10 @@ description: "This is a demo of the Blowfish theme for Hugo." This is a demo site built entirely using Blowfish. It also contains a complete set of [theme documentation]({{< ref "docs" >}}). Blowfish is flexible and is great for both static page-based content (like this demo) or a traditional blog with a feed of recent posts. +``` +var blowfish = require('blowfish'); +``` +
{{< icon "triangle-exclamation" >}} From 24cd703277248e359874c41b8cd93fb3084cabe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 1 Dec 2023 13:15:45 +0000 Subject: [PATCH 3/7] Missing pointer-cursor for tag-badge in article view --- exampleSite/content/_index.md | 4 ---- layouts/partials/article-meta/basic.html | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index eeb5c04f..312cf241 100755 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -5,10 +5,6 @@ description: "This is a demo of the Blowfish theme for Hugo." This is a demo site built entirely using Blowfish. It also contains a complete set of [theme documentation]({{< ref "docs" >}}). Blowfish is flexible and is great for both static page-based content (like this demo) or a traditional blog with a feed of recent posts. -``` -var blowfish = require('blowfish'); -``` -
{{< icon "triangle-exclamation" >}} diff --git a/layouts/partials/article-meta/basic.html b/layouts/partials/article-meta/basic.html index dcb87597..8608663f 100644 --- a/layouts/partials/article-meta/basic.html +++ b/layouts/partials/article-meta/basic.html @@ -47,7 +47,7 @@ {{ end }} -
+
{{/* Output partials */}} {{ with ($meta.Get "partials") }} {{ delimit . "·" | safeHTML }} @@ -60,7 +60,7 @@
{{ if .Params.showAuthorsBadges | default (.Site.Params.article.showAuthorsBadges | default false) }} -
+
{{ range $taxonomy, $terms := .Site.Taxonomies }} {{ if (eq $taxonomy "authors")}} {{ if (gt (len ($context.GetTerms $taxonomy)) 0) }} @@ -75,7 +75,7 @@ {{/* Output taxonomies */}} {{ if .Params.showTaxonomies | default (.Site.Params.article.showTaxonomies | default false) }} -
+
{{ range $taxonomy, $terms := .Site.Taxonomies }} {{ if and (not (eq $taxonomy "authors")) (not (eq $taxonomy "series"))}} {{ if (gt (len ($context.GetTerms $taxonomy)) 0) }} From 242c43ed78263d598eacc847bc7f968a7a4e04c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 1 Dec 2023 13:20:24 +0000 Subject: [PATCH 4/7] Empty hamburger visible --- layouts/partials/header/basic.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/header/basic.html b/layouts/partials/header/basic.html index 720964c2..a9b1e991 100644 --- a/layouts/partials/header/basic.html +++ b/layouts/partials/header/basic.html @@ -88,6 +88,7 @@
From 33b3302a6199f81ac5fb97b7085d8ed4322504e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 1 Dec 2023 13:28:24 +0000 Subject: [PATCH 5/7] Add option to hide text in header --- config/_default/params.toml | 3 ++- exampleSite/config/_default/params.toml | 1 + exampleSite/content/docs/configuration/index.md | 1 + layouts/partials/header/basic.html | 3 ++- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/_default/params.toml b/config/_default/params.toml index 7ac39c58..7ddfd3b5 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -15,7 +15,8 @@ enableCodeCopy = false # mainSections = ["section1", "section2"] # robots = "" -disableImageOptimization = true +disableImageOptimization = false +disableTextInHeader = false # defaultBackgroundImage = "IMAGE.jpg" # used as default for background images # defaultFeaturedImage = "IMAGE.jpg" # used as default for featured images in all articles diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index ff6665f5..ccdbb1c4 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -16,6 +16,7 @@ mainSections = ["docs"] # robots = "" disableImageOptimization = false +disableTextInHeader = false defaultBackgroundImage = "/img/ocean.jpg" defaultFeaturedImage = "/img/ocean.jpg" diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 5d570ccc..87b1e790 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -167,6 +167,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `robots` | _Not set_ | String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values. | | `disableImageZoom` | `false` | Disables image zoom feature across all the images in the site. | | `disableImageOptimization` | `false` | Disables image resize and optimization features across all the images in the site. | +| `disableTextInHeader` | `false` | Disables text in header, useful for logo based headers. | | `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style | | `defaultFeaturedImage` | _Not set_ | Default background image for all `featured` images across articles, will be overriden by a local `featured` image. | | `highlightCurrentMenuArea` | _Not set_ | Marks menu entries in the main manu when selected | diff --git a/layouts/partials/header/basic.html b/layouts/partials/header/basic.html index a9b1e991..6446136a 100644 --- a/layouts/partials/header/basic.html +++ b/layouts/partials/header/basic.html @@ -17,10 +17,11 @@