Update theme

This commit is contained in:
Bjørn Erik Pedersen
2024-06-19 11:36:48 +02:00
parent aa24b5319d
commit 9b06f951e6
6 changed files with 35 additions and 27 deletions
@@ -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'"
@@ -25,26 +25,30 @@
{{ $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 }}
<a
href="{{ $url }}"
onclick="trackOutboundLink({{ printf "'%s', '%s'" $gtagID $url | safeJS }});"
class="w-100 grow pa3{{ if .show_on_hover }}
show-on-hover
{{ end }}"
style="">
{{ with $logo }}{{ .Content | safeHTML }}{{ end }}
</a>
{{ else }}
<a
href="{{ $url }}"
class="w-100 grow pa3{{ if .show_on_hover }}
show-on-hover
{{ end }}">
{{ with $logo }}{{ .Content | safeHTML }}{{ end }}
</a>
{{ $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 }}
{{ $classes = printf "%s f1" $classes }}
{{ end }}
<a
href="{{ $url }}"
title="{{ .title | default .name }}"
{{ if hugo.IsProduction }}
onclick="trackOutboundLink({{ printf "'%s', '%s'" $gtagID $url | safeJS }});"
{{ end }}
class="w-100 grow pa3 {{ $classes }}"
{{ with .link_attr }}{{ . | safeHTMLAttr }}{{ end }}>
{{ with $logo }}
{{ .Content | safeHTML }}
{{ else }}
{{ .name }}
{{ end }}
</a>
</div>
{{ end }}
</div>
@@ -356,7 +356,7 @@ Renders the given image using the given filter, if any.
{{- if $u.IsAbs }}
{{- with resources.GetRemote $u.String }}
{{- with .Err }}
{{- errorf "%s" }}
{{- errorf "%s" . }}
{{- else }}
{{- /* This is a remote resource. */}}
{{- $r = . }}
+1 -1
View File
@@ -1 +1 @@
# github.com/gohugoio/gohugoioTheme v0.0.0-20240508091825-b23e8e2d2419
# github.com/gohugoio/gohugoioTheme v0.0.0-20240619093131-b595d5fb8c52
+1 -1
View File
@@ -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
+2
View File
@@ -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=