Use not with a pipe

This commit is contained in:
Will Faught
2023-01-29 15:32:42 -08:00
parent 7a8c3693b5
commit 278d0859f5
3 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
{{ $page := . }}
{{ $copyright := site.Copyright }}
{{ $credit := not ($page.Param "paige.hide_credit_link") }}
{{ $credit := $page.Param "paige.hide_credit_link" | not }}
{{ $first := templates.Exists "partials/paige/footer-first.html" }}
{{ $last := templates.Exists "partials/paige/footer-last.html" }}

View File

@@ -34,7 +34,7 @@ function paigeResize() {
}
paigeResize();
addEventListener("resize", paigeResize);
{{ if not ($page.Param "paige.color_scheme") }}
{{ if $page.Param "paige.color_scheme" | not }}
var paigeQuery = matchMedia("(prefers-color-scheme: dark)");
if (paigeQuery.matches) {
document.documentElement.setAttribute("data-bs-theme", "dark")