Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion layouts/partials/outbound-url.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
{{- if strings.Contains $url "?" -}}
{{- $separator = "&" -}}
{{- end -}}
{{- printf "%s%sutm_source=signagelist&utm_medium=referral&utm_campaign=%s" $url $separator $campaign -}}
{{- $result := printf "%s%sutm_source=signagelist&utm_medium=referral&utm_campaign=%s" $url $separator $campaign | safeURL -}}
{{- return $result -}}
9 changes: 6 additions & 3 deletions layouts/products/single.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{{ define "main" }}
{{ $p := .Params }}
{{ $urlProductPage := partial "outbound-url.html" (dict "url" $p.website "campaign" "product_page") | safeURL }}
{{ $urlSidebar := partial "outbound-url.html" (dict "url" $p.website "campaign" "product_sidebar") | safeURL }}
{{ $urlSidebarCta := partial "outbound-url.html" (dict "url" $p.website "campaign" "product_sidebar_cta") | safeURL }}

<div class="max-w-screen-xl w-full mx-auto px-4 py-8 animate-fade-in-up">
{{/* Breadcrumb */}}
Expand All @@ -26,7 +29,7 @@ <h1 class="text-2xl font-bold text-neutral-900 flex items-center gap-3 flex-wrap
{{ with $p.description }}
<p class="text-neutral-600 mt-2 leading-relaxed">{{ . }}</p>
{{ end }}
<a href="{{ partial "outbound-url.html" (dict "url" $p.website "campaign" "product_page") }}" target="_blank" rel="noopener nofollow ugc" class="inline-flex items-center gap-1.5 text-primary-600 hover:text-primary-700 mt-3 text-sm font-medium transition-colors outbound-link" data-product="{{ $p.slug }}">
<a href="{{ $urlProductPage }}" target="_blank" rel="noopener nofollow ugc" class="inline-flex items-center gap-1.5 text-primary-600 hover:text-primary-700 mt-3 text-sm font-medium transition-colors outbound-link" data-product="{{ $p.slug }}">
Visit website
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"/></svg>
</a>
Expand Down Expand Up @@ -181,7 +184,7 @@ <h2 class="text-sm font-semibold text-neutral-900 uppercase tracking-wide">Quick
<dl class="divide-y divide-neutral-100">
<div class="px-6 py-3 flex justify-between items-start">
<dt class="text-sm text-neutral-500">Website</dt>
<dd class="text-sm text-right"><a href="{{ partial "outbound-url.html" (dict "url" $p.website "campaign" "product_sidebar") }}" target="_blank" rel="noopener nofollow ugc" class="text-primary-600 hover:text-primary-700 break-all transition-colors outbound-link" data-product="{{ $p.slug }}">{{ $p.website | replaceRE "^https?://(www\\.)?" "" | strings.TrimRight "/" }}</a></dd>
<dd class="text-sm text-right"><a href="{{ $urlSidebar }}" target="_blank" rel="noopener nofollow ugc" class="text-primary-600 hover:text-primary-700 break-all transition-colors outbound-link" data-product="{{ $p.slug }}">{{ $p.website | replaceRE "^https?://(www\\.)?" "" | strings.TrimRight "/" }}</a></dd>
</div>

{{ with $p.headquarters }}
Expand Down Expand Up @@ -341,7 +344,7 @@ <h2 class="text-sm font-semibold text-neutral-900 uppercase tracking-wide">Quick

{{/* CTA */}}
<div class="px-6 py-4 border-t border-neutral-200 space-y-2">
<a href="{{ partial "outbound-url.html" (dict "url" $p.website "campaign" "product_sidebar_cta") }}" target="_blank" rel="noopener nofollow ugc"
<a href="{{ $urlSidebarCta }}" target="_blank" rel="noopener nofollow ugc"
class="w-full inline-flex items-center justify-center gap-2 px-4 py-2.5 bg-primary-600 text-white text-sm font-medium rounded-lg hover:bg-primary-700 transition-colors outbound-link" data-product="{{ $p.slug }}">
Visit {{ $p.name }}
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"/></svg>
Expand Down
Loading