Files
hammerfest/layouts/_default/baseof.html
T
2026-09-30 16:19:00 -06:00

61 lines
2.4 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
{{ partial "head.html" . }}
</head>
<body id="top">
<a class="skip" href="#content">Skip to content</a>
<div class="page">
{{ partial "header.html" . }}
<main class="col" id="content" tabindex="-1">
{{ block "main" . }}{{ end }}
{{ partial "footer.html" . }}
</main>
</div>
<script>
/* Progressive only: fade sections in as they scroll into view, and mark
the rail's "On this page" link for the section being read. */
(function () {
var root = document.documentElement;
if (!('IntersectionObserver' in window)) return;
root.classList.add('js');
var io = new IntersectionObserver(function (entries) {
entries.forEach(function (e) {
if (e.isIntersecting) { e.target.classList.add('is-visible'); io.unobserve(e.target); }
});
}, { rootMargin: '0px 0px -8% 0px' });
document.querySelectorAll('[data-reveal]').forEach(function (el) { io.observe(el); });
var links = [].slice.call(document.querySelectorAll('.nav-here a'));
if (!links.length) return;
var targets = links.map(function (a) { return document.getElementById(decodeURIComponent(a.hash.slice(1))); });
var ticking = false;
function update() {
ticking = false;
var current = -1;
targets.forEach(function (t, i) { if (t && t.getBoundingClientRect().top < innerHeight * 0.3) current = i; });
links.forEach(function (a, i) {
if (i === current) a.setAttribute('aria-current', 'location'); else a.removeAttribute('aria-current');
});
}
addEventListener('scroll', function () { if (!ticking) { ticking = true; requestAnimationFrame(update); } }, { passive: true });
update();
})();
/* Pricing: a link to a plan panel's id (e.g. /pricing/#hosted) selects its tab. */
(function () {
function openPanel() {
var panel = location.hash && document.getElementById(decodeURIComponent(location.hash.slice(1)));
if (!panel || !panel.classList.contains('plan-panel')) return;
var i = [].indexOf.call(panel.parentNode.children, panel);
var radio = panel.closest('.plan-switch').querySelectorAll('.plan-radio')[i];
if (radio) { radio.checked = true; (panel.closest('.section') || panel).scrollIntoView(); }
}
addEventListener('hashchange', openPanel);
openPanel();
})();
</script>
</body>
</html>