You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.5 KiB
HTML

{{ $page := . }}
<script>
function paigeResize() {
var e = document.querySelector("#paige-content");
if (!e) {
e = document.querySelector(".paige-content");
if (!e) {
return;
}
}
var mw = getComputedStyle(e).maxWidth;
var w;
if (mw === "100%") {
var e = document.querySelector("#paige-root");
var s = getComputedStyle(e);
var px = parseFloat(s.paddingLeft) + parseFloat(s.paddingRight);
var bx = parseFloat(s.borderLeftWidth) + parseFloat(s.borderRightWidth);
w = e.offsetWidth - px - bx;
} else {
w = parseFloat(mw.substring(0, mw.length - 2));
}
var es = document.querySelectorAll(".paige-video");
for (var i = 0; i < es.length; i++) {
var e = es[i];
if (!e.style.height && !e.style.width) {
e.style.width = w + "px";
}
}
}
paigeResize();
addEventListener("resize", paigeResize);
</script>
{{ partial "paige/script.html" (dict "src" "paige/bootstrap/bootstrap.bundle.js") }}
{{ if or ($page.Param "paige.math") (and ($page.Param "paige.section_pages.full_pages") (where $page.Pages "Params.paige.math" "eq" true)) }}
{{ partial "paige/script.html" (dict "src" "paige/katex/katex.js") }}
{{ partial "paige/script.html" (dict "onload" "renderMathInElement(document.body);" "src" "paige/katex/auto-render.js") }}
{{ end }}
{{ partial "paige/analytics.html" $page }}
<noscript>{{ i18n "paige_noscript" }}</noscript>