From 563b030d5c46ea2046aa284e21fd56fb2eb82fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Katarzyna=20Pietro=C5=84?= Date: Wed, 26 Jun 2024 13:52:09 +0200 Subject: [PATCH] Implement setting gdpr_country cookie with ISO country code --- packages/docs/layouts/_default/list.html | 10 ++++++++-- .../layouts/partials/footer/footer-scripts.html | 15 +++++++++++++++ packages/docs/layouts/partials/head/head.html | 11 ++++++++--- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/packages/docs/layouts/_default/list.html b/packages/docs/layouts/_default/list.html index def92a2..a4f76f8 100644 --- a/packages/docs/layouts/_default/list.html +++ b/packages/docs/layouts/_default/list.html @@ -1,7 +1,13 @@ {{ $hidden_sidenav := .Params.hidden_sidenav }} -{{ $api_file_exists := fileExists (printf "/content/%s/a.html" .File.Dir) }} -{{ $scrollspy_file_exists := fileExists (printf "/content/%s/index-ss.html" .File.Dir) }} +{{ $currentDir := "" }} +{{ with .File }} + {{ $currentDir = .Dir }} +{{ end }} + +{{ $api_file_exists := fileExists (printf "/content/%s/a.html" $currentDir) }} + +{{ $scrollspy_file_exists := fileExists (printf "/content/%s/index-ss.html" $currentDir) }} diff --git a/packages/docs/layouts/partials/footer/footer-scripts.html b/packages/docs/layouts/partials/footer/footer-scripts.html index 8c97740..dee3496 100644 --- a/packages/docs/layouts/partials/footer/footer-scripts.html +++ b/packages/docs/layouts/partials/footer/footer-scripts.html @@ -96,3 +96,18 @@ + diff --git a/packages/docs/layouts/partials/head/head.html b/packages/docs/layouts/partials/head/head.html index 8b1aacb..4aaf823 100644 --- a/packages/docs/layouts/partials/head/head.html +++ b/packages/docs/layouts/partials/head/head.html @@ -1,12 +1,17 @@ {{ partial "head/meta.html" . }} -{{ $styles := resources.Get "css/style.min.css" | postCSS }} +{{ $styles := resources.Get "css/style.min.css" }} +{{ if $styles }} + {{ $styles = $styles | postCSS }} +{{ end }} {{ if .Site.IsServer }} {{ else }} - {{ $styles := $styles | minify | fingerprint | resources.PostProcess }} - + {{ if $styles }} + {{ $styles = $styles | minify | fingerprint | resources.PostProcess }} + + {{ end }} {{ end }}