Merge commit 'cf591b7c0c598d34896709db6d28598da37e3ff6'

This commit is contained in:
Bjørn Erik Pedersen
2023-02-23 07:52:04 +01:00
36 changed files with 389 additions and 149 deletions

View File

@@ -20,13 +20,13 @@
</div>
<p class="f6 mid-gray">Windows</p>
<div class="code f6 bg-black light-green lh-copy pv3 ph3 br2 w-100 w-50-ns center tl">
$ choco install hugo -confirm <br />
$ choco install hugo-extended<br />
</div>
<p class="f6 mid-gray">Linux</p>
<div class="code f6 bg-black light-green lh-copy pv3 ph3 br2 w-100 w-50-ns center tl">
$ snap install hugo <br />
$ sudo snap install hugo<br />
</div>
<p class="f5 nested-links"><a href="{{ "getting-started/installing/" | absURL }}" class="link">See the Getting Started Guide for other methods. {{ partial "svg/link-ext.svg" (dict "fill" "#333" "size" "14") }}</a></p>
</div>

View File

@@ -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 }}