fix: harden editorial brand rendering and SEO
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
ageRestriction: 18
|
ageRestriction: 18
|
||||||
responsibleGamblingOrgName: "BeGambleAware / GamCare"
|
responsibleGamblingOrgName: "BeGambleAware / GamCare"
|
||||||
responsibleGamblingUrl: "https://www.begambleaware.org"
|
responsibleGamblingUrl: "https://www.begambleaware.org"
|
||||||
|
responsibleGamblingPhone: "0808 8020 133"
|
||||||
currencySymbol: "£"
|
currencySymbol: "£"
|
||||||
requiredKycDocs:
|
requiredKycDocs:
|
||||||
- "Passport, driving licence or national ID card"
|
- "Passport, driving licence or national ID card"
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ affiliateDisclosure: "Partnerhinweis"
|
|||||||
allRightsReserved: "Alle Rechte vorbehalten."
|
allRightsReserved: "Alle Rechte vorbehalten."
|
||||||
gambleResponsibly: "Verantwortungsvoll spielen"
|
gambleResponsibly: "Verantwortungsvoll spielen"
|
||||||
licenceStatement: "%s ist durch %s lizenziert und reguliert (Lizenznr. %s)."
|
licenceStatement: "%s ist durch %s lizenziert und reguliert (Lizenznr. %s)."
|
||||||
|
editorialSiteStatement: "%s ist eine unabhängige Informations- und Affiliate-Website, kein Glücksspielanbieter."
|
||||||
overAgeOnly: "Nur für Erwachsene"
|
overAgeOnly: "Nur für Erwachsene"
|
||||||
sslSecured: "SSL-gesichert"
|
sslSecured: "SSL-gesichert"
|
||||||
licensedOperator: "Lizenzierter iGaming-Anbieter"
|
licensedOperator: "Lizenzierter iGaming-Anbieter"
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ affiliateDisclosure: "Affiliate disclosure"
|
|||||||
allRightsReserved: "All rights reserved."
|
allRightsReserved: "All rights reserved."
|
||||||
gambleResponsibly: "Gamble responsibly"
|
gambleResponsibly: "Gamble responsibly"
|
||||||
licenceStatement: "%s is licensed and regulated by %s (Licence No. %s)."
|
licenceStatement: "%s is licensed and regulated by %s (Licence No. %s)."
|
||||||
|
editorialSiteStatement: "%s is an independent information and affiliate website, not a gambling operator."
|
||||||
overAgeOnly: "Adults only"
|
overAgeOnly: "Adults only"
|
||||||
sslSecured: "SSL secured"
|
sslSecured: "SSL secured"
|
||||||
licensedOperator: "Licensed iGaming operator"
|
licensedOperator: "Licensed iGaming operator"
|
||||||
|
|||||||
@@ -48,11 +48,10 @@
|
|||||||
</main>
|
</main>
|
||||||
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
{{ partial "cookie-consent.html" . }}
|
|
||||||
|
|
||||||
{{/* App bundle (age gate, cookie consent, games filter). Loads BEFORE Alpine so the
|
{{/* App bundle (age gate and games filter). Loads BEFORE Alpine so the
|
||||||
gamesFilter component is registered on the alpine:init event. */}}
|
gamesFilter component is registered on the alpine:init event. */}}
|
||||||
{{ $appJs := slice (resources.Get "js/age-gate.js") (resources.Get "js/cookie-consent.js") (resources.Get "js/games-filter.js") | resources.Concat "js/app.js" | minify | fingerprint "sha256" }}
|
{{ $appJs := slice (resources.Get "js/age-gate.js") (resources.Get "js/games-filter.js") | resources.Concat "js/app.js" | minify | fingerprint "sha256" }}
|
||||||
<script defer src="{{ $appJs.RelPermalink }}" integrity="{{ $appJs.Data.Integrity }}" crossorigin="anonymous"></script>
|
<script defer src="{{ $appJs.RelPermalink }}" integrity="{{ $appJs.Data.Integrity }}" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
{{/* Alpine.js — vendored first-party (assets/js/vendor/alpine.js, pinned 3.14.8,
|
{{/* Alpine.js — vendored first-party (assets/js/vendor/alpine.js, pinned 3.14.8,
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
{{- $text := .text | default "Visit Casino" -}}
|
{{- $text := .text | default "Visit Casino" -}}
|
||||||
{{- $style := .style | default "primary" -}}
|
{{- $style := .style | default "primary" -}}
|
||||||
{{- $size := .size | default "" -}}
|
{{- $size := .size | default "" -}}
|
||||||
|
{{- $affiliateURL := $brand.affiliateBaseUrl | default "" -}}
|
||||||
|
{{- $siteURL := strings.TrimSuffix "/" $page.Site.BaseURL -}}
|
||||||
|
{{- $targetURL := strings.TrimSuffix "/" $affiliateURL -}}
|
||||||
|
{{- if and $affiliateURL (ne $targetURL $siteURL) -}}
|
||||||
|
|
||||||
{{- $subid := .subid | default "" -}}
|
{{- $subid := .subid | default "" -}}
|
||||||
{{- if not $subid -}}
|
{{- if not $subid -}}
|
||||||
@@ -27,7 +31,7 @@
|
|||||||
{{- if not $subid -}}{{- $subid = $page.Type -}}{{- end -}}
|
{{- if not $subid -}}{{- $subid = $page.Type -}}{{- end -}}
|
||||||
{{- if or (eq $subid "_index") (eq $subid "") -}}{{- $subid = "home" -}}{{- end -}}
|
{{- if or (eq $subid "_index") (eq $subid "") -}}{{- $subid = "home" -}}{{- end -}}
|
||||||
|
|
||||||
{{- $href := printf "%s?%s=%s" $brand.affiliateBaseUrl $brand.affiliateSubIdParam $subid -}}
|
{{- $href := printf "%s?%s=%s" $affiliateURL $brand.affiliateSubIdParam $subid -}}
|
||||||
|
|
||||||
{{- $classes := "btn-primary" -}}
|
{{- $classes := "btn-primary" -}}
|
||||||
{{- if eq $style "secondary" -}}{{- $classes = "btn-secondary" -}}{{- end -}}
|
{{- if eq $style "secondary" -}}{{- $classes = "btn-secondary" -}}{{- end -}}
|
||||||
@@ -37,3 +41,4 @@
|
|||||||
{{- with .class -}}{{- $classes = printf "%s %s" $classes . -}}{{- end -}}
|
{{- with .class -}}{{- $classes = printf "%s %s" $classes . -}}{{- end -}}
|
||||||
|
|
||||||
<a href="{{ $href }}" class="{{ $classes }}" rel="sponsored nofollow noopener" target="_blank" data-affiliate data-subid="{{ $subid }}">{{ $text }}</a>
|
<a href="{{ $href }}" class="{{ $classes }}" rel="sponsored nofollow noopener" target="_blank" data-affiliate data-subid="{{ $subid }}">{{ $text }}</a>
|
||||||
|
{{- end -}}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
<p class="mt-3 text-sm text-white/70">{{ $brand.tagline }}</p>
|
<p class="mt-3 text-sm text-white/70">{{ $brand.tagline }}</p>
|
||||||
<div class="mt-4 flex items-center gap-3">
|
<div class="mt-4 flex items-center gap-3">
|
||||||
{{- range $brand.socialLinks -}}
|
{{- range $brand.socialLinks -}}
|
||||||
|
{{- if and .url (not (in .url ".example")) -}}
|
||||||
<a href="{{ .url }}" target="_blank" rel="noopener nofollow" class="text-white/70 hover:text-white" aria-label="{{ .platform | title }}">
|
<a href="{{ .url }}" target="_blank" rel="noopener nofollow" class="text-white/70 hover:text-white" aria-label="{{ .platform | title }}">
|
||||||
{{- if eq .platform "twitter" -}}
|
{{- if eq .platform "twitter" -}}
|
||||||
<svg class="h-5 w-5" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M18.9 2H22l-7.5 8.6L23 22h-6.8l-5.3-7-6.1 7H1.7l8-9.2L1 2h7l4.8 6.4L18.9 2Zm-2.4 18h1.9L7.6 4H5.6l10.9 16Z"/></svg>
|
<svg class="h-5 w-5" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M18.9 2H22l-7.5 8.6L23 22h-6.8l-5.3-7-6.1 7H1.7l8-9.2L1 2h7l4.8 6.4L18.9 2Zm-2.4 18h1.9L7.6 4H5.6l10.9 16Z"/></svg>
|
||||||
@@ -32,7 +33,11 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
</a>
|
</a>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
|
{{- with $brand.contactEmail -}}
|
||||||
|
{{- if not (in . ".example") -}}<p class="mt-3 text-sm"><a href="mailto:{{ . }}" class="text-white/80 hover:text-white">{{ . }}</a></p>{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{/* Explore */}}
|
{{/* Explore */}}
|
||||||
@@ -52,9 +57,6 @@
|
|||||||
{{- range $legal -}}
|
{{- range $legal -}}
|
||||||
<li><a href="{{ .RelPermalink }}" class="text-white/80 no-underline hover:text-white hover:underline">{{ .LinkTitle }}</a></li>
|
<li><a href="{{ .RelPermalink }}" class="text-white/80 no-underline hover:text-white hover:underline">{{ .LinkTitle }}</a></li>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<li>
|
|
||||||
<button type="button" onclick="window.openCookieSettings && window.openCookieSettings()" class="text-white/80 underline-offset-2 hover:text-white hover:underline">{{ i18n "cookieSettings" }}</button>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
@@ -74,7 +76,11 @@
|
|||||||
<div class="site-container flex flex-col gap-3 py-6 text-xs text-white/60 md:flex-row md:items-center md:justify-between">
|
<div class="site-container flex flex-col gap-3 py-6 text-xs text-white/60 md:flex-row md:items-center md:justify-between">
|
||||||
<p>
|
<p>
|
||||||
<span class="mr-2 inline-flex items-center rounded bg-white/10 px-2 py-1 font-bold text-white"><span data-age-value>{{ $brand.ageRestrictionDefault }}</span>+ {{ i18n "gambleResponsibly" }}</span>
|
<span class="mr-2 inline-flex items-center rounded bg-white/10 px-2 py-1 font-bold text-white"><span data-age-value>{{ $brand.ageRestrictionDefault }}</span>+ {{ i18n "gambleResponsibly" }}</span>
|
||||||
|
{{- if and $brand.legalOperatorName $brand.licenseAuthority $brand.licenseNumber (not (in $brand.licenseNumber "XXX")) -}}
|
||||||
{{ printf (i18n "licenceStatement") $brand.legalOperatorName $brand.licenseAuthority $brand.licenseNumber }}
|
{{ printf (i18n "licenceStatement") $brand.legalOperatorName $brand.licenseAuthority $brand.licenseNumber }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ printf (i18n "editorialSiteStatement") $brand.name }}
|
||||||
|
{{- end -}}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
© {{ now.Year }} {{ $brand.name }}. {{ i18n "allRightsReserved" }}
|
© {{ now.Year }} {{ $brand.name }}. {{ i18n "allRightsReserved" }}
|
||||||
|
|||||||
@@ -3,11 +3,10 @@
|
|||||||
fall back sensibly to brand data. */ -}}
|
fall back sensibly to brand data. */ -}}
|
||||||
{{- $brand := .Site.Data.brand -}}
|
{{- $brand := .Site.Data.brand -}}
|
||||||
|
|
||||||
{{- $title := "" -}}
|
{{- $pageTitle := .Params.seoTitle | default .Params.title | default .Title -}}
|
||||||
{{- if .IsHome -}}
|
{{- $title := $pageTitle -}}
|
||||||
{{- $title = .Params.title | default (printf "%s | %s" $brand.name $brand.tagline) -}}
|
{{- if and (not .IsHome) (not (in (lower $pageTitle) (lower $brand.name))) -}}
|
||||||
{{- else -}}
|
{{- $title = printf "%s | %s" $pageTitle $brand.name -}}
|
||||||
{{- $title = printf "%s | %s" (.Params.title | default .Title) $brand.name -}}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- $desc := "" -}}
|
{{- $desc := "" -}}
|
||||||
@@ -19,30 +18,55 @@
|
|||||||
{{- $desc = $desc | plainify | chomp | truncate 160 -}}
|
{{- $desc = $desc | plainify | chomp | truncate 160 -}}
|
||||||
|
|
||||||
{{- /* Per-page OG image override (.Params.image) with fallback to the site default. */ -}}
|
{{- /* Per-page OG image override (.Params.image) with fallback to the site default. */ -}}
|
||||||
{{- $ogImage := (.Params.image | default .Site.Params.ogImage) | absURL -}}
|
{{- $imagePath := .Params.image | default .Site.Params.ogImage -}}
|
||||||
|
{{- $ogImage := cond (ne $imagePath "") ($imagePath | absURL) "" -}}
|
||||||
|
{{- $ogImageAlt := .Params.imageAlt | default (printf "%s - %s" $brand.name $pageTitle) -}}
|
||||||
|
{{- $ogLocale := $brand.defaultLocale | default .Language.LanguageCode | default .Language.Lang -}}
|
||||||
|
{{- range $brand.supportedLocales -}}
|
||||||
|
{{- if or (eq . $.Language.LanguageCode) (hasPrefix . (printf "%s-" $.Language.Lang)) -}}{{- $ogLocale = . -}}{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $isPlaceholderHost := or (in (lower .Site.BaseURL) "example.com") (in (lower .Site.BaseURL) ".example") -}}
|
||||||
|
{{- $noindex := or .Params.noindex $isPlaceholderHost (eq .Kind "404") -}}
|
||||||
|
{{- $schemaType := .Params.schemaType | default "none" -}}
|
||||||
|
{{- $isArticle := in (slice "Article" "Review") $schemaType -}}
|
||||||
|
{{- $canonical := .Params.canonicalURL | default .Permalink -}}
|
||||||
|
|
||||||
<title>{{ $title }}</title>
|
<title>{{ $title }}</title>
|
||||||
<meta name="description" content="{{ $desc }}">
|
<meta name="description" content="{{ $desc }}">
|
||||||
<link rel="canonical" href="{{ .Permalink }}">
|
{{- if ne .Kind "404" }}
|
||||||
<meta name="robots" content="{{ if .Params.noindex }}noindex,nofollow{{ else }}index,follow{{ end }}">
|
<link rel="canonical" href="{{ $canonical }}">
|
||||||
<meta name="author" content="{{ $brand.name }}">
|
{{- end }}
|
||||||
|
<meta name="robots" content="{{ if $noindex }}noindex,follow{{ else }}index,follow{{ end }}">
|
||||||
|
<meta name="author" content="{{ .Params.authorName | default $brand.name }}">
|
||||||
|
|
||||||
{{- /* Open Graph */ -}}
|
{{- /* Open Graph */ -}}
|
||||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
|
<meta property="og:type" content="{{ if $isArticle }}article{{ else }}website{{ end }}">
|
||||||
<meta property="og:title" content="{{ $title }}">
|
<meta property="og:title" content="{{ $title }}">
|
||||||
<meta property="og:description" content="{{ $desc }}">
|
<meta property="og:description" content="{{ $desc }}">
|
||||||
<meta property="og:url" content="{{ .Permalink }}">
|
<meta property="og:url" content="{{ .Permalink }}">
|
||||||
<meta property="og:site_name" content="{{ $brand.name }}">
|
<meta property="og:site_name" content="{{ $brand.name }}">
|
||||||
<meta property="og:locale" content="{{ replace (.Language.LanguageCode | default .Language.Lang) "-" "_" }}">
|
<meta property="og:locale" content="{{ replace $ogLocale "-" "_" }}">
|
||||||
<meta property="og:image" content="{{ $ogImage }}">
|
{{- with $ogImage }}
|
||||||
<meta property="og:image:width" content="1200">
|
<meta property="og:image" content="{{ . }}">
|
||||||
<meta property="og:image:height" content="630">
|
<meta property="og:image:alt" content="{{ $ogImageAlt }}">
|
||||||
|
<meta property="og:image:width" content="{{ $.Params.imageWidth | default 1200 }}">
|
||||||
|
<meta property="og:image:height" content="{{ $.Params.imageHeight | default 630 }}">
|
||||||
|
{{- end }}
|
||||||
|
{{- if and $isArticle (not .Date.IsZero) }}
|
||||||
|
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
|
||||||
|
{{- end }}
|
||||||
|
{{- if and $isArticle (not .Lastmod.IsZero) }}
|
||||||
|
<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- /* Twitter */ -}}
|
{{- /* Twitter */ -}}
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
<meta name="twitter:title" content="{{ $title }}">
|
<meta name="twitter:title" content="{{ $title }}">
|
||||||
<meta name="twitter:description" content="{{ $desc }}">
|
<meta name="twitter:description" content="{{ $desc }}">
|
||||||
<meta name="twitter:image" content="{{ $ogImage }}">
|
{{- with $ogImage }}
|
||||||
|
<meta name="twitter:image" content="{{ . }}">
|
||||||
|
<meta name="twitter:image:alt" content="{{ $ogImageAlt }}">
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- /* hreflang alternates for the multilingual build. No-op on single-language
|
{{- /* hreflang alternates for the multilingual build. No-op on single-language
|
||||||
sites (.IsTranslated is false), so it is safe to keep permanently. URL
|
sites (.IsTranslated is false), so it is safe to keep permanently. URL
|
||||||
|
|||||||
@@ -62,9 +62,20 @@
|
|||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
var brand = window.__BRAND__ || {};
|
var brand = window.__BRAND__ || {};
|
||||||
|
var pageLocale = document.documentElement.lang || "";
|
||||||
var stored = null;
|
var stored = null;
|
||||||
try { stored = localStorage.getItem("siteLocale"); } catch (e) {}
|
try { stored = localStorage.getItem("siteLocale"); } catch (e) {}
|
||||||
apply(stored || brand.defaultLocale);
|
var preferred = stored;
|
||||||
|
if (pageLocale) {
|
||||||
|
var locales = window.__LOCALES__ || [];
|
||||||
|
for (var i = 0; i < locales.length; i++) {
|
||||||
|
if (locales[i].locale === pageLocale || locales[i].locale.indexOf(pageLocale + "-") === 0) {
|
||||||
|
preferred = locales[i].locale;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
apply(preferred || brand.defaultLocale);
|
||||||
// If a region selector is present (reintroduced later), wire it up.
|
// If a region selector is present (reintroduced later), wire it up.
|
||||||
document.querySelectorAll("[data-locale-switcher]").forEach(function (sel) {
|
document.querySelectorAll("[data-locale-switcher]").forEach(function (sel) {
|
||||||
sel.addEventListener("change", function () { apply(this.value); });
|
sel.addEventListener("change", function () { apply(this.value); });
|
||||||
|
|||||||
@@ -6,21 +6,27 @@
|
|||||||
{{- $variant := .variant | default "full" -}}
|
{{- $variant := .variant | default "full" -}}
|
||||||
{{- $brand := $page.Site.Data.brand -}}
|
{{- $brand := $page.Site.Data.brand -}}
|
||||||
{{- $locales := $page.Site.Data.locales -}}
|
{{- $locales := $page.Site.Data.locales -}}
|
||||||
{{- $currentLocale := $page.Language.LanguageCode | default $brand.defaultLocale -}}
|
{{- $currentLocale := $brand.defaultLocale -}}
|
||||||
|
{{- range $brand.supportedLocales -}}
|
||||||
|
{{- if or (eq . $page.Language.LanguageCode) (hasPrefix . (printf "%s-" $page.Language.Lang)) -}}{{- $currentLocale = . -}}{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
{{- $default := "" -}}
|
{{- $default := "" -}}
|
||||||
{{- with where $locales "locale" $currentLocale -}}{{- $default = index . 0 -}}{{- end -}}
|
{{- with where $locales "locale" $currentLocale -}}{{- $default = index . 0 -}}{{- end -}}
|
||||||
{{- $age := $brand.ageRestrictionDefault -}}
|
{{- $age := $brand.ageRestrictionDefault -}}
|
||||||
{{- $orgName := "your national support service" -}}
|
{{- $orgName := "your national support service" -}}
|
||||||
{{- $orgUrl := "#" -}}
|
{{- $orgUrl := "#" -}}
|
||||||
|
{{- $orgPhone := "" -}}
|
||||||
{{- with $default -}}
|
{{- with $default -}}
|
||||||
{{- $age = .ageRestriction -}}
|
{{- $age = .ageRestriction -}}
|
||||||
{{- $orgName = .responsibleGamblingOrgName -}}
|
{{- $orgName = .responsibleGamblingOrgName -}}
|
||||||
{{- $orgUrl = .responsibleGamblingUrl -}}
|
{{- $orgUrl = .responsibleGamblingUrl -}}
|
||||||
|
{{- $orgPhone = .responsibleGamblingPhone | default "" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if eq $variant "compact" -}}
|
{{- if eq $variant "compact" -}}
|
||||||
<p>{{ printf (i18n "rgCompactIntro") $age }}</p>
|
<p>{{ printf (i18n "rgCompactIntro") $age }}</p>
|
||||||
<p class="mt-2">{{ i18n "rgNeedHelp" }} <a data-rg-link href="{{ $orgUrl }}" target="_blank" rel="noopener nofollow" class="font-semibold text-white underline"><span data-rg-name>{{ $orgName }}</span></a>.</p>
|
<p class="mt-2">{{ i18n "rgNeedHelp" }} <a data-rg-link href="{{ $orgUrl }}" target="_blank" rel="noopener nofollow" class="font-semibold text-white underline"><span data-rg-name>{{ $orgName }}</span></a>.</p>
|
||||||
|
{{- with $orgPhone }}<p class="mt-2">Free helpline: <a href="tel:{{ replace . " " "" }}" class="font-semibold text-white underline">{{ . }}</a>.</p>{{ end -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<div class="prose-content">
|
<div class="prose-content">
|
||||||
<p>
|
<p>
|
||||||
@@ -52,7 +58,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{{ .label | default .locale }}</td>
|
<td>{{ .label | default .locale }}</td>
|
||||||
<td>{{ .ageRestriction }}+</td>
|
<td>{{ .ageRestriction }}+</td>
|
||||||
<td><a href="{{ .responsibleGamblingUrl }}" target="_blank" rel="noopener nofollow">{{ .responsibleGamblingOrgName }}</a></td>
|
<td><a href="{{ .responsibleGamblingUrl }}" target="_blank" rel="noopener nofollow">{{ .responsibleGamblingOrgName }}</a>{{ with .responsibleGamblingPhone }}<br><a href="tel:{{ replace . " " "" }}">{{ . }}</a>{{ end }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -16,18 +16,16 @@
|
|||||||
"url" .Site.BaseURL
|
"url" .Site.BaseURL
|
||||||
"logo" ($brand.logoPath | absURL)
|
"logo" ($brand.logoPath | absURL)
|
||||||
"description" $brand.tagline
|
"description" $brand.tagline
|
||||||
"email" $brand.contactEmail
|
|
||||||
"foundingDate" (printf "%d" (int $brand.foundedYear))
|
|
||||||
"sameAs" $sameAs
|
"sameAs" $sameAs
|
||||||
-}}
|
-}}
|
||||||
|
{{- with $brand.contactEmail -}}{{- if not (in . ".example") -}}{{- $data = merge $data (dict "email" .) -}}{{- end -}}{{- end -}}
|
||||||
|
{{- with $brand.foundedYear -}}{{- if gt (int .) 0 -}}{{- $data = merge $data (dict "foundingDate" (printf "%d" (int .))) -}}{{- end -}}{{- end -}}
|
||||||
<script type="application/ld+json">{{ $data | jsonify | safeJS }}</script>
|
<script type="application/ld+json">{{ $data | jsonify | safeJS }}</script>
|
||||||
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if or .IsHome (eq $type "FAQPage") .Params.showFaqAccordion -}}
|
{{- if eq $type "FAQPage" -}}
|
||||||
{{- $faqKey := printf "faq.%s" .Language.Lang -}}
|
{{- $faqs := .Params.faqItems | default .Site.Data.faq -}}
|
||||||
{{- $faqs := index .Site.Data $faqKey -}}
|
|
||||||
{{- if not $faqs -}}{{- $faqs = .Site.Data.faq -}}{{- end -}}
|
|
||||||
{{- $items := slice -}}
|
{{- $items := slice -}}
|
||||||
{{- range $faqs -}}
|
{{- range $faqs -}}
|
||||||
{{- $items = $items | append (dict
|
{{- $items = $items | append (dict
|
||||||
@@ -36,41 +34,64 @@
|
|||||||
"acceptedAnswer" (dict "@type" "Answer" "text" .answer)
|
"acceptedAnswer" (dict "@type" "Answer" "text" .answer)
|
||||||
) -}}
|
) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- if gt (len $items) 0 -}}
|
||||||
{{- $data := dict
|
{{- $data := dict
|
||||||
"@context" "https://schema.org"
|
"@context" "https://schema.org"
|
||||||
"@type" "FAQPage"
|
"@type" "FAQPage"
|
||||||
"mainEntity" $items
|
"mainEntity" $items
|
||||||
-}}
|
-}}
|
||||||
<script type="application/ld+json">{{ $data | jsonify | safeJS }}</script>
|
<script type="application/ld+json">{{ $data | jsonify | safeJS }}</script>
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if and (eq $type "Article") .Params.showRatingWidget -}}
|
{{- if eq $type "Review" -}}
|
||||||
{{- $authorName := .Params.authorName | default $brand.name -}}
|
{{- $authorName := .Params.authorName | default $brand.name -}}
|
||||||
{{- $authorType := cond (isset .Params "authorName") "Person" "Organization" -}}
|
{{- $authorType := cond (isset .Params "authorName") "Person" "Organization" -}}
|
||||||
{{- $data := dict
|
{{- $data := dict
|
||||||
"@context" "https://schema.org"
|
"@context" "https://schema.org"
|
||||||
"@type" "Review"
|
"@type" "Review"
|
||||||
"headline" (.Params.h1 | default .Title)
|
"headline" (.Params.h1 | default .Title)
|
||||||
|
"description" (.Params.description | default .Summary | plainify)
|
||||||
"url" .Permalink
|
"url" .Permalink
|
||||||
"datePublished" (.Date.Format "2006-01-02")
|
|
||||||
"dateModified" (.Lastmod.Format "2006-01-02")
|
|
||||||
"author" (dict "@type" $authorType "name" $authorName)
|
"author" (dict "@type" $authorType "name" $authorName)
|
||||||
"publisher" (dict "@type" "Organization" "name" $brand.name "logo" (dict "@type" "ImageObject" "url" ($brand.logoPath | absURL)))
|
"publisher" (dict "@type" "Organization" "name" $brand.name "logo" (dict "@type" "ImageObject" "url" ($brand.logoPath | absURL)))
|
||||||
"itemReviewed" (dict "@type" "Organization" "name" $brand.name)
|
"itemReviewed" (dict "@type" "Organization" "name" (.Params.reviewedOrganization | default .Title))
|
||||||
"reviewRating" (dict "@type" "Rating" "ratingValue" (.Params.rating | default $brand.ratingValue) "bestRating" 5 "worstRating" 1)
|
"reviewRating" (dict "@type" "Rating" "ratingValue" (.Params.rating | default $brand.ratingValue) "bestRating" 5 "worstRating" 1)
|
||||||
-}}
|
-}}
|
||||||
|
{{- if not .Date.IsZero -}}{{- $data = merge $data (dict "datePublished" (.Date.Format "2006-01-02")) -}}{{- end -}}
|
||||||
|
{{- if not .Lastmod.IsZero -}}{{- $data = merge $data (dict "dateModified" (.Lastmod.Format "2006-01-02")) -}}{{- end -}}
|
||||||
<script type="application/ld+json">{{ $data | jsonify | safeJS }}</script>
|
<script type="application/ld+json">{{ $data | jsonify | safeJS }}</script>
|
||||||
{{- else if eq $type "Article" -}}
|
{{- else if eq $type "Article" -}}
|
||||||
|
{{- $authorName := .Params.authorName | default $brand.name -}}
|
||||||
|
{{- $authorType := cond (isset .Params "authorName") "Person" "Organization" -}}
|
||||||
{{- $data := dict
|
{{- $data := dict
|
||||||
"@context" "https://schema.org"
|
"@context" "https://schema.org"
|
||||||
"@type" "Article"
|
"@type" "Article"
|
||||||
"headline" (.Params.h1 | default .Title)
|
"headline" (.Params.h1 | default .Title)
|
||||||
|
"description" (.Params.description | default .Summary | plainify)
|
||||||
"url" .Permalink
|
"url" .Permalink
|
||||||
"datePublished" (.Date.Format "2006-01-02")
|
"mainEntityOfPage" (dict "@type" "WebPage" "@id" .Permalink)
|
||||||
"dateModified" (.Lastmod.Format "2006-01-02")
|
"author" (dict "@type" $authorType "name" $authorName)
|
||||||
"author" (dict "@type" "Organization" "name" $brand.name)
|
|
||||||
"publisher" (dict "@type" "Organization" "name" $brand.name "logo" (dict "@type" "ImageObject" "url" ($brand.logoPath | absURL)))
|
"publisher" (dict "@type" "Organization" "name" $brand.name "logo" (dict "@type" "ImageObject" "url" ($brand.logoPath | absURL)))
|
||||||
-}}
|
-}}
|
||||||
|
{{- with (.Params.image | default .Site.Params.ogImage) -}}{{- $data = merge $data (dict "image" (. | absURL)) -}}{{- end -}}
|
||||||
|
{{- if not .Date.IsZero -}}{{- $data = merge $data (dict "datePublished" (.Date.Format "2006-01-02")) -}}{{- end -}}
|
||||||
|
{{- if not .Lastmod.IsZero -}}{{- $data = merge $data (dict "dateModified" (.Lastmod.Format "2006-01-02")) -}}{{- end -}}
|
||||||
<script type="application/ld+json">{{ $data | jsonify | safeJS }}</script>
|
<script type="application/ld+json">{{ $data | jsonify | safeJS }}</script>
|
||||||
|
{{- else if and (eq $type "HowTo") .Params.howToSteps -}}
|
||||||
|
{{- $steps := slice -}}
|
||||||
|
{{- range .Params.howToSteps -}}
|
||||||
|
{{- $steps = $steps | append (dict "@type" "HowToStep" "name" .name "text" .text) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if gt (len $steps) 0 -}}
|
||||||
|
{{- $data := dict
|
||||||
|
"@context" "https://schema.org"
|
||||||
|
"@type" "HowTo"
|
||||||
|
"name" (.Params.h1 | default .Title)
|
||||||
|
"description" (.Params.description | default .Summary | plainify)
|
||||||
|
"step" $steps
|
||||||
|
-}}
|
||||||
|
<script type="application/ld+json">{{ $data | jsonify | safeJS }}</script>
|
||||||
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
@@ -7,16 +7,15 @@
|
|||||||
<span class="grid h-5 w-5 place-items-center rounded-full bg-white/20"><span data-age-value>{{ $brand.ageRestrictionDefault }}</span></span>
|
<span class="grid h-5 w-5 place-items-center rounded-full bg-white/20"><span data-age-value>{{ $brand.ageRestrictionDefault }}</span></span>
|
||||||
{{ i18n "overAgeOnly" }}
|
{{ i18n "overAgeOnly" }}
|
||||||
</span>
|
</span>
|
||||||
|
{{- if and $brand.licenseAuthority $brand.licenseNumber (not (in $brand.licenseNumber "XXX")) }}
|
||||||
<span class="inline-flex items-center gap-2 rounded-full border border-white/20 px-3 py-1">
|
<span class="inline-flex items-center gap-2 rounded-full border border-white/20 px-3 py-1">
|
||||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M12 3l7 4v5c0 4.4-3 8.3-7 9-4-0.7-7-4.6-7-9V7l7-4z"/></svg>
|
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M12 3l7 4v5c0 4.4-3 8.3-7 9-4-0.7-7-4.6-7-9V7l7-4z"/></svg>
|
||||||
{{ $brand.licenseAuthority }}
|
{{ $brand.licenseAuthority }}
|
||||||
</span>
|
</span>
|
||||||
|
{{- end }}
|
||||||
<span class="inline-flex items-center gap-2 rounded-full border border-white/20 px-3 py-1">
|
<span class="inline-flex items-center gap-2 rounded-full border border-white/20 px-3 py-1">
|
||||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
|
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
|
||||||
{{ i18n "sslSecured" }}
|
{{ i18n "sslSecured" }}
|
||||||
</span>
|
</span>
|
||||||
<span class="inline-flex items-center gap-2 rounded-full border border-white/20 px-3 py-1">
|
|
||||||
{{ i18n "licensedOperator" }}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
User-agent: *
|
User-agent: *
|
||||||
|
{{- if or (in (lower .Site.BaseURL) "example.com") (in (lower .Site.BaseURL) ".example") }}
|
||||||
|
Disallow: /
|
||||||
|
{{- else }}
|
||||||
Allow: /
|
Allow: /
|
||||||
|
Disallow: /admin/
|
||||||
|
|
||||||
Sitemap: {{ "sitemap.xml" | absURL }}
|
Sitemap: {{ "sitemap.xml" | absURL }}
|
||||||
|
{{- end }}
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||||
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||||
|
{{- if not (or (in (lower .Site.BaseURL) "example.com") (in (lower .Site.BaseURL) ".example")) }}
|
||||||
|
{{- $language := .Language.Lang }}
|
||||||
|
{{- range where .Site.AllPages "Language.Lang" $language }}
|
||||||
|
{{- if and (not .Params.noindex) (ne .Kind "404") (ne .Kind "taxonomy") (ne .Kind "term") }}
|
||||||
|
<url>
|
||||||
|
<loc>{{ .Permalink }}</loc>
|
||||||
|
{{- if not .Lastmod.IsZero }}
|
||||||
|
<lastmod>{{ .Lastmod.Format "2006-01-02" }}</lastmod>
|
||||||
|
{{- end }}
|
||||||
|
{{- if .IsTranslated }}
|
||||||
|
{{- range .AllTranslations }}
|
||||||
|
<xhtml:link rel="alternate" hreflang="{{ .Language.LanguageCode | default .Language.Lang }}" href="{{ .Permalink }}" />
|
||||||
|
{{- end }}
|
||||||
|
{{- $defaultLang := (index site.Languages 0).Lang }}
|
||||||
|
{{- range .AllTranslations }}
|
||||||
|
{{- if eq .Language.Lang $defaultLang }}
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="{{ .Permalink }}" />
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
</url>
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
</urlset>
|
||||||
Reference in New Issue
Block a user