From 58347d41f3ea5ba485c8995d1006e91f5c304f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 24 Jan 2023 14:58:17 +0100 Subject: [PATCH] Update theme --- .../images/sponsors/bep-consulting.svg | 0 .../images/sponsors/butter-dark.svg | 0 .../images/sponsors/butter-light.svg | 0 .../images/sponsors/esolia-logo.svg | 0 .../assets/images/sponsors/graitykit-dark.svg | 3 ++ .../assets/images/sponsors/linode-logo.svg | 1 + .../linode-logo_standard_light_medium.png | Bin .../images/sponsors/your-company-dark.svg | 0 .../images/sponsors/your-company.svg | 0 .../gohugoio/gohugoioTheme/data/sponsors.toml | 13 +++++---- .../partials/home-page-sections/sponsors.html | 27 ++++++++---------- _vendor/modules.txt | 2 +- go.mod | 2 +- go.sum | 2 ++ 14 files changed, 27 insertions(+), 23 deletions(-) rename _vendor/github.com/gohugoio/gohugoioTheme/{static => assets}/images/sponsors/bep-consulting.svg (100%) rename _vendor/github.com/gohugoio/gohugoioTheme/{static => assets}/images/sponsors/butter-dark.svg (100%) rename _vendor/github.com/gohugoio/gohugoioTheme/{static => assets}/images/sponsors/butter-light.svg (100%) rename _vendor/github.com/gohugoio/gohugoioTheme/{static => assets}/images/sponsors/esolia-logo.svg (100%) create mode 100644 _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/graitykit-dark.svg create mode 100644 _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/linode-logo.svg rename _vendor/github.com/gohugoio/gohugoioTheme/{static => assets}/images/sponsors/linode-logo_standard_light_medium.png (100%) rename _vendor/github.com/gohugoio/gohugoioTheme/{static => assets}/images/sponsors/your-company-dark.svg (100%) rename _vendor/github.com/gohugoio/gohugoioTheme/{static => assets}/images/sponsors/your-company.svg (100%) diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/bep-consulting.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/bep-consulting.svg similarity index 100% rename from _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/bep-consulting.svg rename to _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/bep-consulting.svg diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/butter-dark.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/butter-dark.svg similarity index 100% rename from _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/butter-dark.svg rename to _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/butter-dark.svg diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/butter-light.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/butter-light.svg similarity index 100% rename from _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/butter-light.svg rename to _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/butter-light.svg diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/esolia-logo.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/esolia-logo.svg similarity index 100% rename from _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/esolia-logo.svg rename to _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/esolia-logo.svg diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/graitykit-dark.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/graitykit-dark.svg new file mode 100644 index 000000000..fd7d12f5c --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/graitykit-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/linode-logo.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/linode-logo.svg new file mode 100644 index 000000000..7060e856f --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/linode-logo.svg @@ -0,0 +1 @@ + diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/linode-logo_standard_light_medium.png b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/linode-logo_standard_light_medium.png similarity index 100% rename from _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/linode-logo_standard_light_medium.png rename to _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/linode-logo_standard_light_medium.png diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/your-company-dark.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company-dark.svg similarity index 100% rename from _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/your-company-dark.svg rename to _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company-dark.svg diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/your-company.svg b/_vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company.svg similarity index 100% rename from _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/your-company.svg rename to _vendor/github.com/gohugoio/gohugoioTheme/assets/images/sponsors/your-company.svg diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml index dcdfeb653..c31178c92 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml +++ b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml @@ -1,22 +1,23 @@ [[banners]] name = "Linode" link = "https://www.linode.com/" - logo = "/images/sponsors/linode-logo_standard_light_medium.png" + logo = "images/sponsors/linode-logo.svg" utm_campaign = "hugosponsor" [[banners]] name = "ButterCMS" link = "https://buttercms.com/hugo-cms/" - logo = "/images/sponsors/butter-light.svg" + logo = "images/sponsors/butter-light.svg" utm_campaign = "sponsorship" bgcolor = "#131A3E" [[banners]] - name = "BEP Consulting" - link = "https://bep.consulting" - logo = "/images/sponsors/bep-consulting.svg" + name = "Gravity Kit" + link = "https://www.gravitykit.com/" + logo = "images/sponsors/graitykit-dark.svg" + query_params = "ref=532&campaign=hugo&" utm_campaign = "hugosponsor" - bgcolor = "#004887" + bgcolor = "#e0ecf3" #hugohome #hugofooter 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 e0f6670be..b2915e109 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 @@ -2,7 +2,8 @@ {{ $gtag := .gtag | default "unknown" }} {{ $classes_box := "ba b--dark-gray bg-light-gray br3 flex flex-column flex-wrap items-center justify-center ph3 pv4 mb4 w-100 w-30-l " }} {{ $gtag := .gtag | default "unknown" }} -{{ $utmSource := cond (eq $gtag "footer") "hugofooter" "hugohome" }} +{{ $isFooter := (eq $gtag "footer") }} +{{ $utmSource := cond $isFooter "hugofooter" "hugohome" }} {{ with .cx.Site.Data.sponsors }}
@@ -12,26 +13,22 @@ {{ range .banners }}
- {{ $url := printf "%s?%s" .link (querify "utm_source" $utmSource "utm_medium" "banner" "utm_campaign" (.utm_campaign | default "hugosponsor")) | safeURL }} - {{ if eq (getenv "HUGO_ENV") "production" | or (eq $.cx.Site.Params.env "production") }} + style="background-color: {{ .bgcolor }};"> + {{ $query_params := .query_params | default "" }} + {{ $url := printf "%s?%s%s" .link $query_params (querify "utm_source" $utmSource "utm_medium" "banner" "utm_campaign" (.utm_campaign | default "hugosponsor")) | safeURL }} + {{ $logo := resources.Get .logo }} + {{ if hugo.IsProduction }} {{ $gtagID := printf "Sponsor %s %s" .name $gtag | title }} - Logo for {{ .name }} + class="w-100 grow pa3"> + {{ $logo.Content | safeHTML }} {{ else }} - - Logo for {{ .name }} + + {{ $logo.Content | safeHTML }} + {{ end }}
{{ end }} diff --git a/_vendor/modules.txt b/_vendor/modules.txt index 2de5fadcf..9e5b08998 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -1 +1 @@ -# github.com/gohugoio/gohugoioTheme v0.0.0-20230120185049-2c3c4d0ba232 +# github.com/gohugoio/gohugoioTheme v0.0.0-20230124135550-462d5fe4a87f diff --git a/go.mod b/go.mod index 9436c3475..33f818ad6 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-20230120185049-2c3c4d0ba232 // indirect +require github.com/gohugoio/gohugoioTheme v0.0.0-20230124135550-462d5fe4a87f // indirect diff --git a/go.sum b/go.sum index 78703effe..ea0d2dcbe 100644 --- a/go.sum +++ b/go.sum @@ -57,3 +57,5 @@ github.com/gohugoio/gohugoioTheme v0.0.0-20230119103504-3bcd960d6f1b h1:i/iaEOOu github.com/gohugoio/gohugoioTheme v0.0.0-20230119103504-3bcd960d6f1b/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= github.com/gohugoio/gohugoioTheme v0.0.0-20230120185049-2c3c4d0ba232 h1:bEojKgKInbsLkID5Arh95vP4+0xydtn/+ayT6I8vkiU= github.com/gohugoio/gohugoioTheme v0.0.0-20230120185049-2c3c4d0ba232/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM= +github.com/gohugoio/gohugoioTheme v0.0.0-20230124135550-462d5fe4a87f h1:8wI3zOTWQG15aKkbAZQaoGnUQff46hO95opQndBHRE4= +github.com/gohugoio/gohugoioTheme v0.0.0-20230124135550-462d5fe4a87f/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=