Files
w3cjandClaude Opus 5.5 c590167432 docs(site): a branding page, and right-click on the logo to reach it
/branding/ (content/branding.md, layouts/branding.html: Hextra's home
layout with the home page's look, out of the sidebar): the logo as
box-drawing text in a code block with Hextra's copy button; the logo as
pixel SVGs for dark and light backgrounds, with 4x PNGs
(static/branding/); the app icon as SVG and PNG at 64 to 1024, plus the
site's existing icons; the social card; the palette as click-to-copy
swatches (data/palette.yaml, hexes read from custom.css); the fonts with
samples and Departure Mono's license; usage notes; credits.

Shortcodes: brand-assets, brand-asset (fails the build on a missing
file, reads PNG sizes), palette, font-sample. custom.css: the page's
styles, the footer, and --devvm-accent-dark (#408000), the light logo's
prompt. custom/footer.html: a footer link to the page on every page, and
a contextmenu handler on the navbar logo that opens it.

Contributing > Writing docs describes the page, its shortcodes and how
to render its PNGs again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-30 16:33:22 -07:00

37 lines
1.5 KiB
HTML

{{- /* The branding page (content/branding.md): Hextra's home layout, so the page gets the home page's
look, with a class of its own for the branding shortcodes' styles, and the script that copies a
swatch's hex when it's clicked. */ -}}
{{ define "main" }}
<div class="hx:mx-auto hx:flex hextra-max-page-width">
{{ partial "sidebar.html" (dict "context" . "disableSidebar" true) }}
<main
id="content"
class="devvm-branding hx:w-full hx:break-words hx:min-h-[calc(100vh-var(--hextra-navbar-height))] hx:min-w-0 hx:pb-8 hx:pt-8 hx:md:pt-12 hx:pl-[max(env(safe-area-inset-left),1.5rem)] hx:pr-[max(env(safe-area-inset-right),1.5rem)]"
>
<div class="hx:flex hx:flex-col hx:items-start">
{{ .Content }}
</div>
</main>
</div>
<script>
// A swatch copies its hex on click, then says "copied" for a moment.
document.querySelectorAll(".devvm-swatch[data-copy]").forEach((swatch) => {
const label = swatch.querySelector(".devvm-swatch-state");
swatch.addEventListener("click", async () => {
try {
await navigator.clipboard.writeText(swatch.dataset.copy);
} catch {
return;
}
swatch.dataset.copied = "";
label.textContent = "copied";
clearTimeout(swatch.copiedTimer);
swatch.copiedTimer = setTimeout(() => {
delete swatch.dataset.copied;
label.textContent = "copy";
}, 1500);
});
});
</script>
{{ end }}