add relpermalink condition
All checks were successful
Website Prod/Test / Produktivumgebung (push) Successful in 14s
Website Prod/Test / Testumgebung (push) Successful in 8s

This commit is contained in:
Denys Konovalov 2025-01-16 18:07:17 +01:00
parent edd6b67125
commit 4ef28541b9

View File

@ -88,7 +88,7 @@
{{ if and $top_banner.enable }} {{ if and $top_banner.enable }}
{{ if or (not $top_banner.temporarily.enable) (and $top_banner.temporarily.enable (and (le ($top_banner.temporarily.start_date | time.AsTime) now) (ge ($top_banner.temporarily.end_date | time.AsTime) now))) }} {{ if or (not $top_banner.temporarily.enable) (and $top_banner.temporarily.enable (and (le ($top_banner.temporarily.start_date | time.AsTime) now) (ge ($top_banner.temporarily.end_date | time.AsTime) now))) }}
{{ with $top_banner }} {{ with $top_banner }}
{{ if .large }} {{ if and .large (eq $.Page.RelPermalink "/") }}
{{ $title := "Willkommen auf der Website des Georg-Cantor-Gymnasiums!" }} {{ $title := "Willkommen auf der Website des Georg-Cantor-Gymnasiums!" }}
{{ partial "modal" (dict "title" $title "content" (.text | markdownify)) }} {{ partial "modal" (dict "title" $title "content" (.text | markdownify)) }}
<script>$(window).on("DOMContentLoaded", () => $('#{{ md5 $title }}').modal('show'));</script> <script>$(window).on("DOMContentLoaded", () => $('#{{ md5 $title }}').modal('show'));</script>