Change .Site.Params to $page.Param

This commit is contained in:
Will Faught
2023-01-29 12:17:15 -08:00
parent c38ea4e460
commit 4d3bb0d4f3
5 changed files with 11 additions and 7 deletions

View File

@@ -8,7 +8,7 @@
{{ end }}
<link href="{{ relLangURL `favicon.png` | safeURL }}" rel="icon" type="image/png">
<link href="{{ relLangURL `favicon.svg` | safeURL }}" rel="icon" type="image/svg+xml">
<link color="{{ .Site.Params.paige.color | default `#0d6efd` }}" href="{{ relLangURL `safari-pinned-tab.svg` | safeURL }}" rel="mask-icon">
<link color="{{ $page.Param `paige.color` | default `#0d6efd` }}" href="{{ relLangURL `safari-pinned-tab.svg` | safeURL }}" rel="mask-icon">
<link href="{{ relLangURL `site.webmanifest` | safeURL }}" rel="manifest">
{{ partial "paige/link.html" (dict
"href" (site.Params.paige.bootstrap.icons.link_href | default "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.3/font/bootstrap-icons.css")

View File

@@ -1,3 +1,5 @@
{{ $page := . }}
<script>
function paigeResize() {
var e = document.querySelector('section[class="paige-content"]');
@@ -32,7 +34,7 @@ function paigeResize() {
}
paigeResize();
addEventListener("resize", paigeResize);
{{ if not .Site.Params.paige.color_scheme }}
{{ if not ($page.Param "paige.color_scheme") }}
var paigeQuery = matchMedia("(prefers-color-scheme: dark)");
if (paigeQuery.matches) {
document.documentElement.setAttribute("data-bs-theme", "dark")

View File

@@ -1,4 +1,6 @@
{{ with .Site.Params.paige.social }}
{{ $page := . }}
{{ with $page.Param "paige.social" }}
<section>
<nav>
<div class="mb-3 text-center">