summaryrefslogtreecommitdiffstats
path: root/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html')
-rw-r--r--docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html27
1 files changed, 12 insertions, 15 deletions
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html
index e0f6670be..b2915e109 100644
--- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html
+++ b/docs/_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 }}
<section
class="{{ $.classes_section | default "bg-primary-color-dark b--dark-gray bb bt ph5 pv4 w-100" }}">
@@ -12,26 +13,22 @@
{{ range .banners }}
<div
class="{{ $classes_box }} o-100"
- {{ with .bgcolor }}style="background-color: {{ . }};"{{ 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") }}
+ 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 }}
<a
href="{{ $url }}"
onclick="trackOutboundLink({{ printf "'%s', '%s'" $gtagID $url | safeJS }});"
- class="grow">
- <img
- src="{{ .logo }}"
- alt="Logo for {{ .name }}"
- class="img h3 center" />
+ class="w-100 grow pa3">
+ {{ $logo.Content | safeHTML }}
</a>
{{ else }}
- <a href="{{ $url }}" class="grow">
- <img
- src="{{ .logo }}"
- alt="Logo for {{ .name }}"
- class="img h3 center"
- /></a>
+ <a href="{{ $url }}" class="w-100 grow pa3" style="">
+ {{ $logo.Content | safeHTML }}
+ </a>
{{ end }}
</div>
{{ end }}