From 3a20aa0bae1a4204ec423057e9cdf6a36c91869c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 14 Sep 2022 09:20:15 +0200 Subject: [PATCH] Update theme --- .../gohugoio/gohugoioTheme/data/sponsors.toml | 30 +++++---- .../partials/home-page-sections/sponsors.html | 65 ++++++++++--------- .../static/images/sponsors/brave-logo.svg | 1 - .../static/images/sponsors/butter-dark.svg | 1 + .../static/images/sponsors/butter-light.svg | 1 + .../images/sponsors/forestry-logotype.svg | 1 - _vendor/modules.txt | 2 +- go.mod | 2 +- go.sum | 2 + 9 files changed, 57 insertions(+), 48 deletions(-) delete mode 100644 _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/brave-logo.svg create mode 100644 _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/butter-dark.svg create mode 100644 _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/butter-light.svg delete mode 100644 _vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/forestry-logotype.svg diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml index 0d276b374..1e46fc07c 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml +++ b/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml @@ -1,18 +1,22 @@ [[banners]] - name = "Linode" - link = "https://www.linode.com/" - logo = "/images/sponsors/linode-logo_standard_light_medium.png" - copy = "" + name = "Linode" + link = "https://www.linode.com/" + logo = "/images/sponsors/linode-logo_standard_light_medium.png" + utm_campaign = "hugosponsor" [[banners]] - name = "eSolia" - link = "https://esolia.com/post/why-did-esolia-choose-hugo/" - logo = "/images/sponsors/esolia-logo.svg" - copy = "" + name = "eSolia" + link = "https://esolia.com/post/why-did-esolia-choose-hugo/" + logo = "/images/sponsors/esolia-logo.svg" + utm_campaign = "hugosponsor" [[banners]] - name = "BEP Consulting" - link = "https://bep.consulting" - logo = "/images/sponsors/bep-consulting.svg" - bgcolor = "#004887" - copy = "" + name = "ButterCMS" + link = "https://buttercms.com/hugo-cms/" + logo = "/images/sponsors/butter-light.svg" + utm_campaign = "sponsorship" + bgcolor = "#131A3E" + + #hugohome + #hugofooter + #hugogithub 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 a808655a6..e0f6670be 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 @@ -1,38 +1,41 @@ -{{$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" }} +{{ $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" }} +{{ $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" }} {{ with .cx.Site.Data.sponsors }} -
-
  +
+

Hugo Sponsors

{{ range .banners }} - {{ $banner := . }} - {{if .logo}} -
- {{with .link -}} - {{ $url := printf "%s?%s" . (querify "utm_source" "homepage" "utm_medium" "banner" "utm_campaign" "hugosponsor") | safeURL }} - {{ if eq (getenv "HUGO_ENV") "production" | or (eq $.cx.Site.Params.env "production") }} - {{ $gtagID := printf "Sponsor %s %s" $banner.name $gtag | title }} - - {{ else }} - - {{ end }} - {{- end}} - Logo for {{ .name }} - {{with .link}}{{end}} - {{with .copy}} -

- {{- . -}} -

- {{end}} -
- {{else}} -
-

Your Logo Here

-
- {{end}} - {{end}} +
+ {{ $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") }} + {{ $gtagID := printf "Sponsor %s %s" .name $gtag | title }} + + Logo for {{ .name }} + + {{ else }} + + Logo for {{ .name }} + {{ end }} +
+ {{ end }}
-{{end}} +{{ end }} diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/brave-logo.svg b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/brave-logo.svg deleted file mode 100644 index 27cdd974d..000000000 --- a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/brave-logo.svg +++ /dev/null @@ -1 +0,0 @@ -brave_logo_2color_reversed \ No newline at end of file diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/butter-dark.svg b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/butter-dark.svg new file mode 100644 index 000000000..657b75c50 --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/butter-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/butter-light.svg b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/butter-light.svg new file mode 100644 index 000000000..a0697df08 --- /dev/null +++ b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/butter-light.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/forestry-logotype.svg b/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/forestry-logotype.svg deleted file mode 100644 index ac95cd444..000000000 --- a/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/forestry-logotype.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/_vendor/modules.txt b/_vendor/modules.txt index 2147e7a1c..39c33113f 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -1 +1 @@ -# github.com/gohugoio/gohugoioTheme v0.0.0-20220912070954-88dcaf003b4d +# github.com/gohugoio/gohugoioTheme v0.0.0-20220914071648-0ef1c51685bf diff --git a/go.mod b/go.mod index f80bd4941..4550abaf6 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-20220912070954-88dcaf003b4d // indirect +require github.com/gohugoio/gohugoioTheme v0.0.0-20220914071648-0ef1c51685bf // indirect diff --git a/go.sum b/go.sum index 91fe56887..36f0a13cb 100644 --- a/go.sum +++ b/go.sum @@ -37,3 +37,5 @@ github.com/gohugoio/gohugoioTheme v0.0.0-20220905093719-cb8b64046950 h1:Ovlh3nuy github.com/gohugoio/gohugoioTheme v0.0.0-20220905093719-cb8b64046950/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs= github.com/gohugoio/gohugoioTheme v0.0.0-20220912070954-88dcaf003b4d h1:UYJL6RmEepprvlgHvDnFCWtPOvjmqzFCQ90cRDRBO7U= github.com/gohugoio/gohugoioTheme v0.0.0-20220912070954-88dcaf003b4d/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs= +github.com/gohugoio/gohugoioTheme v0.0.0-20220914071648-0ef1c51685bf h1:A8Ksnvp8reNt2Ap0mUK7gFkJkCjt9R60yopGsezcOBA= +github.com/gohugoio/gohugoioTheme v0.0.0-20220914071648-0ef1c51685bf/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=