muddle/modules/amezing/components/base.spug
2026-10-23 08:53:07 -04:00

133 lines
5.1 KiB
Text

doctype html
html(lang="en" style=accentStyle ?? '')
head
meta(charset="UTF-8")
meta(name="viewport" content="width=device-width, initial-scale=1")
meta(name="description" content=description ?? '')
title= title
link(rel="stylesheet" href="/_muddle/amezing.css")
link(rel="stylesheet" href="/_muddle/styles.css")
link(rel="stylesheet" href="https://unpkg.com/@phosphor-icons/web@2.1.1/src/regular/style.css")
body
a#skip-to-content.link(href="#main-content" tabindex="0") Skip to content
header#site-header.firefox-unblur
ul#site-sidebar-controls
li#expand-sidebar-li
input#expand-sidebar.visually-hidden(type="checkbox" name="expand-sidebar" autocomplete="off")
label(for="expand-sidebar" title="Toggle sidebar")
i.ph.ph-sidebar(aria-hidden="true")
ul#site-sidebar-modes(role="radiogroup")
li
input#mode-nav.visually-hidden(type="radio" name="mode" checked)
label(for="mode-nav" title="Navigation mode")
i.ph.ph-compass(aria-hidden="true")
li
input#mode-meta.visually-hidden(type="radio" name="mode")
label(for="mode-meta" title="Meta mode")
i.ph.ph-info(aria-hidden="true")
span.title= title
ul.buttons
li
details.closable
summary(title="Feed")
i.ph.ph-rss-simple(aria-hidden="true")
ul.dropdown
li
a(href="/atom.xml") Atom
li
a(href="/rss.xml") RSS
if searchHref
li
button#search(title="Search" aria-haspopup="dialog")
i.ph.ph-magnifying-glass(aria-hidden="true")
div#site-sidebar
a#site-sidebar-header(href="#top" class=logo ? 'has-icon' : '')
if logo
img(width="36" height="36" class="has-alpha no-hover" src=logo alt="")
else
i.ph.ph-arrow-line-up(aria-hidden="true")
div
span= siteTitle ?? title
span Back to top
div#site-sidebar-content
nav#sidebar-nav.overshoot
ul
li
a(href="/" aria-current=(currentPath ?? '/') === '/' ? 'page' : '')
i.ph.ph-house(aria-hidden="true")
= siteTitle ?? title
each entry in nav
if entry.children
li
details.closable(open=entry.open)
summary
= entry.name
div.line
ul.dropdown
each child in entry.children
li
a(href=child.href aria-current=child.active ? 'page' : '' class=child.external ? 'external' : '')
if child.icon
i.ph.ph-(child.icon)(aria-hidden="true")
if child.label
span= child.label
else
span= child.name
else
li
a(href=entry.href aria-current=entry.active ? 'page' : '' class=(entry.external ?? entry.href.indexOf('http') === 0) ? 'external' : '')
if entry.icon
i.ph.ph-(entry.icon)(aria-hidden="true")
if entry.label
span= entry.label
else
span= entry.name
div#sidebar-meta.overshoot
if metaTitle ?? note
div.card
div.card-title
div.line
span.title= metaTitle ?? 'Meta'
div.line
if note
div.note= note
main#main-content
if content
!= await content()
footer#site-footer
div
if copyright
p.copyright= copyright
if poweredBy ?? undefined
p= 'Powered by '
a.link.external(href="https://www.getzola.org") Zola
= ' and '
a.link.external(href="https://ametrine.daudix.one") Ametrine
if sourceHref ?? undefined
p
a.link.external(href=sourceHref) Source
= ' | Updated ' + timestamp + ' UTC'
if socials
ul.socials
each social in socials
li
a(href=social.href rel="me external")
i.ph.ph-(social.name)(aria-hidden="true")
if webrings
ul.webrings
each webring in webrings
li.webring
a.link.external(href=webring.href)= webring.name
a.link.previous(href=webring.previous title="Previous")
i.ph.ph-arrow-left
if webring.random
a.link.random(href=webring.random title="Random")
i.ph.ph-dice-three
a.link.next(href=webring.next title="Next")
i.ph.ph-arrow-right
if note
div.note= note
script(src="/_muddle/amezing/closable.js" defer)
script(src="/_muddle/amezing/paginator.js" defer)
script(src="/_muddle/amezing/deanchor.js" defer)
script(src="/_muddle/amezing/marquee.js" defer)