From 9b06f951e61081c503927bb772b75f93504aeba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 19 Jun 2024 11:36:48 +0200 Subject: [PATCH] Update theme --- .../gohugoio/gohugoioTheme/data/sponsors.toml | 12 +++--- .../partials/home-page-sections/sponsors.html | 40 ++++++++++--------- .../gohugoioTheme/layouts/shortcodes/img.html | 2 +- _vendor/modules.txt | 2 +- go.mod | 2 +- go.sum | 2 + 6 files changed, 34 insertions(+), 26 deletions(-) diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml index 809ee618d0..8e485b2a4b 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml +++ b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml @@ -6,11 +6,12 @@ bgcolor = "#ffffff" [[banners]] - name = "Your Company?" - link = "https://bep.is/en/hugo-sponsor-2023-01/" - utm_campaign = "hugosponsor" - show_on_hover = true - bgcolor = "#4e4f4f" + name = "Route4Me" + link = "https://route4me.com" + title = "Route Planning & Route Optimization Software" + utm_campaign = "hugosponsor" + bgcolor = "#334799" + link_attr = "style='color: #ffffff; font-weight: bold; text-decoration: none; text-align: center'" [[banners]] name = "Your Company?" @@ -18,3 +19,4 @@ utm_campaign = "hugosponsor" show_on_hover = true bgcolor = "#4e4f4f" + link_attr = "style='color: #ffffff; font-weight: bold; text-decoration: none; text-align: center'" diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html index 6838ce36af..3b7f6bfef1 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html @@ -25,26 +25,30 @@

Hugo Sponsors

{{ $query_params := .query_params | default "" }} {{ $url := printf "%s?%s%s" .link $query_params (querify "utm_source" (.utm_source | default $utmSource ) "utm_medium" "banner" "utm_campaign" (.utm_campaign | default "hugosponsor") "utm_content" (.utm_content | default "gohugoio")) | safeURL }} {{ $logo := resources.Get .logo }} - {{ if hugo.IsProduction }} - {{ $gtagID := printf "Sponsor %s %s" .name $gtag | title }} - - {{ with $logo }}{{ .Content | safeHTML }}{{ end }} - + {{ $gtagID := printf "Sponsor %s %s" .name $gtag | title }} + {{ $classes := "" }} + {{ if .show_on_hover }} + {{ $classes = printf "%s show-on-hover" $classes }} + {{ end }} + {{ if $isFooter }} + {{ $classes = printf "%s f3" $classes }} {{ else }} - - {{ with $logo }}{{ .Content | safeHTML }}{{ end }} - + {{ $classes = printf "%s f1" $classes }} {{ end }} + + {{ with $logo }} + {{ .Content | safeHTML }} + {{ else }} + {{ .name }} + {{ end }} + {{ end }} diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/img.html b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/img.html index 34476b3d88..dd8c60e18b 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/img.html +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/img.html @@ -356,7 +356,7 @@ {{- if $u.IsAbs }} {{- with resources.GetRemote $u.String }} {{- with .Err }} - {{- errorf "%s" }} + {{- errorf "%s" . }} {{- else }} {{- /* This is a remote resource. */}} {{- $r = . }} diff --git a/_vendor/modules.txt b/_vendor/modules.txt index 3c925aa105..100c6fc6f2 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -1 +1 @@ -# github.com/gohugoio/gohugoioTheme v0.0.0-20240508091825-b23e8e2d2419 +# github.com/gohugoio/gohugoioTheme v0.0.0-20240619093131-b595d5fb8c52 diff --git a/go.mod b/go.mod index bcf33099fd..ca0acd79f3 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/gohugoio/hugoDocs go 1.16 -require github.com/gohugoio/gohugoioTheme v0.0.0-20240508091825-b23e8e2d2419 // indirect +require github.com/gohugoio/gohugoioTheme v0.0.0-20240619093131-b595d5fb8c52 // indirect diff --git a/go.sum b/go.sum index 0832c1e00a..a1664d3205 100644 --- a/go.sum +++ b/go.sum @@ -2,3 +2,5 @@ github.com/gohugoio/gohugoioTheme v0.0.0-20240426212330-f38e99e0d88d h1:EaFz80Aq github.com/gohugoio/gohugoioTheme v0.0.0-20240426212330-f38e99e0d88d/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= github.com/gohugoio/gohugoioTheme v0.0.0-20240508091825-b23e8e2d2419 h1:cQ/44eDHK0tVImTtSx/9sWWZv+RynH/oB4R7ASbQNAE= github.com/gohugoio/gohugoioTheme v0.0.0-20240508091825-b23e8e2d2419/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= +github.com/gohugoio/gohugoioTheme v0.0.0-20240619093131-b595d5fb8c52 h1:dPJxUU4SevIZ7OS1DIVOrJ7p8I/QM00pXGRfAtKgQmU= +github.com/gohugoio/gohugoioTheme v0.0.0-20240619093131-b595d5fb8c52/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=