[138] Merge: neue Startseite (Scroll-Hero aus echten Plänen), Doku im gleichen Look, GitHub Pages
No files matched your search
@@ -0,0 +1,51 @@
|
||||
# Website (website/) mit Hugo bauen und auf GitHub Pages veröffentlichen ([138]).
|
||||
# Voraussetzung: in den Repo-Einstellungen Pages → Source: „GitHub Actions".
|
||||
name: pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
paths:
|
||||
- "website/**"
|
||||
- ".github/workflows/pages.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: pages
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
HUGO_VERSION: "0.147.9"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Hugo extended installieren
|
||||
run: |
|
||||
curl -fsSL -o hugo.tar.gz "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
|
||||
tar -xzf hugo.tar.gz hugo
|
||||
./hugo version
|
||||
- id: pages
|
||||
uses: actions/configure-pages@v5
|
||||
- name: Bauen
|
||||
run: ./hugo --source website --minify --panicOnWarning --baseURL "${{ steps.pages.outputs.base_url }}/"
|
||||
- uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: website/public
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
@@ -70,6 +70,11 @@ Schriften (public/fonts/*, je Ordner mit OFL.txt), SIL Open Font License 1.1, lo
|
||||
Archivo, DM Sans, IBM Plex Sans und IBM Plex Mono (IBM Corp.), Inter, Jost, Karla, Manrope, Outfit,
|
||||
Public Sans, Rubik, Source Sans 3 und Source Serif 4 (Adobe), Space Grotesk, Work Sans.
|
||||
|
||||
Website (website/static/fonts, Lizenztexte OFL-*.txt daneben), SIL Open Font License 1.1, Quelle google/fonts:
|
||||
Schibsted Grotesk (The Schibsted-Grotesk Project Authors), Schnitte 600 und 800, auf Latein beschnitten;
|
||||
IBM Plex Sans 400/500 und IBM Plex Mono 400 (IBM Corp.), instanziert und auf Latein beschnitten, darum
|
||||
wegen des reservierten Namens „Plex" umbenannt in „Dossier Text" und „Dossier Mono".
|
||||
|
||||
Webview-Oberfläche (npm, ausgeliefert):
|
||||
React und react-dom (https://github.com/facebook/react), MIT
|
||||
pdf.js (pdfjs-dist, https://github.com/mozilla/pdf.js), Apache-2.0 — PDF-Unterlagen lesen
|
||||
|
||||
@@ -2562,24 +2562,38 @@ Reihenfolge = Abhängigkeiten. Neue Geometrie entsteht in Rust ([K]).
|
||||
setzt sie nur bei Abweichung, als ein Undo-Schritt. Kein Modellwechsel (Reiter waren nie im Modell). Tests
|
||||
`viewTabs.test.ts`, e2e `viewTabs.spec.ts`. Offen: Reiter nicht mit dem Projekt gespeichert; nicht in der Tauri-App geprüft. · S
|
||||
- ◐ **[138] Dokumentation und Website.** (5.11.) Inhalt von `website/` neu geschrieben (nur Markdown in
|
||||
`website/content/`; Layouts/CSS/Startseiten-Design unverändert, weil der Maintainer eine Design-Vorlage liefert).
|
||||
Bilder in `website/static/img` (WebP, ~0.7 MB): App aus `dist-test` (Playwright/Chromium, Linux, SVG-Rückfall statt
|
||||
WebGPU) und CLI-Renders (`:musterhaus-komplex … --hatch/--sketch/--ceiling`); 3D headless leer → kein 3D-Bild.
|
||||
Struktur: Startseite `content/_index.md`; `/funktionen/` (nach Gruppen, ◐ mit Nummern); `/download/`; `/stand/`
|
||||
(Meilensteine, bekannte Lücken); `/docs/anleitung/` (15 Kapitel: Erste Schritte, Oberfläche, Befehlszeile mit allen
|
||||
74 Befehlen + Kürzeln aus `registry.ts`, Zeichnen, Bauteile, Geschosse/±0.00, Ansichten/Ansichtsbereich/Vorlagen,
|
||||
Layout/Publikation, Bemassung, Lage/Baurecht/Gelände/Sonne, Kennzahlen, Import/Export, Kommandozeile/MCP,
|
||||
Tastenkürzel, Probleme); `/docs/entwickler/` (Architektur, Rust-Kern, Anzeige/Geometrie, Bauen/Testen/CI,
|
||||
Mitarbeiten). Alte Seiten (Gitea-Links, three.js/WebGL-Stand) entfernt. Gebaut mit Hugo 0.147.9 extended (Linux,
|
||||
ohne Warnungen), interne Links und Anker geprüft. Nicht in der Tauri-App gegengelesen; Bedienangaben aus Code/i18n.
|
||||
Offen: Design-Vorlage einbauen (Layouts/CSS; Bilder laufen in der alten CSS über die Textbreite, `img{max-width:100%}`
|
||||
fehlt); `hugo.toml` `repo`/`commitsApi` und Fusszeile/`log`-Shortcode zeigen auf `git.openbureau.ch/karim/
|
||||
DOSSIER-STANDALONE` — dort letzter Commit 23.10., also kein Spiegel → auf GitHub umstellen (GitHub-Commits-API hat
|
||||
dieselben Felder; Pfade `/blob/master/…`, `/commits/master`), „Letzter Commit" im Plankopf der Startseite ist bis
|
||||
dahin veraltet; `{{< log >}}` aus dem Inhalt genommen. Ungenutztes Theme `website/themes/hextra` (1.6 MB) löschen.
|
||||
Englisch: `[languages.de]`/`[languages.en]` in `hugo.toml`, `contentDir` je Sprache (`content/`, `content.en/`), gleiche
|
||||
Dateinamen, UI-Texte in `website/i18n/`. Build-Prüfung in der CI (nur `hugo --minify` bei `website/**`). Mac-Screenshots
|
||||
(Metal, echtes 3D) nachliefern. · M
|
||||
`website/content/`). Bilder in `website/static/img` (WebP): App aus `dist-test` (Playwright/Chromium, Linux, SVG-Rückfall
|
||||
statt WebGPU) und CLI-Renders (`:musterhaus-komplex … --hatch/--sketch/--ceiling`); 3D headless leer → kein 3D-Bild.
|
||||
Struktur: `/funktionen/` (nach Gruppen, ◐ mit Nummern); `/download/`; `/stand/`; `/docs/anleitung/` (15 Kapitel);
|
||||
`/docs/entwickler/` (5 Kapitel). Interne Links und Anker geprüft.
|
||||
(5.11.) **Startseite und Look nach dem freigegebenen Design-Paket** (`website/_design/DESIGN-PAKET.md`, Texte wörtlich;
|
||||
Titel „Open-Source-CAAD"): Startseite = `layouts/home.html` (eigenes Dokument, gleiche Partials `head`/`header`/`footer`
|
||||
wie die Doku), `assets/css/home.css`, `assets/js/home.js`; gemeinsame Tokens/Schriften/Doku-Stil in `assets/css/site.css`
|
||||
(hell + dunkel „Lichtpause", Umschalter ohne Inline-Skript, CSP-tauglich). Scroll-Hero (1000vh) nach dem Scrub-Standard:
|
||||
Video als Blob mit Ladering und Wachhund, geglättete Zeit (rAF ruht), gegatete Seeks, DOM nur bei Änderung, fünf
|
||||
Abschnitte in Scroll-Distanz mit eigenem Auftritt, Lesbarkeit mit Papier-Schleiern, fünf Bedingungen für die ruhige
|
||||
Startseite live in CSS und JS (gleiche Abfragen), reduzierte Bewegung live in beide Richtungen, vollständig ohne Video.
|
||||
Erkennungselement: Schnittmarken A–A … H–H als Abschnittswechsel (zeichnen sich beim Hineinscrollen), Masslinie mit
|
||||
Kote, Fangpunkt je Abschnitt, Planraster als feste Ebene. „Schnitt setzen": 12 vorgerechnete Schnitte, Linie ziehen
|
||||
oder Regler/Tastatur. **Hero-Video aus echten Plänen** (kein KI-Video): Varianten des Musterhauses komplex (nur Wände →
|
||||
+ Öffnungen → + Schraffur → + Räume/Masse; Schnitt; Ansicht Süd), mit `dossier-cli` als SVG gerechnet, in Chromium zu
|
||||
300 Bildern 1920×1200 komponiert (Striche ziehen sich, Schnittlinie fährt, Schnitt klappt hoch, Blatt), ffmpeg
|
||||
`-crf 20 -g 8 -keyint_min 8 +faststart`, 3.0 MB (`static/hero/`). Werkzeuge dazu liegen nicht im Repo (Scratch);
|
||||
bei Bedarf als `scripts/site-hero/` nachziehen. Schriften selbst gehostet (`static/fonts`, OFL, s. `NOTICE`; Plex
|
||||
umbenannt wegen reserviertem Namen). Gitea-Links → GitHub (`/blob/master/…`), Commit-Log-Shortcode entfernt (kein Netz
|
||||
beim Bauen), `themes/hextra` gelöscht, `img{max-width:100%}`. GitHub Pages: `.github/workflows/pages.yml` (Hugo 0.147.9
|
||||
extended, bei Pushes auf `website/**`, `actions/deploy-pages`); Links über `relURL` und Render-Hooks, damit die Seite
|
||||
auch unter `expiredtanin.github.io/DOSSIER/` läuft. Selbsttest (Playwright/Chromium, Linux): 1280×800, 1440×900,
|
||||
1920×1080, 375×812, 375×667, Telefon quer, Tablet hoch, reduzierte Bewegung (auch live), Video gesperrt, Wischtest
|
||||
120/240/360, Lesbarkeit je Abschnitt hell/dunkel, kein seitliches Scrollen, Konsole sauber, Hugo ohne Warnungen.
|
||||
Nicht in Safari/auf einem echten Telefon geprüft.
|
||||
Offen: **Pages in den Repo-Einstellungen einschalten** (Settings → Pages → Source: GitHub Actions). Eigene Domain
|
||||
später: erst DNS (`dossier.openbureau.ch` CNAME → `expiredtanin.github.io`), dann `website/static/CNAME` mit
|
||||
`dossier.openbureau.ch` anlegen und in den Pages-Einstellungen eintragen. Releases-Seite ist noch leer (Knopf
|
||||
„Dossier herunterladen" führt dorthin). Doku-Texte haben noch Halbgeviertstriche als Gedankenstriche und vereinzelt
|
||||
„robust"/„Lösung"/„nicht nur" (Textprüfung des Pakets gilt bisher nur für die Startseite). Bilder der Fenster- und
|
||||
Türliste: das SVG von `schedule --openings --format svg` überlappt Spalten (Textbreiten), darum zeigt die Startseite dort
|
||||
einen Grundriss-Ausschnitt. Englisch: `[languages.en]`, `content.en/`. Mac-Screenshots (Metal, echtes 3D). · M
|
||||
|
||||
## Priorität 4 — später
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/public/
|
||||
/resources/
|
||||
.hugo_build.lock
|
||||
/assets/jsconfig.json
|
||||
@@ -0,0 +1,288 @@
|
||||
/* Startseite. Grundlage (Tokens, Schriften, Kopf/Fuss) in site.css.
|
||||
Ohne .scrub (Telefone, reduzierte Bewegung, ohne JS) gilt die ruhige Startseite mit dem Schlussbild;
|
||||
.scrub setzt home.js nur, wenn keine der fünf Bedingungen zutrifft (gleiche Abfragen unten im CSS). */
|
||||
|
||||
:root {
|
||||
--tshadow: 0 0 1px rgba(var(--scrim), .95), 0 1px 10px rgba(var(--scrim), .85), 0 0 36px rgba(var(--scrim), .75);
|
||||
}
|
||||
.home-page .top { position: absolute; left: 0; right: 0; top: 0; max-width: none; padding-inline: max(16px, 5vw); }
|
||||
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
|
||||
.vh-only { display: none; }
|
||||
|
||||
/* ---- Hero: ruhige Grundform ------------------------------------------- */
|
||||
|
||||
.hero { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 6.5rem 16px 1rem; }
|
||||
.stage { position: relative; }
|
||||
.poster, .hero-video, .scrim, .ring, .cue { display: none; }
|
||||
.band { display: none; position: relative; --k: 1; }
|
||||
.band.b5 { display: block; }
|
||||
.static-sheet { margin: 2.5rem 0 0; }
|
||||
.static-sheet img { display: block; width: 100%; border: 1px solid var(--hatch); background: var(--panel); }
|
||||
.only-scrub { display: none !important; }
|
||||
|
||||
.say { margin: 0; font: 800 clamp(2rem, 3.3vw, 3.4rem)/1.04 var(--display); letter-spacing: -.028em; text-wrap: balance; }
|
||||
.title { margin: 0; font: 800 clamp(2.75rem, 4.4vw, 4.6rem)/1 var(--display); letter-spacing: -.038em; overflow-wrap: anywhere; }
|
||||
.kicker { margin: 1rem 0 0; font: 400 clamp(.875rem, 1vw, 1rem)/1.4 var(--mono); letter-spacing: .03em; color: var(--text-secondary); }
|
||||
.sub { margin: 1.25rem 0 0; max-width: 34ch; font-size: 1.1875rem; line-height: 1.5; }
|
||||
.cta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem 1.75rem; margin-top: 1.75rem; }
|
||||
|
||||
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .75rem 1.5rem; border-radius: 2px;
|
||||
background: var(--accent); color: var(--on-accent); font: 500 1.0625rem/1 var(--sans); text-decoration: none; text-shadow: none;
|
||||
transition: background-color .25s var(--ease-out), transform .25s var(--ease-out), color .25s var(--ease-out); }
|
||||
.btn:hover { background: var(--accent-hover); color: var(--on-accent); transform: translateY(-1px); }
|
||||
.btn.ghost { background: transparent; color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--text-primary); }
|
||||
.btn.ghost:hover { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
|
||||
.link { font: 500 1.0625rem var(--sans); text-shadow: none; }
|
||||
|
||||
/* ---- Hero: Scroll-Video ------------------------------------------------ */
|
||||
|
||||
.scrub .hero { height: 1000vh; max-width: none; padding: 0; margin: 0; }
|
||||
.scrub .stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
|
||||
.scrub .poster, .scrub .hero-video { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
|
||||
.scrub .poster { background: var(--canvas) 70% 50% / cover no-repeat; }
|
||||
.scrub .hero-video { object-fit: cover; object-position: 70% 50%; opacity: 0; transform: translateZ(0); will-change: transform; transition: opacity .7s var(--ease-out); }
|
||||
.scrub .stage.video-ready .hero-video { opacity: 1; }
|
||||
.scrub .stage.video-failed .hero-video { display: none; }
|
||||
/* Lichtpause: das Planblatt im dunklen Schema invertiert, Farbtöne bleiben */
|
||||
:root[data-theme="dark"] .poster, :root[data-theme="dark"] .hero-video, :root[data-theme="dark"] .static-sheet img { filter: invert(.92) hue-rotate(180deg); }
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root:not([data-theme="light"]) .poster, :root:not([data-theme="light"]) .hero-video, :root:not([data-theme="light"]) .static-sheet img { filter: invert(.92) hue-rotate(180deg); }
|
||||
}
|
||||
|
||||
/* Lesbarkeit: 1 Grundschleier (Papier) über der Textspur links */
|
||||
.scrub .scrim { display: block; position: absolute; inset: 0; pointer-events: none;
|
||||
background: linear-gradient(90deg, rgba(var(--scrim), .9) 0%, rgba(var(--scrim), .7) 30%, rgba(var(--scrim), 0) 47%); }
|
||||
/* 2 Schleier je Abschnitt, 3 Textschatten */
|
||||
.scrub .band { display: flex; flex-direction: column; justify-content: center; position: absolute; top: 0; bottom: 0; left: 0;
|
||||
width: min(46vw, 46rem); padding: 4.5rem 0 3rem max(16px, 5vw); opacity: 0; pointer-events: none; isolation: isolate; text-shadow: var(--tshadow); }
|
||||
.scrub .band::before { content: ""; position: absolute; inset: 8% -8% 8% 0; z-index: -1; pointer-events: none;
|
||||
opacity: calc(.25 + .75 * var(--k, 1));
|
||||
background: radial-gradient(ellipse 72% 56% at 40% 50%, rgba(var(--scrim), .82) 0%, rgba(var(--scrim), .55) 48%, rgba(var(--scrim), 0) 76%); }
|
||||
.scrub .band.on .cta { pointer-events: auto; }
|
||||
.scrub .band:not(.on) .cta { visibility: hidden; }
|
||||
.scrub .static-sheet, .scrub .only-static { display: none; }
|
||||
.scrub .only-scrub { display: inline-flex !important; }
|
||||
.scrub .b1 .say { font-size: clamp(2.6rem, 4.6vw, 4.75rem); }
|
||||
.scrub .b2 .say { max-width: 17ch; }
|
||||
|
||||
/* Ladering, danach ein ehrlicher Scroll-Hinweis */
|
||||
.scrub .ring, .scrub .cue { display: block; position: absolute; left: max(16px, 5vw); bottom: 2rem; width: 2rem; height: 2rem; color: var(--text-secondary); transition: opacity .5s var(--ease-out); }
|
||||
.ring circle { stroke-dashoffset: var(--ld, 126); transform: rotate(-90deg); transform-origin: 50% 50%; }
|
||||
.scrub .cue { opacity: 0; }
|
||||
.scrub .stage.video-ready .ring, .scrub .stage.video-failed .ring { opacity: 0; }
|
||||
.scrub .stage.video-ready .cue, .scrub .stage.video-failed .cue { opacity: 1; }
|
||||
.scrub .stage.moved .cue { opacity: 0; }
|
||||
.cue svg { width: 100%; height: 100%; }
|
||||
.scrub .stage.video-ready .cue svg, .scrub .stage.video-failed .cue svg { animation: cue-bob 2.4s var(--ease-io) infinite; animation-delay: -.6s; }
|
||||
@keyframes cue-bob { 50% { transform: translateY(5px); } }
|
||||
@media (max-height: 560px) { .scrub .cue, .scrub .ring { display: none; } }
|
||||
|
||||
/* Zerlegter Text: unsichtbare Kopie für Vorleser, sichtbare aus Wörtern/Zeichen */
|
||||
.w, .c { display: inline-block; }
|
||||
.ln, .half { display: block; }
|
||||
|
||||
/* 1 Zeichne eine Wand: Zeichen rasten von links ein, darunter zieht sich die Wand */
|
||||
.b1 .c { --kc: clamp(0, (var(--k, 1) - var(--th, 0)) * 5, 1); opacity: var(--kc); transform: translateX(calc((1 - var(--kc)) * -28px)); }
|
||||
@supports (width: round(nearest, 10px, 4px)) {
|
||||
.b1 .c { transform: translateX(round(nearest, calc((1 - var(--kc)) * -28px), 7px)); }
|
||||
}
|
||||
.b1 .say::after { content: ""; display: block; width: 5.2em; height: .2em; margin-top: .3em; border-block: 2px solid currentColor;
|
||||
transform: scaleX(var(--k, 1)); transform-origin: left; }
|
||||
|
||||
/* 2 Wörter rasten ein wie Fangpunkte, kurzes Überschwingen; Öffnungen in Rot */
|
||||
.b2 .w { --kc: clamp(0, (var(--k, 1) - var(--th, 0)) * 3, 1); --ks: clamp(0, (var(--k, 1) - var(--th, 0) - var(--sd, .1)) * var(--ss, 3.2), 1);
|
||||
opacity: var(--kc); transform-origin: 50% 80%; transform: scale(calc(.6 + (.4 + var(--ov, .12)) * var(--kc) - var(--ov, .12) * var(--ks))); }
|
||||
.b2 .w.em { --ov: .24; --sd: .16; --ss: 2.6; color: var(--accent); }
|
||||
|
||||
/* 3 Zeilen fallen ein, wie Masslinien gesetzt werden */
|
||||
.b3 .w { --kc: clamp(0, (var(--k, 1) - var(--th, 0)) * 2.8, 1); opacity: var(--kc); transform: translateY(calc((1 - var(--kc)) * -.55em)); }
|
||||
.b3 .ln::after { content: ""; display: block; height: 1px; width: 100%; max-width: 12em; margin: .12em 0 .25em; background: var(--text-secondary);
|
||||
transform: scaleX(clamp(0, (var(--k, 1) - var(--lt, 0)) * 2.4, 1)); transform-origin: left; }
|
||||
|
||||
/* 4 Hälften öffnen sich von der Mitte aus, wie der Schnitt */
|
||||
.b4 .say { position: relative; }
|
||||
.b4 .half { --kc: clamp(0, (var(--k, 1) - .12) * 1.5, 1); opacity: var(--kc); }
|
||||
.b4 .half:first-child { transform: translateY(calc((1 - var(--kc)) * .6em)); }
|
||||
.b4 .half:last-child { transform: translateY(calc((1 - var(--kc)) * -.6em)); }
|
||||
.b4 .say::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px;
|
||||
background: repeating-linear-gradient(90deg, var(--accent) 0 18px, transparent 18px 24px, var(--accent) 24px 27px, transparent 27px 33px);
|
||||
transform: scaleX(clamp(0, var(--k, 1) * 5, 1)); transform-origin: left; opacity: calc(1 - clamp(0, (var(--k, 1) - .35) * 1.8, 1)); }
|
||||
|
||||
/* 5 Wort für Wort aufsteigen, dann Unterzeile, dann Knöpfe */
|
||||
.b5 .w { --kc: clamp(0, (var(--k, 1) - var(--th, 0)) * 3, 1); opacity: var(--kc); transform: translateY(calc((1 - var(--kc)) * .5em)); }
|
||||
.b5 .kicker { --ks: clamp(0, (var(--k, 1) - .62) * 4, 1); opacity: var(--ks); transform: translateY(calc((1 - var(--ks)) * 10px)); }
|
||||
.b5 .cta { --kb: clamp(0, (var(--k, 1) - .76) * 5, 1); opacity: var(--kb); transform: translateY(calc((1 - var(--kb)) * 12px)); }
|
||||
|
||||
/* ---- Erkennungselement: Schnittmarken als Abschnittswechsel ------------ */
|
||||
|
||||
.cutmark { max-width: var(--wrap); margin: 0 auto; padding: 5rem 16px 3.5rem; display: flex; align-items: flex-start; gap: .6rem; color: var(--text-primary); }
|
||||
.cm-end { display: flex; flex-direction: column; align-items: center; gap: .15rem; flex: none; width: 1.75rem; }
|
||||
.cm-end svg { width: 1.25rem; height: 1.75rem; overflow: visible; }
|
||||
.cm-end b { font: 800 1.25rem/1 var(--display); }
|
||||
.cm-line { flex: 1; display: flex; align-items: center; gap: 6px; height: 2px; margin-top: 1px; overflow: hidden; }
|
||||
.cm-line i { flex: none; width: 22px; height: 2px; background: currentColor; opacity: 0; transform: scaleX(0);
|
||||
transition: opacity .35s var(--ease-out), transform .35s var(--ease-out); transition-delay: var(--dl, 0s); }
|
||||
.cm-line i.dot { width: 3px; }
|
||||
.cm-end svg, .cm-end b { opacity: 0; transform: translateY(-8px); transition: opacity .5s var(--ease-out) .55s, transform .5s var(--ease-out) .55s; }
|
||||
.cutmark.in .cm-line i, .cutmark.in .cm-end svg, .cutmark.in .cm-end b { opacity: 1; transform: none; }
|
||||
|
||||
/* Masslinie mit Kote */
|
||||
.dimline { display: flex; align-items: center; gap: .6rem; margin: 1.5rem 0 2.5rem; color: var(--text-secondary); font: .875rem var(--mono); }
|
||||
.dimline i { flex: 1; height: 1px; background: currentColor; position: relative; transform: scaleX(0); transition: transform 1s var(--ease-io); }
|
||||
.dimline i:first-child { transform-origin: right; }
|
||||
.dimline i:last-child { transform-origin: left; }
|
||||
.dimline i:first-child::before, .dimline i:last-child::after { content: ""; position: absolute; top: -6px; width: 1px; height: 13px; background: currentColor; transform: rotate(45deg); }
|
||||
.dimline i:first-child::before { left: 0; }
|
||||
.dimline i:last-child::after { right: 0; }
|
||||
.dimline.in i { transform: none; }
|
||||
|
||||
/* Fangpunkt: das leise lebendige Element je Abschnitt */
|
||||
.sec-title { display: flex; align-items: baseline; gap: .65rem; margin: 0; font: 800 clamp(2rem, 3.4vw, 3rem)/1.05 var(--display); letter-spacing: -.028em; }
|
||||
.sec-title.small { font-size: clamp(1.4rem, 2vw, 1.75rem); letter-spacing: -.015em; }
|
||||
.sec-title.big { font-size: clamp(2.6rem, 5.4vw, 4.75rem); letter-spacing: -.035em; }
|
||||
.snap { position: relative; flex: none; width: .36em; height: .36em; border: 2px solid currentColor; transform: translateY(-.06em); }
|
||||
.snap::after { content: ""; position: absolute; inset: -.3em; border: 1.5px solid var(--accent); opacity: 0; }
|
||||
.live .snap::after { animation: snap-pulse 5s var(--ease-io) infinite; animation-delay: -1.3s; }
|
||||
@keyframes snap-pulse { 0%, 55%, 100% { opacity: 0; transform: scale(.55); } 25% { opacity: .8; transform: scale(1); } }
|
||||
body.paused *, body.paused *::before, body.paused *::after { animation-play-state: paused !important; }
|
||||
|
||||
.sec p { max-width: 62ch; }
|
||||
|
||||
/* ---- 1 So arbeitet Dossier --------------------------------------------- */
|
||||
|
||||
.step-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 2rem; }
|
||||
.step figure { margin: 0 0 1.1rem; aspect-ratio: 16 / 10; border: 1px solid var(--hatch); background: var(--panel); overflow: hidden; }
|
||||
.step img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
|
||||
.step .num { margin: 0; font: .875rem var(--mono); color: var(--text-secondary); }
|
||||
.step h3 { margin: .2rem 0 .4rem; font: 600 1.625rem/1.15 var(--display); letter-spacing: -.015em; }
|
||||
.step p:last-child { margin: 0; }
|
||||
.step-list .step { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
|
||||
.step-list.in .step { opacity: 1; transform: none; }
|
||||
.step-list.in .step:nth-child(2) { transition-delay: .13s; }
|
||||
.step-list.in .step:nth-child(3) { transition-delay: .26s; }
|
||||
.step-list.in.done .step:nth-child(n) { transition-delay: 0s; }
|
||||
|
||||
/* ---- 2 Was alles drin ist ---------------------------------------------- */
|
||||
|
||||
.feat-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem 3.5rem; align-items: start; }
|
||||
.feat-list { list-style: none; margin: 1.75rem 0 0; padding: 0; border-top: 1px solid var(--hatch); }
|
||||
.feat-list li { border-bottom: 1px solid var(--hatch); }
|
||||
.feat-list button { display: block; width: 100%; padding: .85rem 0 .85rem 1.75rem; position: relative; background: none; border: 0; color: inherit; text-align: left; cursor: pointer;
|
||||
font: 400 1.0625rem/1.4 var(--sans); transition: color .25s var(--ease-out), transform .3s var(--ease-out); }
|
||||
.feat-list button::before { content: ""; position: absolute; left: .2rem; top: 1.2rem; width: .55rem; height: .55rem; border: 1.5px solid var(--text-secondary);
|
||||
transition: background-color .25s var(--ease-out), border-color .25s var(--ease-out), transform .3s var(--ease-out); }
|
||||
.feat-list button:hover { transform: translateX(3px); }
|
||||
.feat-list button:hover::before { border-color: var(--accent); }
|
||||
.feat-list button[aria-pressed="true"] { font-weight: 500; }
|
||||
.feat-list button[aria-pressed="true"]::before { background: var(--accent); border-color: var(--accent); transform: rotate(45deg); }
|
||||
.feat-list li { opacity: 0; transform: translateX(-14px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
|
||||
.feat-list.in li { opacity: 1; transform: none; }
|
||||
.feat-list.in li:nth-child(2) { transition-delay: .06s; } .feat-list.in li:nth-child(3) { transition-delay: .12s; }
|
||||
.feat-list.in li:nth-child(4) { transition-delay: .18s; } .feat-list.in li:nth-child(5) { transition-delay: .24s; }
|
||||
.feat-list.in li:nth-child(6) { transition-delay: .3s; } .feat-list.in li:nth-child(7) { transition-delay: .36s; }
|
||||
.feat-list.in li:nth-child(8) { transition-delay: .42s; }
|
||||
.feat-list.in.done li:nth-child(n) { transition-delay: 0s; }
|
||||
.shots { position: sticky; top: 2rem; aspect-ratio: 16 / 10; margin: 0; border: 1px solid var(--hatch); background: var(--panel); }
|
||||
.shots img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .45s var(--ease-out); }
|
||||
.shots img.on { opacity: 1; }
|
||||
|
||||
/* ---- 3 Schweizer Praxis ------------------------------------------------ */
|
||||
|
||||
.statement { margin: 1.5rem 0 0; max-width: 28ch !important; font: 600 clamp(1.75rem, 3.3vw, 2.9rem)/1.16 var(--display); letter-spacing: -.02em;
|
||||
opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
|
||||
.statement.in { opacity: 1; transform: none; }
|
||||
.kotes { display: flex; flex-wrap: wrap; gap: .75rem 3rem; margin: 2.25rem 0 0; font: .9375rem var(--mono); color: var(--text-secondary); }
|
||||
.kotes span { position: relative; padding-left: 1.2rem; }
|
||||
.kotes span::before { content: ""; position: absolute; left: 0; top: .35em; border: .32rem solid transparent; border-top: .5rem solid currentColor; border-bottom: 0; }
|
||||
|
||||
/* ---- 4 Schnitt setzen -------------------------------------------------- */
|
||||
|
||||
.cut-panel { background: var(--panel); border: 1px solid var(--hatch); padding: clamp(1rem, 3vw, 2.5rem); }
|
||||
.cut-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; }
|
||||
.lede { margin: 0; font: 500 1.25rem/1.4 var(--sans); }
|
||||
.cut-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 1.5rem 2.5rem; align-items: center; margin-top: 1.75rem; }
|
||||
.cut-plan, .cut-view { margin: 0; position: relative; }
|
||||
.cut-plan { touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
|
||||
.cut-plan img { display: block; width: 100%; pointer-events: none; }
|
||||
.cut-line { position: absolute; top: 3%; bottom: 3%; left: 0; width: 0; will-change: transform; }
|
||||
.cut-line::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px;
|
||||
background: repeating-linear-gradient(180deg, var(--accent) 0 16px, transparent 16px 21px, var(--accent) 21px 24px, transparent 24px 29px); }
|
||||
.cut-line::after { content: ""; position: absolute; top: 50%; left: -.8rem; width: 1.6rem; height: 1.6rem; margin-top: -.8rem; border-radius: 50%;
|
||||
border: 2px solid var(--accent); background: var(--panel); }
|
||||
.cut-line b { position: absolute; left: .35rem; font: 800 1.1rem/1 var(--display); color: var(--accent); }
|
||||
.cut-line b:first-child { top: -.2rem; }
|
||||
.cut-line b:last-child { bottom: -.2rem; }
|
||||
.live .cut-line::after { animation: handle 4.6s var(--ease-io) infinite; animation-delay: -2s; }
|
||||
@keyframes handle { 50% { transform: scale(1.18); } }
|
||||
.cut-view { aspect-ratio: 1200 / 799; }
|
||||
.cut-view img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .28s var(--ease-out); }
|
||||
.cut-view img.on { opacity: 1; }
|
||||
.cut-ctrl { display: flex; align-items: center; gap: 1.25rem; margin-top: 1.5rem; }
|
||||
.cut-ctrl input { flex: 1; accent-color: var(--accent); min-height: 44px; }
|
||||
.cut-ctrl .kote { font: .9375rem var(--mono); color: var(--text-secondary); min-width: 9ch; text-align: right; }
|
||||
:root[data-theme="dark"] .plan-img, :root[data-theme="dark"] .cut-plan img, :root[data-theme="dark"] .cut-view img { filter: invert(.9) hue-rotate(180deg); }
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root:not([data-theme="light"]) .plan-img, :root:not([data-theme="light"]) .cut-plan img, :root:not([data-theme="light"]) .cut-view img { filter: invert(.9) hue-rotate(180deg); }
|
||||
}
|
||||
|
||||
/* ---- 5–8 --------------------------------------------------------------- */
|
||||
|
||||
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.5rem 3.5rem; align-items: start; }
|
||||
.free .split > p { margin: .4rem 0 0; font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.45; }
|
||||
.narrow { max-width: 46rem; }
|
||||
.state p.reveal { font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.45; margin: 1.25rem 0 1.75rem; }
|
||||
.reveal:not(.step-list):not(.feat-list):not(.statement) { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
|
||||
.reveal.in:not(.step-list):not(.feat-list):not(.statement) { opacity: 1; transform: none; }
|
||||
|
||||
.faq-list { border-top: 1px solid var(--hatch); }
|
||||
.faq-list details { border-bottom: 1px solid var(--hatch); }
|
||||
.faq-list summary { list-style: none; cursor: pointer; padding: 1.05rem 2.5rem 1.05rem 0; position: relative; font: 500 1.1875rem/1.35 var(--sans); transition: color .2s var(--ease-out); }
|
||||
.faq-list summary::-webkit-details-marker { display: none; }
|
||||
.faq-list summary:hover { color: var(--accent); }
|
||||
.faq-list summary::after { content: ""; position: absolute; right: .4rem; top: 50%; width: .8rem; height: .8rem; margin-top: -.4rem;
|
||||
background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
|
||||
transition: transform .3s var(--ease-out); }
|
||||
.faq-list details[open] summary::after { transform: rotate(45deg); }
|
||||
.faq-list details p { margin: 0 0 1.25rem; color: var(--text-secondary); }
|
||||
.faq-list details[open] p { animation: faq-in .45s var(--ease-out); }
|
||||
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } }
|
||||
|
||||
.end { text-align: center; }
|
||||
.end .wall { display: block; width: min(420px, 70%); height: 24px; margin: 0 auto; color: var(--text-primary); transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease-io); }
|
||||
.end .wall.in { transform: none; }
|
||||
.end-title { margin: 1.75rem 0 0; font: 800 clamp(2.75rem, 6.4vw, 5.75rem)/1 var(--display); letter-spacing: -.04em; }
|
||||
.end .cta { justify-content: center; margin-top: 2.25rem; }
|
||||
|
||||
/* ---- Breiten ----------------------------------------------------------- */
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.step-list, .feat-grid, .split, .cut-body { grid-template-columns: minmax(0, 1fr); }
|
||||
.shots { position: relative; top: 0; }
|
||||
.cutmark { padding: 3.5rem 16px 2.5rem; }
|
||||
}
|
||||
@media (pointer: coarse) {
|
||||
.btn, .link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
|
||||
.feat-list button { min-height: 44px; }
|
||||
}
|
||||
|
||||
/* ---- Die fünf Bedingungen für die ruhige Startseite (wörtlich gleich in home.js) ---- */
|
||||
@media (max-width: 720px), (orientation: portrait) and (max-width: 1024px), (orientation: portrait) and (pointer: coarse), (orientation: landscape) and (pointer: coarse) and (max-height: 560px), (prefers-reduced-motion: reduce) {
|
||||
.scrub .hero { height: auto; max-width: var(--wrap); margin: 0 auto; padding: 6.5rem 16px 1rem; }
|
||||
.scrub .stage { position: relative; height: auto; overflow: visible; }
|
||||
.scrub .poster, .scrub .hero-video, .scrub .scrim, .scrub .ring, .scrub .cue { display: none; }
|
||||
.scrub .band { display: none; }
|
||||
.scrub .band.b5 { display: block; position: relative; width: auto; padding: 0; opacity: 1 !important; --k: 1 !important; text-shadow: none; }
|
||||
.scrub .band.b5::before { display: none; }
|
||||
.scrub .band .cta { visibility: visible; pointer-events: auto; }
|
||||
.scrub .static-sheet { display: block; }
|
||||
.scrub .only-static { display: block; }
|
||||
.scrub .only-scrub { display: none !important; }
|
||||
}
|
||||
|
||||
/* Reduzierte Bewegung: alles im Endzustand, nichts läuft */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.cm-line i, .cm-end svg, .cm-end b, .dimline i, .step-list .step, .feat-list li, .statement, .reveal, .end .wall { opacity: 1 !important; transform: none !important; }
|
||||
}
|
||||
@media (max-width: 720px) {
|
||||
.hero, .scrub .hero { padding-top: 8.5rem; }
|
||||
}
|
||||
@@ -1,195 +1,150 @@
|
||||
/* DOSSIER-Website. Bewusst schlicht: Papier, Tinte, Haarlinien wie auf einem
|
||||
Plan. Farben aus dem App-Hell-Theme (src/styles.css), kein Akzent. */
|
||||
/* Dossier-Website: gemeinsame Grundlage für Startseite und Doku.
|
||||
Farben und Schriften aus dem Design-Paket (website/_design/DESIGN-PAKET.md): Planpapier, Tusche,
|
||||
Schraffurgrau und das Öffnungsrot aus den Dossier-Plänen. Schriften liegen in /fonts (OFL). */
|
||||
|
||||
@font-face {
|
||||
font-family: "archivo";
|
||||
font-style: normal;
|
||||
font-weight: 100 900;
|
||||
font-display: swap;
|
||||
src: url("/fonts/archivo.woff2") format("woff2");
|
||||
}
|
||||
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/schibsted-grotesk-600.woff2") format("woff2"); }
|
||||
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/schibsted-grotesk-800.woff2") format("woff2"); }
|
||||
/* IBM Plex Sans/Mono, beschnitten und darum umbenannt (reservierter Name, s. NOTICE) */
|
||||
@font-face { font-family: "Dossier Text"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-400.woff2") format("woff2"); }
|
||||
@font-face { font-family: "Dossier Text"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-500.woff2") format("woff2"); }
|
||||
@font-face { font-family: "Dossier Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2"); }
|
||||
|
||||
:root {
|
||||
--paper: #f5f2ec;
|
||||
--ink: #1a1a18;
|
||||
--dim: #5f5b55;
|
||||
--hair: #cfc9c0;
|
||||
--code: #ebe6de;
|
||||
--sans: "archivo", system-ui, sans-serif;
|
||||
--mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
|
||||
--canvas: #f2f0e9;
|
||||
--panel: #fbfaf5;
|
||||
--accent: #b3362b;
|
||||
--accent-hover: #952b22;
|
||||
--accent-muted: rgba(179, 54, 43, .14);
|
||||
--on-accent: #fbfaf5;
|
||||
--text-secondary: #5a5f66;
|
||||
--text-primary: #1c1f23;
|
||||
--hatch: #c9c6bd;
|
||||
--line: #8d9096; /* Ränder von Bedienelementen (≥ 3:1 auf Papier) */
|
||||
--code: #e8e5dc;
|
||||
--scrim: 242, 240, 233; /* Papier als RGB für Schleier über dem Hero */
|
||||
--display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
|
||||
--sans: "Dossier Text", "Helvetica Neue", Arial, sans-serif;
|
||||
--mono: "Dossier Mono", ui-monospace, Menlo, Consolas, monospace;
|
||||
--ease-out: cubic-bezier(.2, .7, .2, 1);
|
||||
--ease-io: cubic-bezier(.6, 0, .3, 1);
|
||||
--wrap: 72rem;
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
/* Dunkel: Lichtpause */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--paper: #141413;
|
||||
--ink: #e6e3dd;
|
||||
--dim: #9a968f;
|
||||
--hair: #3a3935;
|
||||
--code: #1f1f1d;
|
||||
:root:not([data-theme="light"]) {
|
||||
--canvas: #15181c; --panel: #1d2126; --accent: #e0675b; --accent-hover: #ee8277;
|
||||
--accent-muted: rgba(224, 103, 91, .16); --on-accent: #15181c; --text-secondary: #a3a8ae; --text-primary: #ecebe6;
|
||||
--hatch: #3a3f46; --line: #747a82; --code: #23282e; --scrim: 21, 24, 28; color-scheme: dark;
|
||||
}
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
html { -webkit-text-size-adjust: 100%; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0 16px;
|
||||
background: var(--paper);
|
||||
color: var(--ink);
|
||||
font: 16px/1.55 var(--sans);
|
||||
:root[data-theme="dark"] {
|
||||
--canvas: #15181c; --panel: #1d2126; --accent: #e0675b; --accent-hover: #ee8277;
|
||||
--accent-muted: rgba(224, 103, 91, .16); --on-accent: #15181c; --text-secondary: #a3a8ae; --text-primary: #ecebe6;
|
||||
--hatch: #3a3f46; --line: #747a82; --code: #23282e; --scrim: 21, 24, 28; color-scheme: dark;
|
||||
}
|
||||
|
||||
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
|
||||
a:hover { text-decoration-thickness: 2px; }
|
||||
|
||||
*, *::before, *::after { box-sizing: border-box; }
|
||||
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
|
||||
body {
|
||||
margin: 0;
|
||||
background: var(--canvas);
|
||||
color: var(--text-primary);
|
||||
font: 400 1.0625rem/1.6 var(--sans);
|
||||
overflow-x: hidden; overflow-x: clip;
|
||||
animation: page-in .6s var(--ease-out) both;
|
||||
}
|
||||
@keyframes page-in { from { opacity: 0; } }
|
||||
img { max-width: 100%; height: auto; }
|
||||
a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; transition: color .2s var(--ease-out), text-decoration-color .2s var(--ease-out); }
|
||||
a:hover { color: var(--accent); }
|
||||
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
|
||||
code, pre, kbd { font-family: var(--mono); font-size: .875em; }
|
||||
|
||||
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--panel); color: var(--text-primary); padding: .6rem 1rem; border: 1px solid var(--line); transition: top .2s var(--ease-out); }
|
||||
.skip:focus { top: 1rem; }
|
||||
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
|
||||
|
||||
/* Planraster: eine feste Ebene hinter allem, sehr langsame Drift */
|
||||
.plangrid { position: fixed; inset: -96px; z-index: -1; pointer-events: none;
|
||||
background-image:
|
||||
linear-gradient(to right, color-mix(in srgb, var(--hatch) 70%, transparent) 1px, transparent 1px),
|
||||
linear-gradient(to bottom, color-mix(in srgb, var(--hatch) 70%, transparent) 1px, transparent 1px),
|
||||
linear-gradient(to right, color-mix(in srgb, var(--hatch) 32%, transparent) 1px, transparent 1px),
|
||||
linear-gradient(to bottom, color-mix(in srgb, var(--hatch) 32%, transparent) 1px, transparent 1px);
|
||||
background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
|
||||
animation: grid-drift 90s linear infinite alternate; animation-delay: -30s; will-change: transform; }
|
||||
@keyframes grid-drift { to { transform: translate3d(48px, 24px, 0); } }
|
||||
|
||||
/* ---- Kopf und Fuss -------------------------------------------------- */
|
||||
|
||||
.top, .foot, .home, .docs { max-width: 64rem; margin-inline: auto; }
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: .5rem 1.5rem;
|
||||
padding: 1.25rem 0 1rem;
|
||||
border-bottom: 1px solid var(--ink);
|
||||
}
|
||||
.mark {
|
||||
font-weight: 800;
|
||||
font-size: 1.15rem;
|
||||
letter-spacing: -.01em;
|
||||
text-decoration: none;
|
||||
}
|
||||
.top nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; font: .875rem var(--mono); }
|
||||
.top { position: relative; z-index: 20; display: flex; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; flex-wrap: wrap;
|
||||
max-width: var(--wrap); margin: 0 auto; padding: 1.25rem 16px 1rem; }
|
||||
.mark { font: 800 1.3rem/1 var(--display); letter-spacing: -.02em; text-decoration: none; }
|
||||
.mark span { color: var(--accent); }
|
||||
.top nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1.25rem; font: .875rem var(--mono); }
|
||||
.top nav a { text-decoration: none; }
|
||||
.top nav a:hover, .top nav a[aria-current] { text-decoration: underline; }
|
||||
.theme-toggle { font: inherit; color: inherit; background: none; border: 1px solid var(--line); border-radius: 999px; width: 2rem; height: 2rem; display: inline-grid; place-items: center; cursor: pointer; padding: 0; align-self: center; transition: border-color .2s var(--ease-out), color .2s var(--ease-out); }
|
||||
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
|
||||
.theme-toggle svg { width: 1rem; height: 1rem; }
|
||||
.docs-page .top { border-bottom: 1px solid var(--text-primary); }
|
||||
|
||||
.foot {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: .25rem 1.5rem;
|
||||
margin-top: 4rem;
|
||||
padding: 1rem 0 2rem;
|
||||
border-top: 1px solid var(--ink);
|
||||
font: .8rem var(--mono);
|
||||
color: var(--dim);
|
||||
.foot { max-width: var(--wrap); margin: 5rem auto 0; padding: 1.25rem 16px 2.5rem; border-top: 1px solid var(--text-primary);
|
||||
display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.75rem; font: .8125rem/1.5 var(--mono); color: var(--text-secondary); }
|
||||
.foot a { color: var(--text-primary); }
|
||||
.foot a:hover { color: var(--accent); }
|
||||
.foot .mark { font-size: 1rem; color: var(--text-primary); }
|
||||
|
||||
@media (pointer: coarse) {
|
||||
.top nav a, .foot a { min-height: 44px; display: inline-flex; align-items: center; }
|
||||
.theme-toggle { width: 44px; height: 44px; }
|
||||
}
|
||||
|
||||
/* ---- Startseite ----------------------------------------------------- */
|
||||
|
||||
.home { padding-top: 2.5rem; }
|
||||
.home > * { max-width: 44rem; }
|
||||
|
||||
/* Plankopf: Felder mit kleiner Beschriftung oben, Wert darunter. Die
|
||||
Haarlinien entstehen aus einem 1px-Gap über dem Tintenhintergrund. */
|
||||
.titleblock {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 1px;
|
||||
margin: 0 0 2.5rem;
|
||||
background: var(--ink);
|
||||
border: 1.5px solid var(--ink);
|
||||
}
|
||||
.titleblock > div { background: var(--paper); padding: .4rem .6rem .5rem; min-width: 0; }
|
||||
.titleblock .tb-wide { grid-column: span 2; }
|
||||
.titleblock dt {
|
||||
font: .65rem var(--mono);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .08em;
|
||||
color: var(--dim);
|
||||
}
|
||||
.titleblock dd { margin: .1rem 0 0; font-size: .95rem; }
|
||||
.titleblock .tb-name { font-weight: 800; font-size: 1.6rem; line-height: 1.1; letter-spacing: -.01em; }
|
||||
|
||||
@media (max-width: 560px) {
|
||||
.titleblock { grid-template-columns: 1fr 1fr; }
|
||||
}
|
||||
|
||||
/* ---- Fliesstext ----------------------------------------------------- */
|
||||
|
||||
.prose { min-width: 0; }
|
||||
.prose > :first-child { margin-top: 0; }
|
||||
|
||||
.prose h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; margin: 0 0 1.5rem; }
|
||||
|
||||
.prose h2 {
|
||||
margin: 3rem 0 1rem;
|
||||
padding-top: .5rem;
|
||||
border-top: 1px solid var(--ink);
|
||||
font: 600 .8rem var(--mono);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .08em;
|
||||
}
|
||||
.prose h3 { font-size: 1rem; margin: 2rem 0 .5rem; }
|
||||
|
||||
.prose p, .prose ul, .prose ol, .prose pre, .prose table { margin: 0 0 1rem; }
|
||||
.prose ul, .prose ol { padding-left: 1.25rem; }
|
||||
.prose li { margin-bottom: .25rem; }
|
||||
|
||||
.prose :not(pre) > code { background: var(--code); padding: .05em .3em; }
|
||||
|
||||
.prose pre {
|
||||
background: var(--code);
|
||||
padding: .75rem 1rem;
|
||||
overflow-x: auto;
|
||||
line-height: 1.45;
|
||||
}
|
||||
.prose pre code { font-size: .8rem; }
|
||||
|
||||
.prose table { border-collapse: collapse; width: 100%; font-size: .9rem; display: block; overflow-x: auto; }
|
||||
.prose th, .prose td { text-align: left; vertical-align: top; padding: .35rem .75rem .35rem 0; border-bottom: 1px solid var(--hair); }
|
||||
.prose th { font: 600 .75rem var(--mono); text-transform: uppercase; letter-spacing: .06em; border-bottom-color: var(--ink); }
|
||||
|
||||
.prose blockquote { margin: 0 0 1rem; padding-left: 1rem; border-left: 2px solid var(--ink); color: var(--dim); }
|
||||
|
||||
.prose hr { border: 0; border-top: 1px dashed var(--hair); margin: 2rem 0; }
|
||||
|
||||
/* Commit-Log */
|
||||
.log { list-style: none; padding: 0; font: .8rem/1.5 var(--mono); }
|
||||
.log li { display: grid; grid-template-columns: auto auto 1fr; gap: 0 .75rem; padding: .3rem 0; border-bottom: 1px solid var(--hair); margin: 0; }
|
||||
.log time { color: var(--dim); }
|
||||
.log a { text-decoration: none; }
|
||||
.log a:hover { text-decoration: underline; }
|
||||
.log code { font-size: 1em; background: none; padding: 0; }
|
||||
@media (max-width: 560px) {
|
||||
.log li { grid-template-columns: auto 1fr; }
|
||||
.log span { grid-column: 1 / -1; }
|
||||
}
|
||||
|
||||
/* Inhaltsverzeichnisse in der Doku (ehemals Hextra-Cards) */
|
||||
.index { list-style: none; padding: 0 !important; border-top: 1px solid var(--hair); }
|
||||
.index li { margin: 0; padding: .45rem 0; border-bottom: 1px solid var(--hair); }
|
||||
.index a { font-weight: 600; }
|
||||
.index span { display: block; color: var(--dim); font-size: .9rem; }
|
||||
|
||||
/* ---- Doku ----------------------------------------------------------- */
|
||||
|
||||
.docs { padding-top: 2.5rem; display: grid; gap: 2rem; }
|
||||
|
||||
.docs { max-width: var(--wrap); margin: 0 auto; padding: 2.5rem 16px 0; display: grid; gap: 2rem; }
|
||||
@media (min-width: 860px) {
|
||||
.docs { grid-template-columns: 13rem minmax(0, 44rem); gap: 3rem; }
|
||||
.docnav { position: sticky; top: 1.5rem; align-self: start; }
|
||||
.docs { grid-template-columns: 14rem minmax(0, 46rem); gap: 3.5rem; }
|
||||
.docnav { position: sticky; top: 1.5rem; align-self: start; max-height: calc(100vh - 3rem); overflow-y: auto; }
|
||||
}
|
||||
|
||||
.docnav { font-size: .9rem; }
|
||||
.docnav { font-size: .9375rem; }
|
||||
.docnav a { text-decoration: none; }
|
||||
.docnav a:hover, .docnav a[aria-current] { text-decoration: underline; }
|
||||
.docnav a[aria-current] { font-weight: 700; }
|
||||
.docnav p {
|
||||
margin: 1.25rem 0 .35rem;
|
||||
font: 600 .7rem var(--mono);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .08em;
|
||||
}
|
||||
.docnav a:hover { text-decoration: underline; }
|
||||
.docnav a[aria-current] { font-weight: 500; color: var(--accent); }
|
||||
.docnav p { margin: 1.4rem 0 .4rem; font: .75rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--text-secondary); }
|
||||
.docnav ul { list-style: none; margin: 0; padding: 0; }
|
||||
.docnav li { margin: 0 0 .2rem; }
|
||||
|
||||
.docnav li { margin: 0 0 .25rem; }
|
||||
@media (max-width: 859px) {
|
||||
.docnav { border-bottom: 1px solid var(--hair); padding-bottom: 1rem; }
|
||||
.docnav { border-bottom: 1px solid var(--hatch); padding-bottom: 1rem; }
|
||||
.docnav ul { display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
|
||||
}
|
||||
|
||||
.prose { min-width: 0; background: color-mix(in srgb, var(--canvas) 86%, transparent); }
|
||||
.prose > :first-child { margin-top: 0; }
|
||||
.prose h1 { font: 800 clamp(2rem, 4vw, 2.75rem)/1.08 var(--display); letter-spacing: -.025em; margin: 0 0 1.75rem; }
|
||||
.prose h2 { margin: 3rem 0 1rem; font: 600 1.5rem/1.2 var(--display); letter-spacing: -.01em; }
|
||||
.prose h2::before { content: ""; display: block; height: 1px; margin-bottom: 1rem; background: var(--text-primary); }
|
||||
.prose h3 { font: 600 1.125rem/1.3 var(--display); margin: 2rem 0 .5rem; }
|
||||
.prose p, .prose ul, .prose ol, .prose pre, .prose table { margin: 0 0 1rem; }
|
||||
.prose ul, .prose ol { padding-left: 1.25rem; }
|
||||
.prose li { margin-bottom: .3rem; }
|
||||
.prose :not(pre) > code { background: var(--code); padding: .05em .3em; border-radius: 2px; }
|
||||
.prose pre { background: var(--code); padding: .75rem 1rem; overflow-x: auto; line-height: 1.45; }
|
||||
.prose pre code { font-size: .8125rem; }
|
||||
.prose table { border-collapse: collapse; width: 100%; font-size: .9375rem; display: block; overflow-x: auto; }
|
||||
.prose th, .prose td { text-align: left; vertical-align: top; padding: .4rem .75rem .4rem 0; border-bottom: 1px solid var(--hatch); }
|
||||
.prose th { font: .75rem var(--mono); text-transform: uppercase; letter-spacing: .06em; border-bottom-color: var(--text-primary); }
|
||||
.prose blockquote { margin: 0 0 1rem; padding-left: 1rem; border-left: 2px solid var(--accent); color: var(--text-secondary); }
|
||||
.prose hr { border: 0; border-top: 1px dashed var(--hatch); margin: 2rem 0; }
|
||||
.prose img { display: block; margin: 1.5rem 0; border: 1px solid var(--hatch); background: var(--panel); }
|
||||
:root[data-theme="dark"] .prose img { filter: brightness(.9); }
|
||||
|
||||
.index { list-style: none; padding: 0 !important; border-top: 1px solid var(--hatch); }
|
||||
.index li { margin: 0; padding: .55rem 0; border-bottom: 1px solid var(--hatch); }
|
||||
.index a { font-weight: 500; }
|
||||
.index span { display: block; color: var(--text-secondary); font-size: .9375rem; }
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after { animation: none !important; transition: none !important; transition-delay: 0s !important; }
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// Gemeinsam für Startseite und Doku: Farbschema-Schalter, Animationen in verborgenen Tabs anhalten.
|
||||
export function initCommon() {
|
||||
const root = document.documentElement;
|
||||
const dark = () => root.dataset.theme === "dark" || (root.dataset.theme !== "light" && matchMedia("(prefers-color-scheme: dark)").matches);
|
||||
for (const b of document.querySelectorAll(".theme-toggle")) {
|
||||
const sync = () => b.setAttribute("aria-pressed", String(dark()));
|
||||
sync();
|
||||
b.addEventListener("click", () => {
|
||||
const next = dark() ? "light" : "dark";
|
||||
root.dataset.theme = next;
|
||||
try {
|
||||
localStorage.setItem("dossier-theme", next);
|
||||
} catch {
|
||||
/* ohne Speicher gilt die Wahl nur für diese Seite */
|
||||
}
|
||||
sync();
|
||||
});
|
||||
}
|
||||
document.addEventListener("visibilitychange", () => document.body.classList.toggle("paused", document.hidden));
|
||||
}
|
||||
@@ -0,0 +1,496 @@
|
||||
// Startseite: Scroll-Video (Blob, geglättete Zeit, gegatete Seeks), Textabschnitte, Schnittmarken,
|
||||
// „Schnitt setzen". Standard s. website/_design/DESIGN-PAKET.md (Technik) und TODO.md [138].
|
||||
import { initCommon } from "./common.js";
|
||||
|
||||
initCommon();
|
||||
|
||||
const VIDEO_URL = "hero/hero-scrub.mp4"; // relativ zur Startseite (GitHub Pages kann unter /DOSSIER/ liegen)
|
||||
const POSTER_URL = "hero/hero-poster.jpg";
|
||||
// Die fünf Bedingungen für die ruhige Startseite, Zeichen für Zeichen wie in home.css
|
||||
const GATES = [
|
||||
"(max-width: 720px)",
|
||||
"(orientation: portrait) and (max-width: 1024px)",
|
||||
"(orientation: portrait) and (pointer: coarse)",
|
||||
"(orientation: landscape) and (pointer: coarse) and (max-height: 560px)",
|
||||
"(prefers-reduced-motion: reduce)",
|
||||
];
|
||||
const RM = matchMedia("(prefers-reduced-motion: reduce)");
|
||||
|
||||
const root = document.documentElement;
|
||||
const hero = document.querySelector(".hero");
|
||||
const stage = hero.querySelector(".stage");
|
||||
const video = hero.querySelector(".hero-video");
|
||||
const poster = hero.querySelector(".poster");
|
||||
const ring = hero.querySelector(".ring");
|
||||
const clamp = (v, lo, hi) => Math.min(hi, Math.max(lo, v));
|
||||
const smoothstep = (p, e0, e1) => {
|
||||
const t = clamp((p - e0) / (e1 - e0), 0, 1);
|
||||
return t * t * (3 - 2 * t);
|
||||
};
|
||||
function rng(seed) {
|
||||
let s = seed >>> 0;
|
||||
return () => (s = (s * 1664525 + 1013904223) >>> 0) / 4294967296;
|
||||
}
|
||||
|
||||
// ---- Text zerlegen (einmal): unsichtbarer Satz für Vorleser, sichtbare Kopie aus Wörtern/Zeichen ----
|
||||
const OPENING_WORDS = new Set(["Fenstern,", "Türen."]);
|
||||
function split(el, mode, seed) {
|
||||
const text = el.textContent.replace(/\s+/g, " ").trim();
|
||||
const r = rng(seed);
|
||||
const sr = document.createElement("span");
|
||||
sr.className = "vh";
|
||||
sr.textContent = text;
|
||||
const vis = document.createElement("span");
|
||||
vis.setAttribute("aria-hidden", "true");
|
||||
const word = (w, th) => {
|
||||
const s = document.createElement("span");
|
||||
s.className = "w";
|
||||
s.textContent = w;
|
||||
s.style.setProperty("--th", th.toFixed(3));
|
||||
return s;
|
||||
};
|
||||
if (mode === "chars") {
|
||||
// Zeichen in Wort-Hüllen, damit nie mitten im Wort umbrochen wird
|
||||
const n = text.length;
|
||||
let i = 0;
|
||||
text.split(" ").forEach((w, wi, all) => {
|
||||
const ws = document.createElement("span");
|
||||
ws.className = "w";
|
||||
for (const ch of w) {
|
||||
const c = document.createElement("span");
|
||||
c.className = "c";
|
||||
c.textContent = ch;
|
||||
c.style.setProperty("--th", ((i / n) * 0.6 + r() * 0.05).toFixed(3));
|
||||
ws.append(c);
|
||||
i++;
|
||||
}
|
||||
vis.append(ws);
|
||||
if (wi < all.length - 1) {
|
||||
vis.append(" ");
|
||||
i++;
|
||||
}
|
||||
});
|
||||
} else if (mode === "words" || mode === "rise") {
|
||||
const words = mode === "rise" ? text.split(/(?<=-)/) : text.split(" ");
|
||||
words.forEach((w, i) => {
|
||||
const s = word(w, mode === "rise" ? i * 0.14 : (i / words.length) * 0.55 + r() * 0.06);
|
||||
if (OPENING_WORDS.has(w)) s.classList.add("em");
|
||||
vis.append(s);
|
||||
if (mode === "words" && i < words.length - 1) vis.append(" ");
|
||||
});
|
||||
} else {
|
||||
// Zeilen bzw. Hälften: Kinder-<span> der Vorlage
|
||||
const parts = [...el.querySelectorAll(":scope > span")].map((s) => s.textContent.trim());
|
||||
parts.forEach((p, li) => {
|
||||
const line = document.createElement("span");
|
||||
line.className = mode === "lines" ? "ln" : "half";
|
||||
if (mode === "lines") {
|
||||
line.style.setProperty("--lt", (li * 0.32).toFixed(3));
|
||||
const ws = p.split(" ");
|
||||
ws.forEach((w, i) => {
|
||||
line.append(word(w, li * 0.32 + i * 0.05 + r() * 0.03));
|
||||
if (i < ws.length - 1) line.append(" ");
|
||||
});
|
||||
} else line.textContent = p;
|
||||
vis.append(line);
|
||||
});
|
||||
}
|
||||
el.replaceChildren(sr, vis);
|
||||
}
|
||||
document.querySelectorAll("[data-split]").forEach((el, i) => split(el, el.dataset.split, 17 + i * 31));
|
||||
|
||||
// ---- Abschnitte im Hero (Scroll-Distanz) ----
|
||||
const bands = [...hero.querySelectorAll(".band")].map((el, i, all) => ({
|
||||
el,
|
||||
a: +el.dataset.a,
|
||||
b: +el.dataset.b,
|
||||
ramp: el.dataset.ramp ? +el.dataset.ramp : 0,
|
||||
first: i === 0,
|
||||
last: i === all.length - 1,
|
||||
op: -1,
|
||||
k: -1,
|
||||
on: null,
|
||||
}));
|
||||
let loadK = 0;
|
||||
function updateCaptions(p) {
|
||||
for (const B of bands) {
|
||||
const f = Math.min(0.02, (B.b - B.a) / 3);
|
||||
let op = (B.first ? 1 : smoothstep(p, B.a, B.a + f)) * (B.last ? 1 : 1 - smoothstep(p, B.b - f, B.b));
|
||||
let k = clamp((p - B.a) / (B.ramp || Math.min(0.025, (B.b - B.a) * 0.35)), 0, 1);
|
||||
if (B.first) k = Math.max(k, loadK);
|
||||
if (p < B.a - 0.001 || p > B.b + 0.001) op = B.first && p <= B.b ? op : 0;
|
||||
op = Math.round(op * 1000) / 1000;
|
||||
if (op !== B.op) {
|
||||
B.op = op;
|
||||
B.el.style.opacity = String(op);
|
||||
}
|
||||
if (Math.abs(k - B.k) > 0.008 || (k !== B.k && (k === 0 || k === 1))) {
|
||||
B.k = k;
|
||||
B.el.style.setProperty("--k", k.toFixed(3));
|
||||
}
|
||||
const on = op > 0.5;
|
||||
if (on !== B.on) {
|
||||
B.on = on;
|
||||
B.el.classList.toggle("on", on);
|
||||
}
|
||||
}
|
||||
}
|
||||
function clearCaptions() {
|
||||
for (const B of bands) {
|
||||
B.el.style.removeProperty("opacity");
|
||||
B.el.style.removeProperty("--k");
|
||||
B.el.classList.remove("on");
|
||||
B.op = B.k = -1;
|
||||
B.on = null;
|
||||
}
|
||||
}
|
||||
|
||||
// ---- Scroll → Zeit, geglättet, ruht bei Gleichstand ----
|
||||
function heroProgress() {
|
||||
const r = hero.getBoundingClientRect();
|
||||
const range = hero.offsetHeight - innerHeight;
|
||||
return range > 0 ? clamp(-r.top / range, 0, 1) : 0;
|
||||
}
|
||||
let target = 0;
|
||||
let shown = 0;
|
||||
let rafId = null;
|
||||
let lastTick = 0;
|
||||
let heroOnScreen = true;
|
||||
let moved = false;
|
||||
function tick(now) {
|
||||
const dt = Math.min(100, now - (lastTick || now));
|
||||
lastTick = now;
|
||||
shown += (target - shown) * (1 - Math.pow(1 - 0.16, dt / 16.667));
|
||||
if (Math.abs(target - shown) < 0.0005) {
|
||||
shown = target;
|
||||
rafId = null;
|
||||
lastTick = 0;
|
||||
} else rafId = requestAnimationFrame(tick);
|
||||
requestSeek(shown * (video.duration || 0));
|
||||
updateCaptions(shown);
|
||||
const m = shown > 0.015;
|
||||
if (m !== moved) {
|
||||
moved = m;
|
||||
stage.classList.toggle("moved", m);
|
||||
}
|
||||
}
|
||||
function onScroll() {
|
||||
target = heroProgress();
|
||||
if (rafId === null && heroOnScreen) rafId = requestAnimationFrame(tick);
|
||||
}
|
||||
new IntersectionObserver((es) => {
|
||||
heroOnScreen = es[0].isIntersecting;
|
||||
if (heroOnScreen && scrubOn) onScroll();
|
||||
}).observe(hero);
|
||||
|
||||
// ---- Gegatete Seeks (nie zwei gleichzeitig, nur der neueste zählt) ----
|
||||
let seekBusy = false;
|
||||
let pendingTime = null;
|
||||
function requestSeek(t) {
|
||||
if (!video.duration || !videoReady) return;
|
||||
if (Math.abs(video.currentTime - t) < 0.001) return;
|
||||
if (seekBusy) {
|
||||
pendingTime = t;
|
||||
return;
|
||||
}
|
||||
seekBusy = true;
|
||||
video.currentTime = t;
|
||||
}
|
||||
video.addEventListener("seeked", () => {
|
||||
seekBusy = false;
|
||||
if (pendingTime !== null) {
|
||||
const t = pendingTime;
|
||||
pendingTime = null;
|
||||
requestSeek(t);
|
||||
}
|
||||
});
|
||||
video.addEventListener("error", () => {
|
||||
seekBusy = false;
|
||||
pendingTime = null;
|
||||
failVideo();
|
||||
});
|
||||
|
||||
// ---- Video als Blob (Range-unabhängig), Poster zuerst, Wachhund ----
|
||||
let videoReady = false;
|
||||
let heroInit = false;
|
||||
function failVideo() {
|
||||
stage.classList.add("video-failed");
|
||||
}
|
||||
async function loadHeroBlob() {
|
||||
const ctrl = new AbortController();
|
||||
let watchdog = setTimeout(() => ctrl.abort(), 20000);
|
||||
const res = await fetch(VIDEO_URL, { priority: "low", signal: ctrl.signal });
|
||||
if (!res.ok || !res.body) throw new Error(String(res.status));
|
||||
const total = Number(res.headers.get("Content-Length")) || 3019980;
|
||||
const reader = res.body.getReader();
|
||||
const chunks = [];
|
||||
let got = 0;
|
||||
let lastRing = 0;
|
||||
for (;;) {
|
||||
const { done, value } = await reader.read();
|
||||
if (done) break;
|
||||
clearTimeout(watchdog);
|
||||
watchdog = setTimeout(() => ctrl.abort(), 20000);
|
||||
chunks.push(value);
|
||||
got += value.length;
|
||||
const frac = Math.min(1, got / total);
|
||||
const now = performance.now();
|
||||
if (now - lastRing > 100 || frac === 1) {
|
||||
lastRing = now;
|
||||
ring.style.setProperty("--ld", String(Math.round(126 * (1 - frac))));
|
||||
}
|
||||
}
|
||||
clearTimeout(watchdog);
|
||||
ring.style.setProperty("--ld", "0");
|
||||
video.src = URL.createObjectURL(new Blob(chunks, { type: "video/mp4" }));
|
||||
video.load();
|
||||
video.addEventListener(
|
||||
"canplay",
|
||||
() => {
|
||||
videoReady = true;
|
||||
requestSeek(heroProgress() * video.duration);
|
||||
stage.classList.add("video-ready");
|
||||
},
|
||||
{ once: true },
|
||||
);
|
||||
}
|
||||
function initHeroOnce() {
|
||||
if (heroInit) return;
|
||||
heroInit = true;
|
||||
poster.style.backgroundImage = `url("${POSTER_URL}")`;
|
||||
let started = false;
|
||||
const start = () => {
|
||||
if (started) return;
|
||||
started = true;
|
||||
loadHeroBlob().catch(failVideo);
|
||||
};
|
||||
const img = new Image();
|
||||
img.onload = start;
|
||||
img.onerror = start;
|
||||
img.src = POSTER_URL;
|
||||
setTimeout(start, 4000);
|
||||
}
|
||||
|
||||
// ---- Die fünf Bedingungen, live ----
|
||||
let scrubOn = false;
|
||||
function enableScrub() {
|
||||
if (scrubOn) return;
|
||||
scrubOn = true;
|
||||
root.classList.add("scrub");
|
||||
initHeroOnce();
|
||||
addEventListener("scroll", onScroll, { passive: true });
|
||||
addEventListener("resize", onScroll, { passive: true });
|
||||
bands.forEach((B) => {
|
||||
B.op = -1;
|
||||
B.k = -1;
|
||||
});
|
||||
unpinFinalStates();
|
||||
shown = target = heroProgress();
|
||||
updateCaptions(shown);
|
||||
onScroll();
|
||||
}
|
||||
function disableScrub() {
|
||||
if (!scrubOn) return;
|
||||
scrubOn = false;
|
||||
removeEventListener("scroll", onScroll);
|
||||
removeEventListener("resize", onScroll);
|
||||
if (rafId !== null) {
|
||||
cancelAnimationFrame(rafId);
|
||||
rafId = null;
|
||||
}
|
||||
root.classList.remove("scrub");
|
||||
clearCaptions();
|
||||
}
|
||||
function applyHeroMode() {
|
||||
if (GATES.some((q) => matchMedia(q).matches)) disableScrub();
|
||||
else enableScrub();
|
||||
}
|
||||
const MQLS = GATES.map((q) => matchMedia(q));
|
||||
MQLS.forEach((m) => m.addEventListener("change", applyHeroMode));
|
||||
|
||||
// Abschnitt 1 setzt sich beim Laden einmal zusammen (danach übernimmt der Scroll)
|
||||
const loadStart = performance.now();
|
||||
function loadRamp(now) {
|
||||
loadK = smoothstep(now - loadStart, 150, 1400);
|
||||
if (scrubOn) updateCaptions(shown);
|
||||
if (loadK < 1) requestAnimationFrame(loadRamp);
|
||||
}
|
||||
|
||||
// ---- Schnittmarken, Masslinien, Auftritte ----
|
||||
const reveals = [...document.querySelectorAll(".cutmark, .dimline, .reveal, .end .wall")];
|
||||
const ARROW = '<svg viewBox="0 0 20 28" aria-hidden="true"><path d="M10 1V26M4 20l6 6 6-6" fill="none" stroke="currentColor" stroke-width="2"/></svg>';
|
||||
function buildCutmark(el) {
|
||||
const L = el.dataset.letter;
|
||||
if (!el.firstChild) {
|
||||
el.innerHTML = `<span class="cm-end">${ARROW}<b>${L}</b></span><span class="cm-line"></span><span class="cm-end">${ARROW}<b>${L}</b></span>`;
|
||||
}
|
||||
const line = el.querySelector(".cm-line");
|
||||
const w = line.getBoundingClientRect().width;
|
||||
// Strich-Punkt wie die Schnittlinie im Plan: 22 lang, 6 Lücke, 3 Punkt, 6 Lücke
|
||||
const n = Math.max(2, Math.floor(w / 37));
|
||||
if (line.childElementCount === n * 2) return;
|
||||
const frag = document.createDocumentFragment();
|
||||
for (let i = 0; i < n; i++) {
|
||||
const d = Math.abs((i + 0.5) / n - 0.5) * 2;
|
||||
for (const cls of ["", "dot"]) {
|
||||
const s = document.createElement("i");
|
||||
if (cls) s.className = cls;
|
||||
s.style.setProperty("--dl", `${(d * 0.55).toFixed(3)}s`);
|
||||
frag.append(s);
|
||||
}
|
||||
}
|
||||
line.replaceChildren(frag);
|
||||
}
|
||||
const cutmarks = [...document.querySelectorAll(".cutmark")];
|
||||
cutmarks.forEach(buildCutmark);
|
||||
let rsz = 0;
|
||||
addEventListener("resize", () => {
|
||||
clearTimeout(rsz);
|
||||
rsz = setTimeout(() => cutmarks.forEach(buildCutmark), 200);
|
||||
});
|
||||
const revealIO = new IntersectionObserver(
|
||||
(es) => {
|
||||
for (const e of es) {
|
||||
if (!e.isIntersecting) continue;
|
||||
e.target.classList.add("in");
|
||||
if (e.target.matches(".step-list, .feat-list")) setTimeout(() => e.target.classList.add("done"), 1400);
|
||||
}
|
||||
},
|
||||
{ rootMargin: "0px 0px -12% 0px" },
|
||||
);
|
||||
reveals.forEach((el) => revealIO.observe(el));
|
||||
// Lebendige Elemente nur auf dem Bildschirm
|
||||
const liveIO = new IntersectionObserver((es) => es.forEach((e) => e.target.classList.toggle("live", e.isIntersecting)));
|
||||
document.querySelectorAll(".sec").forEach((s) => liveIO.observe(s));
|
||||
|
||||
// ---- Was alles drin ist: Bild beim Darüberfahren ----
|
||||
const featBtns = [...document.querySelectorAll(".feat-list button")];
|
||||
const shots = [...document.querySelectorAll(".shots img")];
|
||||
function showShot(i) {
|
||||
featBtns.forEach((b, j) => b.setAttribute("aria-pressed", String(i === j)));
|
||||
shots.forEach((s, j) => s.classList.toggle("on", i === j));
|
||||
}
|
||||
featBtns.forEach((b, i) => {
|
||||
b.addEventListener("click", () => showShot(i));
|
||||
b.addEventListener("pointerenter", (e) => {
|
||||
if (e.pointerType === "mouse") showShot(i);
|
||||
});
|
||||
b.addEventListener("focus", () => showShot(i));
|
||||
});
|
||||
|
||||
// ---- Schnitt setzen: Linie über den Grundriss ziehen, Schnitt folgt (12 vorgerechnete Schnitte) ----
|
||||
// Lage der Schnittlinien im Modell (x in m) und Ausschnitt des Grundrissbilds (viewBox x, Breite)
|
||||
const CUT_X = Array.from({ length: 12 }, (_, i) => 0.6 + (i * 16.6) / 11);
|
||||
const PLAN_VB = [-7.2, 28.25406];
|
||||
const cutPlan = document.querySelector(".cut-plan");
|
||||
const cutLine = document.querySelector(".cut-line");
|
||||
const cutImgs = [...document.querySelectorAll(".cut-view img")];
|
||||
const cutRange = document.querySelector(".cut-ctrl input");
|
||||
const cutOut = document.querySelector(".cut-ctrl .kote");
|
||||
const f0 = (CUT_X[0] - PLAN_VB[0]) / PLAN_VB[1];
|
||||
const f1 = (CUT_X[11] - PLAN_VB[0]) / PLAN_VB[1];
|
||||
let cutIdx = -1;
|
||||
let cutU = 0.5;
|
||||
let lastCutPx = -1;
|
||||
function setCut(u) {
|
||||
cutU = clamp(u, 0, 1);
|
||||
const px = Math.round((f0 + (f1 - f0) * cutU) * cutPlan.clientWidth * 10) / 10;
|
||||
if (px !== lastCutPx) {
|
||||
lastCutPx = px;
|
||||
cutLine.style.transform = `translateX(${px}px)`;
|
||||
}
|
||||
const i = Math.round(cutU * 11);
|
||||
if (i !== cutIdx) {
|
||||
cutIdx = i;
|
||||
cutImgs.forEach((im, j) => im.classList.toggle("on", j === i));
|
||||
const x = CUT_X[i].toFixed(2);
|
||||
cutOut.textContent = `A–A ${x}`;
|
||||
cutRange.setAttribute("aria-valuetext", `${x} m von der Westfassade, Schnitt ${i + 1} von 12`);
|
||||
}
|
||||
const v = String(Math.round(cutU * 1000));
|
||||
if (cutRange.value !== v) cutRange.value = v;
|
||||
}
|
||||
cutRange.addEventListener("input", () => setCut(+cutRange.value / 1000));
|
||||
// Loslassen: weich auf den gezeigten Schnitt einrasten
|
||||
let snapRaf = null;
|
||||
function snapCut() {
|
||||
if (RM.matches) return setCut(Math.round(cutU * 11) / 11);
|
||||
const goal = Math.round(cutU * 11) / 11;
|
||||
cancelAnimationFrame(snapRaf);
|
||||
const step = () => {
|
||||
const d = goal - cutU;
|
||||
if (Math.abs(d) < 0.001) return setCut(goal);
|
||||
setCut(cutU + d * 0.2);
|
||||
snapRaf = requestAnimationFrame(step);
|
||||
};
|
||||
snapRaf = requestAnimationFrame(step);
|
||||
}
|
||||
cutRange.addEventListener("change", snapCut);
|
||||
let dragging = false;
|
||||
const fromPointer = (e) => {
|
||||
const r = cutPlan.getBoundingClientRect();
|
||||
return ((e.clientX - r.left) / r.width - f0) / (f1 - f0);
|
||||
};
|
||||
cutPlan.addEventListener("pointerdown", (e) => {
|
||||
dragging = true;
|
||||
cancelAnimationFrame(snapRaf);
|
||||
cutPlan.setPointerCapture(e.pointerId);
|
||||
setCut(fromPointer(e));
|
||||
});
|
||||
cutPlan.addEventListener("pointermove", (e) => {
|
||||
if (dragging) setCut(fromPointer(e));
|
||||
});
|
||||
const endDrag = () => {
|
||||
if (!dragging) return;
|
||||
dragging = false;
|
||||
snapCut();
|
||||
};
|
||||
cutPlan.addEventListener("pointerup", endDrag);
|
||||
cutPlan.addEventListener("pointercancel", endDrag);
|
||||
addEventListener("resize", () => {
|
||||
lastCutPx = -1;
|
||||
setCut(cutU);
|
||||
});
|
||||
// Ohne Bewegung direkt der mittlere Schnitt; sonst ein langsamer Hinweis-Schwenk beim ersten Erscheinen
|
||||
setCut(5 / 11);
|
||||
let cutHinted = false;
|
||||
new IntersectionObserver(
|
||||
(es) => {
|
||||
if (!es[0].isIntersecting || cutHinted || RM.matches) return;
|
||||
cutHinted = true;
|
||||
const t0 = performance.now();
|
||||
const from = cutU;
|
||||
const hint = (now) => {
|
||||
if (dragging || pinned) return;
|
||||
const t = clamp((now - t0) / 2600, 0, 1);
|
||||
setCut(from + Math.sin(t * Math.PI * 2) * 0.18 * (1 - t));
|
||||
if (t < 1) requestAnimationFrame(hint);
|
||||
else snapCut();
|
||||
};
|
||||
requestAnimationFrame(hint);
|
||||
},
|
||||
{ threshold: 0.6 },
|
||||
).observe(cutPlan);
|
||||
|
||||
// ---- Reduzierte Bewegung live, in beide Richtungen ----
|
||||
let pinned = [];
|
||||
function pinToFinalStates() {
|
||||
pinned = reveals.filter((el) => !el.classList.contains("in"));
|
||||
pinned.forEach((el) => el.classList.add("in", "done"));
|
||||
cancelAnimationFrame(snapRaf);
|
||||
setCut(5 / 11);
|
||||
}
|
||||
function unpinFinalStates() {
|
||||
for (const el of pinned) {
|
||||
if (el.getBoundingClientRect().top > innerHeight) el.classList.remove("in", "done");
|
||||
}
|
||||
pinned = [];
|
||||
}
|
||||
RM.addEventListener("change", (e) => {
|
||||
if (e.matches) pinToFinalStates();
|
||||
else applyHeroMode();
|
||||
});
|
||||
|
||||
applyHeroMode();
|
||||
if (RM.matches) pinToFinalStates();
|
||||
requestAnimationFrame(loadRamp);
|
||||
@@ -0,0 +1,3 @@
|
||||
import { initCommon } from "./common.js";
|
||||
|
||||
initCommon();
|
||||
@@ -0,0 +1,7 @@
|
||||
// Gewähltes Farbschema vor dem ersten Bild setzen (eigene Datei statt Inline-Skript, CSP-tauglich).
|
||||
try {
|
||||
const t = localStorage.getItem("dossier-theme");
|
||||
if (t === "light" || t === "dark") document.documentElement.dataset.theme = t;
|
||||
} catch {
|
||||
/* ohne Speicher: Systemvorgabe */
|
||||
}
|
||||
@@ -1,82 +1,6 @@
|
||||
---
|
||||
title: "DOSSIER"
|
||||
description: "Dossier ist ein quelloffenes CAD für Architektur: ein Gebäudemodell aus Bauteilen, aus dem Grundriss, Schnitt, Ansicht, 3D und Planblätter berechnet werden. Für die Praxis in der Schweiz, AGPL-3.0."
|
||||
title: "Dossier"
|
||||
description: "Dossier ist ein freies CAD für Architektur. Du baust ein Gebäude aus Bauteilen, Grundriss, Schnitt und Ansicht werden daraus berechnet. Open-Source-CAAD unter AGPL-3.0."
|
||||
---
|
||||
|
||||
Dossier ist ein CAD-Programm für Architektinnen und Architekten. Man modelliert
|
||||
ein Gebäude aus Bauteilen – Wände, Decken, Dächer, Treppen, Fenster, Türen,
|
||||
Räume – und erhält daraus Grundrisse, Deckenspiegel, Schnitte, Ansichten, ein
|
||||
3D-Modell, Mengen und fertige Planblätter. Dazu kommt ein vollwertiges
|
||||
2D-Zeichenprogramm mit Befehlszeile, wie man es von AutoCAD oder Rhino kennt.
|
||||
|
||||

|
||||
|
||||
## Ein Modell, alle Pläne
|
||||
|
||||
Es gibt genau ein Modell. Alles andere wird daraus abgeleitet und nie von Hand
|
||||
nachgeführt: Verschiebt man eine Wand, stimmen Grundriss, Schnitt, Ansicht, 3D,
|
||||
Flächenbilanz, Fenster- und Türliste und IFC sofort wieder. Bemassungen, die
|
||||
an Bauteilen gefangen wurden, wandern mit.
|
||||
|
||||
Der Grundriss wird nicht aus einem 3D-Netz geschnitten, sondern aus den
|
||||
Bauteilen berechnet: Wandachse und Schichten ergeben Linien und Füllungen,
|
||||
Öffnungen ergeben Lücke, Leibung und Symbol. Strichstärken, Schraffuren und
|
||||
Detailgrad kommen erst beim Zeichnen dazu – das PDF ist derselbe Plan wie am
|
||||
Bildschirm, mit echten Stiftstärken in Millimetern.
|
||||
|
||||

|
||||
|
||||
## Für wen
|
||||
|
||||
- **Architekturbüros in der Schweiz:** Landeskoordinaten LV95, Daten von
|
||||
swisstopo, Kataster als DWG/DXF, Flächen nach SIA 416, Kennzahlen nach IVHB,
|
||||
Darstellung in Anlehnung an SIA 400 (Baustoffe, Schraffuren, Linientypen).
|
||||
- **Wettbewerb bis Ausführung:** Baurecht und Lage prüfen, Massenmodelle und
|
||||
Raumprogramm, Eingabepläne 1:100, Ausführungspläne 1:50, Plansätze als PDF,
|
||||
DXF/DWG und IFC für die Fachplaner.
|
||||
- **Wer offene Werkzeuge will:** Dossier ist freie Software unter der
|
||||
AGPL-3.0. Das Dateiformat `.obp` ist offenes JSON, die Kommandozeile
|
||||
`dossier-cli` erzeugt Pläne und Exporte ohne Fenster.
|
||||
|
||||
## Was es kann
|
||||
|
||||
- **Bauteile:** mehrschichtige Wände (auch gebogen) mit sauberen Anschlüssen,
|
||||
Fenster und Türen mit Typen, Anschlag und Leibung, Decken mit Aussparungen,
|
||||
Dächer über beliebigen Grundrissen mit Gauben und Dachfenstern, Treppen,
|
||||
Stützen, Räume, Volumenkörper.
|
||||
- **Pläne:** Grundriss je Geschoss, Deckenspiegel, Schnitte und Ansichten aus
|
||||
Schnittlinien, Ansichtsbereich, Detailgrad, Ansichtsvorlagen, Skizzenstil.
|
||||
- **Layout:** Blätter mit Ansichtsfenstern, Masterlayouts mit Plankopf,
|
||||
Legenden, Tabellen, Publikationssätze mit Index, Vektor-PDF mit Ebenen.
|
||||
- **Ort:** Georeferenz, Gelände aus Höhenlinien, Baugrube, Baulinien und
|
||||
Grenzabstände, Sonnenstand und Schatten.
|
||||
- **Austausch:** DXF/DWG, IFC4/IFC2x3, STEP, OBJ/STL/glTF, PDF, SVG, CSV.
|
||||
|
||||
Alle Funktionen, gegliedert und mit ehrlichem Stand: [Funktionen](/funktionen/).
|
||||
|
||||

|
||||
|
||||
## Stand
|
||||
|
||||
Dossier ist in aktiver Entwicklung und noch vor der ersten öffentlichen Beta.
|
||||
Es gibt keine fertigen Installer; man baut es aus dem Quellcode
|
||||
([Download und Installation](/download/)). Hauptplattform ist macOS (Tauri,
|
||||
Anzeige über Metal), Linux läuft über Electron. Was fertig ist und was nicht,
|
||||
steht unter [Stand](/stand/).
|
||||
|
||||
## Weiter
|
||||
|
||||
- [Anleitung](/docs/anleitung/) – Bedienung, Schritt für Schritt
|
||||
- [Für Entwickler](/docs/entwickler/) – Aufbau, Bauen, Testen, Mitarbeiten
|
||||
- [Quellcode auf GitHub](https://github.com/expiredtanin/DOSSIER) – Issues,
|
||||
Pull Requests, Arbeitsliste `TODO.md`
|
||||
|
||||
## Lizenz
|
||||
|
||||
© 2026 Karim Gabriele Varano, veröffentlicht unter der
|
||||
[GNU Affero General Public License v3.0 oder später](https://github.com/expiredtanin/DOSSIER/blob/master/LICENSE).
|
||||
Wer Dossier verändert und als Netzwerkdienst anbietet, muss den geänderten
|
||||
Quellcode ebenfalls offenlegen. Fremdkomponenten behalten ihre Lizenzen
|
||||
(siehe [`NOTICE`](https://github.com/expiredtanin/DOSSIER/blob/master/NOTICE)).
|
||||
Dossier ist Teil von [openbureau](https://openbureau.ch) und entstand aus dem
|
||||
gleichnamigen Rhino-Plugin.
|
||||
<!-- Die Startseite steht vollständig in layouts/home.html (Texte aus website/_design/DESIGN-PAKET.md). -->
|
||||
@@ -1,5 +1,5 @@
|
||||
baseURL = "https://dossier.openbureau.ch/"
|
||||
title = "DOSSIER"
|
||||
title = "Dossier"
|
||||
languageCode = "de-CH"
|
||||
defaultContentLanguage = "de"
|
||||
enableRobotsTXT = true
|
||||
@@ -12,13 +12,9 @@ disableKinds = ["taxonomy", "term", "rss"]
|
||||
unsafe = true
|
||||
|
||||
[params]
|
||||
description = "DOSSIER ist ein Open-Source-CAD für Architektur: 2D-Zeichnen und ein Gebäudemodell aus Bauteilen, aus dem Grundriss, Schnitt, Ansicht und PDF berechnet werden. AGPL-3.0."
|
||||
description = "Dossier ist ein freies CAD für Architektur. Du baust ein Gebäude aus Bauteilen, Grundriss, Schnitt und Ansicht werden daraus berechnet. Open-Source-CAAD unter AGPL-3.0."
|
||||
version = "0.1.0"
|
||||
|
||||
repo = "https://git.openbureau.ch/karim/DOSSIER-STANDALONE"
|
||||
# Gitea-API für das Commit-Log auf der Startseite (wird beim Bauen geholt;
|
||||
# ohne Netz fällt der Abschnitt auf einen Link zurück).
|
||||
commitsApi = "https://git.openbureau.ch/api/v1/repos/karim/DOSSIER-STANDALONE/commits?limit=12&stat=false&verification=false&files=false"
|
||||
plugin = "https://git.openbureau.ch/karim/dossier"
|
||||
bureau = "https://openbureau.ch"
|
||||
forum = "https://dossier.openbureau.ch/forum"
|
||||
repo = "https://github.com/expiredtanin/DOSSIER"
|
||||
releases = "https://github.com/expiredtanin/DOSSIER/releases"
|
||||
bureau = "https://openbureau.ch"
|
||||
@@ -0,0 +1,4 @@
|
||||
{{- $u := .Destination -}}
|
||||
{{- if and (hasPrefix $u "/") (not (hasPrefix $u "//")) }}{{ $u = strings.TrimPrefix "/" $u | relURL }}{{ end -}}
|
||||
<img src="{{ $u | safeURL }}" alt="{{ .PlainText }}"{{ with .Title }} title="{{ . }}"{{ end }} loading="lazy" decoding="async">
|
||||
{{- /* kein Zeilenumbruch */ -}}
|
||||
@@ -0,0 +1,6 @@
|
||||
{{- /* Root-relative Ziele („/docs/…") auf die baseURL beziehen: die Seite läuft unter
|
||||
dossier.openbureau.ch und unter expiredtanin.github.io/DOSSIER/. */ -}}
|
||||
{{- $u := .Destination -}}
|
||||
{{- if and (hasPrefix $u "/") (not (hasPrefix $u "//")) }}{{ $u = strings.TrimPrefix "/" $u | relURL }}{{ end -}}
|
||||
<a href="{{ $u | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}>{{ .Text }}</a>
|
||||
{{- /* kein Zeilenumbruch */ -}}
|
||||
@@ -1,11 +0,0 @@
|
||||
{{- /* Letzte Commits aus der Gitea-API, beim Bauen geholt. Ohne Netz: leere
|
||||
Liste, die Startseite zeigt dann nur den Link aufs Repo. */ -}}
|
||||
{{- $commits := slice -}}
|
||||
{{- with try (resources.GetRemote site.Params.commitsApi) -}}
|
||||
{{- with .Err -}}
|
||||
{{- warnf "Commit-Log nicht geladen: %s" . -}}
|
||||
{{- else -}}
|
||||
{{- with .Value -}}{{- $commits = .Content | transform.Unmarshal -}}{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- return $commits -}}
|
||||
@@ -0,0 +1,11 @@
|
||||
<footer class="foot">
|
||||
<span class="mark">dossier<span>.</span></span>
|
||||
<a href="{{ site.Params.repo }}/blob/master/LICENSE">Lizenz AGPL-3.0</a>
|
||||
<a href="{{ site.Params.repo }}">Quellcode auf GitHub</a>
|
||||
<a href="{{ "docs/" | relURL }}">Dokumentation</a>
|
||||
<a href="{{ "stand/" | relURL }}">Stand</a>
|
||||
<a href="{{ site.Params.bureau }}">Impressum und Kontakt: openbureau</a>
|
||||
{{- if not .IsHome }}{{ with .File }}
|
||||
<a href="{{ site.Params.repo }}/blob/master/website/content/{{ .Path }}">Diese Seite im Repo</a>
|
||||
{{- end }}{{ end }}
|
||||
</footer>
|
||||
@@ -0,0 +1,20 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ if .IsHome }}Dossier · Open-Source-CAAD{{ else }}{{ .Title }} · Dossier{{ end }}</title>
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ site.Params.description }}{{ end }}">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="theme-color" content="#f2f0e9" media="(prefers-color-scheme: light)">
|
||||
<meta name="theme-color" content="#15181c" media="(prefers-color-scheme: dark)">
|
||||
<link rel="icon" href="{{ "favicon.svg" | relURL }}" type="image/svg+xml">
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:title" content="{{ if .IsHome }}Dossier · Open-Source-CAAD{{ else }}{{ .Title }} · Dossier{{ end }}">
|
||||
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ site.Params.description }}{{ end }}">
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
<meta property="og:image" content="{{ "hero/hero-ending.jpg" | absURL }}">
|
||||
<link rel="preload" href="{{ "fonts/schibsted-grotesk-800.woff2" | relURL }}" as="font" type="font/woff2" crossorigin>
|
||||
<link rel="preload" href="{{ "fonts/ibm-plex-sans-400.woff2" | relURL }}" as="font" type="font/woff2" crossorigin>
|
||||
{{- $theme := resources.Get "js/theme.js" | js.Build (dict "minify" true) | fingerprint }}
|
||||
<script src="{{ $theme.RelPermalink }}" integrity="{{ $theme.Data.Integrity }}"></script>
|
||||
{{- $css := resources.Get "css/site.css" | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}">
|
||||
@@ -0,0 +1,12 @@
|
||||
<a class="skip" href="#main">Zum Inhalt</a>
|
||||
<header class="top">
|
||||
<a class="mark" href="{{ "" | relURL }}" aria-label="Dossier, Startseite">dossier<span>.</span></a>
|
||||
<nav aria-label="Hauptnavigation">
|
||||
<a href="{{ "docs/" | relURL }}"{{ if hasPrefix .RelPermalink ("docs/" | relURL) }} aria-current="page"{{ end }}>doku</a>
|
||||
<a href="{{ "stand/" | relURL }}"{{ if hasPrefix .RelPermalink ("stand/" | relURL) }} aria-current="page"{{ end }}>stand</a>
|
||||
<a href="{{ site.Params.repo }}">quellcode</a>
|
||||
<button class="theme-toggle" type="button" aria-label="Hell oder dunkel">
|
||||
<svg viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="6.25" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M8 1.75a6.25 6.25 0 0 1 0 12.5z" fill="currentColor"/></svg>
|
||||
</button>
|
||||
</nav>
|
||||
</header>
|
||||
@@ -1 +1,3 @@
|
||||
<li><a href="{{ .Get "link" }}">{{ .Get "title" }}</a>{{ with .Get "subtitle" }} <span>{{ . }}</span>{{ end }}</li>
|
||||
{{- $u := .Get "link" -}}
|
||||
{{- if hasPrefix $u "/" }}{{ $u = strings.TrimPrefix "/" $u | relURL }}{{ end -}}
|
||||
<li><a href="{{ $u }}">{{ .Get "title" }}</a>{{ with .Get "subtitle" }} <span>{{ . }}</span>{{ end }}</li>
|
||||
@@ -1,9 +0,0 @@
|
||||
{{- $commits := partialCached "commits.html" .Page -}}
|
||||
{{- with $commits }}
|
||||
<ol class="log">
|
||||
{{- range . }}
|
||||
<li><time datetime="{{ .commit.author.date }}">{{ time.Format "2006-01-02" .commit.author.date }}</time> <a href="{{ .html_url }}"><code>{{ substr .sha 0 7 }}</code></a> <span>{{ index (split .commit.message "\n") 0 }}</span></li>
|
||||
{{- end }}
|
||||
</ol>
|
||||
{{- end }}
|
||||
<p><a href="{{ site.Params.repo }}/commits/branch/master">Alle Commits</a></p>
|
||||
@@ -1,33 +1,14 @@
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ if .IsHome }}DOSSIER{{ else }}{{ .Title }} · DOSSIER{{ end }}</title>
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ site.Params.description }}{{ end }}">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
||||
{{ $css := resources.Get "css/site.css" | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}">
|
||||
{{ partial "head.html" . }}
|
||||
{{- $js := resources.Get "js/site.js" | js.Build (dict "minify" true) | fingerprint }}
|
||||
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<header class="top">
|
||||
<a class="mark" href="/">dossier<span>.</span></a>
|
||||
<nav>
|
||||
<a href="/docs/"{{ if hasPrefix .RelPermalink "/docs/" }} aria-current="page"{{ end }}>doku</a>
|
||||
<a href="{{ site.Params.repo }}">quellcode</a>
|
||||
<a href="{{ site.Params.repo }}/issues">issues</a>
|
||||
<a href="{{ site.Params.forum }}">forum</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<body class="docs-page">
|
||||
<div class="plangrid" aria-hidden="true"></div>
|
||||
{{ partial "header.html" . }}
|
||||
{{ block "main" . }}{{ end }}
|
||||
|
||||
<footer class="foot">
|
||||
<span>© 2026 Karim Gabriele Varano</span>
|
||||
<span>AGPL-3.0-or-later</span>
|
||||
<span>Teil von <a href="{{ site.Params.bureau }}">openbureau</a></span>
|
||||
{{ with .File }}<a href="{{ site.Params.repo }}/src/branch/master/website/content/{{ .Path }}">Diese Seite im Repo</a>{{ end }}
|
||||
</footer>
|
||||
{{ partial "footer.html" . }}
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,21 +1,217 @@
|
||||
{{ define "main" }}
|
||||
{{ $commits := partialCached "commits.html" . }}
|
||||
<main class="home">
|
||||
{{/* Plankopf statt Hero: nur Fakten. */}}
|
||||
<dl class="titleblock">
|
||||
<div class="tb-wide"><dt>Projekt</dt><dd class="tb-name">DOSSIER</dd></div>
|
||||
<div class="tb-wide"><dt>Inhalt</dt><dd>Open-Source-CAD für Architektur</dd></div>
|
||||
<div><dt>Version</dt><dd>{{ site.Params.version }}</dd></div>
|
||||
<div><dt>Lizenz</dt><dd>AGPL-3.0</dd></div>
|
||||
<div><dt>Plattform</dt><dd>macOS, Linux, Browser</dd></div>
|
||||
<div><dt>Letzter Commit</dt><dd>
|
||||
{{- with index $commits 0 }}<a href="{{ .html_url }}">{{ time.Format "02.01.2006" .commit.author.date }}</a>
|
||||
{{- else }}{{ now.Format "02.01.2006" }}{{ end -}}
|
||||
</dd></div>
|
||||
</dl>
|
||||
<!doctype html>
|
||||
{{- /* Startseite: eigenes Dokument (nicht über baseof), Kopf/Fuss/Tokens wie die Doku.
|
||||
Texte wörtlich aus website/_design/DESIGN-PAKET.md. Hero-Video aus echten Dossier-Plänen,
|
||||
Erzeugung s. TODO.md [138]. */ -}}
|
||||
<html lang="de">
|
||||
<head>
|
||||
{{ partial "head.html" . }}
|
||||
{{- $home := resources.Get "css/home.css" | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $home.RelPermalink }}" integrity="{{ $home.Data.Integrity }}">
|
||||
{{- $js := resources.Get "js/home.js" | js.Build (dict "minify" true) | fingerprint }}
|
||||
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}" defer></script>
|
||||
</head>
|
||||
<body class="home-page">
|
||||
<div class="plangrid" aria-hidden="true"></div>
|
||||
{{ partial "header.html" . }}
|
||||
|
||||
<div class="prose">
|
||||
{{ .Content }}
|
||||
<main id="main" tabindex="-1">
|
||||
|
||||
<section class="hero" aria-label="Dossier">
|
||||
<div class="stage">
|
||||
<div class="poster" aria-hidden="true"></div>
|
||||
<video class="hero-video" muted playsinline preload="none" disablepictureinpicture aria-hidden="true" tabindex="-1"></video>
|
||||
<div class="scrim" aria-hidden="true"></div>
|
||||
<svg class="ring" viewBox="0 0 48 48" aria-hidden="true"><circle cx="24" cy="24" r="20" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="126"/></svg>
|
||||
<div class="cue" aria-hidden="true"><svg viewBox="0 0 16 24"><path d="M8 2v18M3 15l5 5 5-5" fill="none" stroke="currentColor" stroke-width="1.5"/></svg></div>
|
||||
|
||||
<div class="band b1" data-a="0" data-b="0.16" data-ramp="0.045">
|
||||
<p class="say" data-split="chars">Zeichne eine Wand.</p>
|
||||
</div>
|
||||
<div class="band b2" data-a="0.18" data-b="0.36">
|
||||
<p class="say" data-split="words">Dossier weiss, dass es eine Wand ist. Mit Schichten, Fenstern, Türen.</p>
|
||||
</div>
|
||||
<div class="band b3" data-a="0.38" data-b="0.56" data-ramp="0.035">
|
||||
<p class="say" data-split="lines"><span>Der Grundriss rechnet sich selbst.</span> <span>Schraffur, Masse, Flächen.</span></p>
|
||||
</div>
|
||||
<div class="band b4" data-a="0.58" data-b="0.78" data-ramp="0.035">
|
||||
<p class="say" data-split="halves"><span>Schnitt und Ansicht</span> <span>kommen aus demselben Modell.</span></p>
|
||||
</div>
|
||||
<div class="band b5" data-a="0.80" data-b="1" data-ramp="0.06">
|
||||
<h1 class="title" data-split="rise">Open-Source-CAAD</h1>
|
||||
<p class="kicker">Computer-Aided Architectural Design</p>
|
||||
<p class="sub only-static">Dossier ist ein freies CAD für Architektur. Du baust ein Gebäude aus Bauteilen, Grundriss, Schnitt und Ansicht werden daraus berechnet.</p>
|
||||
<div class="cta">
|
||||
<a class="btn" href="{{ site.Params.releases }}">Dossier herunterladen</a>
|
||||
<a class="link only-scrub" href="{{ "docs/anleitung/" | relURL }}">Anleitung lesen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<figure class="static-sheet">
|
||||
<img src="{{ "hero/hero-sheet.webp" | relURL }}" width="1110" height="596" loading="lazy" decoding="async"
|
||||
alt="Blatt aus Dossier: Grundriss Erdgeschoss und Ansicht Süd des Musterhauses, 1:100">
|
||||
</figure>
|
||||
</section>
|
||||
|
||||
<div class="cutmark" data-letter="A" aria-hidden="true"></div>
|
||||
|
||||
<section class="sec steps" aria-labelledby="h-steps">
|
||||
<div class="wrap">
|
||||
<h2 id="h-steps" class="sec-title"><span class="snap" aria-hidden="true"></span>So arbeitet Dossier</h2>
|
||||
<div class="dimline" aria-hidden="true"><i></i><span>17.39</span><i></i></div>
|
||||
<ol class="step-list reveal">
|
||||
<li class="step">
|
||||
<figure><img src="{{ "img/app-grundriss.webp" | relURL }}" width="1600" height="1000" loading="lazy" decoding="async" alt="Dossier mit dem Grundriss Erdgeschoss, Werkzeuge links, Objekt-Info rechts"></figure>
|
||||
<p class="num">01</p>
|
||||
<h3>Zeichnen.</h3>
|
||||
<p>Linien, Wände, Öffnungen, mit Fang und Befehlszeile.</p>
|
||||
</li>
|
||||
<li class="step">
|
||||
<figure><img src="{{ "img/app-schnitt.webp" | relURL }}" width="1600" height="1000" loading="lazy" decoding="async" alt="Dossier mit einem Schnitt durch das Musterhaus, Decken und Dach geschnitten"></figure>
|
||||
<p class="num">02</p>
|
||||
<h3>Modellieren.</h3>
|
||||
<p>Wandtypen mit Schichten, Decken, Dächer, Treppen, Gelände.</p>
|
||||
</li>
|
||||
<li class="step">
|
||||
<figure><img src="{{ "img/app-layout-blatt.webp" | relURL }}" width="1600" height="1000" loading="lazy" decoding="async" alt="Dossier mit einem Planblatt: Ansichtsfenster, Plankopf und Massstab"></figure>
|
||||
<p class="num">03</p>
|
||||
<h3>Publizieren.</h3>
|
||||
<p>Pläne auf Blätter legen, PDF mit Ebenen, DXF, IFC.</p>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="cutmark" data-letter="B" aria-hidden="true"></div>
|
||||
|
||||
<section class="sec features" aria-labelledby="h-features">
|
||||
<div class="wrap feat-grid">
|
||||
<div>
|
||||
<h2 id="h-features" class="sec-title"><span class="snap" aria-hidden="true"></span>Was alles drin ist</h2>
|
||||
<ul class="feat-list reveal">
|
||||
<li><button type="button" data-shot="0" aria-pressed="true">Grundriss, Schnitt, Ansicht, Deckenspiegel</button></li>
|
||||
<li><button type="button" data-shot="1" aria-pressed="false">Bemassung, auch automatisch</button></li>
|
||||
<li><button type="button" data-shot="2" aria-pressed="false">Fenster- und Türliste</button></li>
|
||||
<li><button type="button" data-shot="3" aria-pressed="false">Baurecht mit Grenzabständen und Gebäudeprofil</button></li>
|
||||
<li><button type="button" data-shot="4" aria-pressed="false">Gelände aus Höhenlinien, Swisstopo</button></li>
|
||||
<li><button type="button" data-shot="5" aria-pressed="false">Sonne und Schatten</button></li>
|
||||
<li><button type="button" data-shot="6" aria-pressed="false">DXF, DWG, IFC, STEP, PDF</button></li>
|
||||
<li><button type="button" data-shot="7" aria-pressed="false">Skizzenstil und Präsentationsplan</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="shots" aria-live="polite">
|
||||
<img class="on plan-img" src="{{ "img/cli-deckenspiegel-eg.webp" | relURL }}" width="1400" height="908" loading="lazy" decoding="async" alt="Deckenspiegel Erdgeschoss aus Dossier, 1:100">
|
||||
<img class="plan-img" src="{{ "img/cli-grundriss-eg.webp" | relURL }}" width="1500" height="1000" loading="lazy" decoding="async" alt="Grundriss Erdgeschoss mit Bemassung und Raumstempeln">
|
||||
<img class="plan-img" src="{{ "img/fenster.webp" | relURL }}" width="1200" height="673" loading="lazy" decoding="async" alt="Fenster und Türen im Grundriss mit ihren Massen, aus denen die Liste entsteht">
|
||||
<img src="{{ "img/app-situation.webp" | relURL }}" width="1600" height="1000" loading="lazy" decoding="async" alt="Situation in Dossier mit Parzelle, Grenzabständen und Baulinie">
|
||||
<img class="plan-img" src="{{ "img/gelaende.webp" | relURL }}" width="1200" height="638" loading="lazy" decoding="async" alt="Schnitt durch das Musterhaus mit Gelände aus Höhenlinien">
|
||||
<img class="plan-img" src="{{ "img/lage.webp" | relURL }}" width="1200" height="864" loading="lazy" decoding="async" alt="Lageplan mit Schatten am 21. Juni, Höhenlinien und Grenzabständen">
|
||||
<img class="plan-img" src="{{ "img/cli-schnitt-aa.webp" | relURL }}" width="1600" height="851" loading="lazy" decoding="async" alt="Schnitt A-A als Vektorplan, wie er als PDF oder DXF hinausgeht">
|
||||
<img class="plan-img" src="{{ "img/cli-ansicht-skizze.webp" | relURL }}" width="1600" height="768" loading="lazy" decoding="async" alt="Ansicht Süd im Skizzenstil">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="cutmark" data-letter="C" aria-hidden="true"></div>
|
||||
|
||||
<section class="sec swiss" aria-labelledby="h-swiss">
|
||||
<div class="wrap">
|
||||
<h2 id="h-swiss" class="sec-title small"><span class="snap" aria-hidden="true"></span>Gemacht für die Schweizer Praxis</h2>
|
||||
<p class="statement reveal">Schraffuren und Linientypen nach SIA-Konventionen, Koordinaten in LV95, Höhen ab ±0.00, Kataster und Höhenmodell von Swisstopo.</p>
|
||||
<p class="kotes" aria-hidden="true"><span>LV95</span><span>±0.00</span><span>1:100</span></p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="cutmark" data-letter="D" aria-hidden="true"></div>
|
||||
|
||||
<section class="sec cut" aria-labelledby="h-cut">
|
||||
<div class="wrap">
|
||||
<div class="cut-panel">
|
||||
<div class="cut-head">
|
||||
<h2 id="h-cut" class="sec-title"><span class="snap" aria-hidden="true"></span>Schnitt setzen</h2>
|
||||
<p class="lede">Zieh die Linie. Der Schnitt folgt.</p>
|
||||
</div>
|
||||
<div class="cut-body">
|
||||
<figure class="cut-plan">
|
||||
<img src="{{ "img/schnitt/grundriss-eg.webp" | relURL }}" width="1200" height="981" loading="lazy" decoding="async" alt="Grundriss Erdgeschoss des Musterhauses mit einer verschiebbaren Schnittlinie">
|
||||
<div class="cut-line" aria-hidden="true"><b>A</b><b>A</b></div>
|
||||
</figure>
|
||||
<figure class="cut-view">
|
||||
{{- range $i, $_ := seq 0 11 }}
|
||||
<img src="{{ printf "img/schnitt/schnitt-%02d.webp" $i | relURL }}" width="1200" height="799" loading="lazy" decoding="async" alt="Schnitt durch das Musterhaus an Stelle {{ add $i 1 }} von 12">
|
||||
{{- end }}
|
||||
</figure>
|
||||
</div>
|
||||
<div class="cut-ctrl">
|
||||
<input type="range" min="0" max="1000" value="500" step="1" aria-label="Schnittlinie" aria-valuetext="">
|
||||
<output class="kote" aria-hidden="true">A–A</output>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="cutmark" data-letter="E" aria-hidden="true"></div>
|
||||
|
||||
<section class="sec free" aria-labelledby="h-free">
|
||||
<div class="wrap split">
|
||||
<h2 id="h-free" class="sec-title big"><span class="snap" aria-hidden="true"></span>Frei und offen</h2>
|
||||
<p class="reveal">Dossier ist freie Software unter AGPL-3.0. Kein Konto, keine Cloud, kein Abo. Deine Projekte sind Dateien auf deinem Rechner, lesbar und versionierbar.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="cutmark" data-letter="F" aria-hidden="true"></div>
|
||||
|
||||
<section class="sec state" aria-labelledby="h-state">
|
||||
<div class="wrap narrow">
|
||||
<h2 id="h-state" class="sec-title"><span class="snap" aria-hidden="true"></span>Ehrlicher Stand</h2>
|
||||
<p class="reveal">Dossier ist jung. Vieles ist fertig, einiges erst halb. Hier steht genau, was.</p>
|
||||
<p><a class="btn ghost" href="{{ "stand/" | relURL }}">Zum Stand</a></p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="cutmark" data-letter="G" aria-hidden="true"></div>
|
||||
|
||||
<section class="sec faq" aria-labelledby="h-faq">
|
||||
<div class="wrap split">
|
||||
<h2 id="h-faq" class="sec-title big"><span class="snap" aria-hidden="true"></span>Fragen</h2>
|
||||
<div class="faq-list">
|
||||
<details>
|
||||
<summary>Läuft Dossier auf meinem Rechner?</summary>
|
||||
<p>macOS ist die Hauptplattform, mit Anzeige über Metal. Linux läuft über Electron. Windows ist bisher nicht geprüft. Fertige Installer gibt es noch nicht; bis dahin wird Dossier aus dem Quellcode gebaut, siehe <a href="{{ "download/" | relURL }}">Download und Installation</a>.</p>
|
||||
</details>
|
||||
<details>
|
||||
<summary>Kann ich DWG und DXF öffnen?</summary>
|
||||
<p>Ja, Import und Export. DXF ab R12 und DWG von R13 bis 2018 lassen sich öffnen, Grundriss, Schnitt und Ansicht gehen als DXF oder DWG hinaus, auf Wunsch mit Layouts. Wände und Öffnungen werden aus DXF und DWG nicht erkannt: Der Import bleibt Unterlage oder 2D-Plan.</p>
|
||||
</details>
|
||||
<details>
|
||||
<summary>Kann ich mit anderen Programmen IFC austauschen?</summary>
|
||||
<p>Ja, IFC4 und IFC2x3, mit Schichten, Öffnungen, Räumen und Georeferenz. Die Dateien werden mit IfcOpenShell gegen Schema und Regeln geprüft.</p>
|
||||
</details>
|
||||
<details>
|
||||
<summary>Kostet das etwas?</summary>
|
||||
<p>Nein. Freie Software, auch für Büros.</p>
|
||||
</details>
|
||||
<details>
|
||||
<summary>Ist es fertig?</summary>
|
||||
<p>Nein, aber brauchbar für Entwurf und Eingabe. Was fehlt, steht im <a href="{{ "stand/" | relURL }}">Stand</a>.</p>
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="cutmark" data-letter="H" aria-hidden="true"></div>
|
||||
|
||||
<section class="sec end" aria-labelledby="h-end">
|
||||
<div class="wrap">
|
||||
<svg class="wall" viewBox="0 0 400 24" aria-hidden="true" preserveAspectRatio="none"><path d="M2 6H398M2 18H398" fill="none" stroke="currentColor" stroke-width="2" pathLength="1"/></svg>
|
||||
<h2 id="h-end" class="end-title">Fang mit einer Wand an.</h2>
|
||||
<div class="cta">
|
||||
<a class="btn" href="{{ site.Params.releases }}">Dossier herunterladen</a>
|
||||
<a class="link" href="{{ "docs/anleitung/" | relURL }}">Anleitung lesen</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
{{ end }}
|
||||
{{ partial "footer.html" . }}
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
{{ define "main" }}
|
||||
<div class="docs">
|
||||
{{ partial "docnav.html" . }}
|
||||
<main class="prose">
|
||||
<main class="prose" id="main" tabindex="-1">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
</main>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{ define "main" }}
|
||||
<div class="docs">
|
||||
{{ partial "docnav.html" . }}
|
||||
<main class="prose">
|
||||
<main class="prose" id="main" tabindex="-1">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
</main>
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
Copyright © 2017 IBM Corp. with Reserved Font Name "Plex"
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
|
||||
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
@@ -0,0 +1,93 @@
|
||||
Copyright 2023 The Schibsted-Grotesk Project Authors (https://github.com/schibsted/schibsted-grotesk)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
https://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
|
After Width: | Height: | Size: 177 KiB |
|
After Width: | Height: | Size: 151 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 94 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 21 KiB |
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"image": "mcr.microsoft.com/devcontainers/go:1",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/hugo:1": {
|
||||
"extended": true,
|
||||
"version": "0.161.1"
|
||||
},
|
||||
"ghcr.io/devcontainers/features/node:1": {}
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": ["mhutchie.git-graph", "esbenp.prettier-vscode", "tamasfe.even-better-toml", "budparr.language-hugo-vscode"]
|
||||
}
|
||||
},
|
||||
"postCreateCommand": "npm install",
|
||||
"forwardPorts": [1313]
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
# Mark generated files so they are collapsed by default in GitHub diffs
|
||||
assets/css/compiled/main.css linguist-generated=true
|
||||
docs/hugo_stats.json linguist-generated=true
|
||||
@@ -1,9 +0,0 @@
|
||||
node_modules/
|
||||
public/
|
||||
resources/
|
||||
|
||||
.hugo_build.lock
|
||||
|
||||
# Playwright
|
||||
playwright-report/
|
||||
test-results/
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
"prettier-plugin-go-template"
|
||||
],
|
||||
"goTemplateBracketSpacing": true,
|
||||
"htmlWhitespaceSensitivity": "css",
|
||||
"printWidth": 200,
|
||||
"singleQuote": false,
|
||||
"tabWidth": 2,
|
||||
"trailingComma": "es5",
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.html"
|
||||
],
|
||||
"options": {
|
||||
"parser": "go-template"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"editor.tabSize": 2,
|
||||
"markdown.extension.toc.levels": "2..6"
|
||||
}
|
||||
@@ -1,193 +0,0 @@
|
||||
# AGENTS.md
|
||||
|
||||
This file provides guidance to AI coding agents when working with code in this repository.
|
||||
|
||||
## Project Overview
|
||||
|
||||
Hextra is a modern, responsive Hugo theme designed for creating documentation websites, technical blogs, and static sites. Built with Tailwind CSS, it offers features like full-text search, dark mode, multi-language support, and extensive customization options.
|
||||
|
||||
## Development Commands
|
||||
|
||||
### Initial Setup
|
||||
|
||||
When working in a new worktree or fresh clone without `node_modules`, run `npm install` first to install dependencies:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
### Development Server
|
||||
|
||||
```bash
|
||||
# Start development server with theme reloading (recommended for theme development)
|
||||
npm run dev:theme
|
||||
```
|
||||
|
||||
### Building
|
||||
|
||||
```bash
|
||||
# Build the example site
|
||||
npm run build
|
||||
|
||||
# Build CSS assets only
|
||||
npm run build:css
|
||||
```
|
||||
|
||||
## Architecture Overview
|
||||
|
||||
### Hugo Theme Structure
|
||||
|
||||
- **Base Layout**: `layouts/baseof.html` wraps all pages
|
||||
- **Specialized Layouts**: `layouts/docs/`, `layouts/blog/`, `layouts/hextra-home.html`
|
||||
- **Partials**: Reusable components in `layouts/_partials/`
|
||||
- Core UI: `navbar.html`, `sidebar.html`, `footer.html`, `breadcrumb.html`, `toc.html`
|
||||
- Utilities: `layouts/_partials/utils/` for helper functions
|
||||
- Custom overrides: `layouts/_partials/custom/` for user customizations
|
||||
- **Shortcodes**: Custom Markdown extensions in `layouts/_shortcodes/`
|
||||
- **Render Hooks**: Custom Markdown rendering in `layouts/_markup/` for codeblocks, headings, images, and links
|
||||
|
||||
### Asset Organization
|
||||
|
||||
```
|
||||
assets/
|
||||
├── css/
|
||||
│ ├── styles.css # Main stylesheet (Tailwind entry point)
|
||||
│ ├── compiled/main.css # Built CSS output (generated)
|
||||
│ ├── components/ # Component-specific styles
|
||||
│ ├── chroma/ # Syntax highlighting themes
|
||||
│ └── custom.css # User customization entry point
|
||||
└── js/
|
||||
├── core/ # Core JS components
|
||||
└── flexsearch.js # Search functionality
|
||||
```
|
||||
|
||||
### Key Components
|
||||
|
||||
- **Search**: FlexSearch-powered full-text search (`assets/js/flexsearch.js`)
|
||||
- **Navigation**: Responsive navbar and auto-generated sidebar
|
||||
- **Theme Toggle**: Dark/light mode switching
|
||||
- **Internationalization**: 20+ language support in `i18n/`
|
||||
|
||||
### Content Features
|
||||
|
||||
- **Shortcodes**: `callout`, `card`, `cards`, `tabs`, `tab`, `details`, `steps`, `filetree`, `jupyter`, `badge`, `icon`, `pdf`, `include`, `asciinema`, `term`
|
||||
- **Code Features**: Syntax highlighting (Chroma), copy buttons, line numbers via render hooks
|
||||
- **SEO**: Open Graph, Twitter Cards, structured data
|
||||
- **Performance**: Minimal JavaScript, optimized CSS with Tailwind
|
||||
|
||||
## Development Workflow
|
||||
|
||||
### Example Site Development
|
||||
|
||||
The `docs/` directory serves as both documentation and testing ground:
|
||||
|
||||
- Test new features here before releasing
|
||||
- Configuration examples in `docs/hugo.yaml` showing multi-language setup
|
||||
- Content examples demonstrate all theme capabilities
|
||||
- Run from docs with: `hugo server --themesDir=../..`
|
||||
|
||||
### CSS Development Workflow
|
||||
|
||||
- Source: `assets/css/styles.css` (main stylesheet)
|
||||
- Build process: Tailwind CSS → PostCSS → `assets/css/compiled/main.css`
|
||||
- Component styles organized in `assets/css/components/`
|
||||
- Chroma syntax highlighting themes in `assets/css/chroma/`
|
||||
- CSS compilation requires Node.js dependencies (PostCSS, Tailwind CSS v4+)
|
||||
|
||||
#### Rebuilding CSS after template changes
|
||||
|
||||
Tailwind CSS relies on `docs/hugo_stats.json` to know which HTML tags, classes, and IDs are actually used in the built site, so it can tree-shake unused styles. When you modify layouts, partials, or shortcodes you must **regenerate `hugo_stats.json` first**, then rebuild the CSS:
|
||||
|
||||
1. **Generate `docs/hugo_stats.json`** — Run Hugo with the `dev.toml` config (which sets `build.buildStats.enable = true`):
|
||||
|
||||
```bash
|
||||
# Using npm (starts a dev server that writes hugo_stats.json on every rebuild):
|
||||
npm run dev:theme
|
||||
|
||||
# Or a one-shot build using the raw Hugo command:
|
||||
hugo --config=hugo.yaml,../dev.toml --themesDir=../.. --source=docs
|
||||
```
|
||||
|
||||
2. **Build the CSS** — With an up-to-date `hugo_stats.json` in place, compile the stylesheet:
|
||||
|
||||
```bash
|
||||
npm run build:css
|
||||
```
|
||||
|
||||
> **Why two steps?** `dev.toml` mounts `docs/hugo_stats.json` into the Hugo asset pipeline (`assets/notwatching/hugo_stats.json`) and configures a cache-buster so that changes to the stats file trigger a CSS recompile during `dev:theme`. When running outside the dev server you need to perform these steps manually in order.
|
||||
|
||||
### Customization Points
|
||||
|
||||
- Custom partials: `layouts/_partials/custom/`
|
||||
- Custom CSS: `assets/css/custom.css`
|
||||
- Site-specific overrides: Copy any layout to your site's `layouts/` directory
|
||||
|
||||
## Configuration & Requirements
|
||||
|
||||
### Theme Requirements
|
||||
|
||||
- Hugo minimum version: 0.146.0 (extended version required - see `theme.toml`)
|
||||
- Go 1.20+ (as specified in `go.mod`)
|
||||
- Node.js for CSS compilation (PostCSS, Tailwind CSS v4+)
|
||||
|
||||
### Key Configuration Files
|
||||
|
||||
- `docs/hugo.yaml` - Example Hugo configuration with multi-language setup
|
||||
- `postcss.config.mjs` - PostCSS configuration for CSS processing
|
||||
- `package.json` - Node.js dependencies and build scripts
|
||||
|
||||
### Development Environment
|
||||
|
||||
- Default Hugo development server: Port 1313
|
||||
- Development server runs with `--disableFastRender -D` for better development experience
|
||||
- Theme development uses `--logLevel=debug` for detailed logging
|
||||
|
||||
### Multi-language Support
|
||||
|
||||
- Configure languages in `hugo.yaml` (supports 20+ languages including RTL)
|
||||
- Translation files in `i18n/` directory (e.g., `en.yaml`, `fa.yaml`, `ja.yaml`, `zh-cn.yaml`)
|
||||
- Example supports English, Persian (RTL), Japanese, and Simplified Chinese
|
||||
|
||||
## Theme Development Guidelines
|
||||
|
||||
### Hugo Theme Conventions
|
||||
|
||||
- Theme files in this repository override Hugo defaults
|
||||
- Follow Hugo's theme development guidelines for compatibility
|
||||
- Maintain backward compatibility with existing configurations
|
||||
|
||||
### JavaScript & Performance
|
||||
|
||||
- All JavaScript components are designed to have minimal footprint
|
||||
- Core JS components in `assets/js/core/`: `theme.js`, `nav-menu.js`, `code-copy.js`, `sidebar.js`, `tabs.js`, etc.
|
||||
- FlexSearch powers offline full-text search (`assets/js/flexsearch.js`)
|
||||
|
||||
### CSS Architecture
|
||||
|
||||
- Uses Tailwind CSS v4+ with PostCSS processing
|
||||
- Component-based CSS organization in `assets/css/components/`
|
||||
- Compiled output goes to `assets/css/compiled/main.css`
|
||||
- Prettier formatting for Go templates and code consistency
|
||||
|
||||
### Accessibility (WCAG Compliance)
|
||||
|
||||
All new features and UI changes must follow the [Web Content Accessibility Guidelines (WCAG) 2.2](https://www.w3.org/TR/WCAG22/) at the **AA** conformance level. Key requirements:
|
||||
|
||||
- **Semantic HTML**: Use appropriate elements (`<nav>`, `<main>`, `<aside>`, `<button>`, `<ul>`, etc.) instead of generic `<div>`/`<span>` where applicable.
|
||||
- **ARIA attributes**: Add `aria-label`, `aria-expanded`, `aria-controls`, `aria-current`, `role`, and other ARIA attributes to interactive components (menus, toggles, dropdowns, modals) so screen readers can interpret them.
|
||||
- **Keyboard navigation**: All interactive elements must be reachable and operable via keyboard (`Tab`, `Enter`, `Escape`, arrow keys). Manage focus appropriately when opening/closing menus, modals, and drawers.
|
||||
- **Focus indicators**: Never remove visible focus outlines. Use the existing `hextra-focus` utility or equivalent visible focus ring styles.
|
||||
- **Color contrast**: Text and interactive elements must meet WCAG AA contrast ratios (4.5:1 for normal text, 3:1 for large text). Verify in both light and dark modes.
|
||||
- **Images and icons**: Decorative SVGs/icons should have `aria-hidden="true"`. Meaningful images need descriptive `alt` text.
|
||||
- **Skip links and landmarks**: Preserve existing skip-navigation links and ARIA landmark roles (`role="navigation"`, `role="search"`, etc.).
|
||||
- **Live regions**: Use `aria-live` for dynamic content updates (e.g., search results, status messages) so assistive technology announces changes.
|
||||
- **Form controls**: Associate `<label>` elements with inputs. Provide accessible names for buttons that contain only icons.
|
||||
|
||||
When introducing a new component or modifying an existing one, verify it works with keyboard-only navigation and review the rendered HTML for proper semantics and ARIA usage.
|
||||
|
||||
### Testing & Quality Assurance
|
||||
|
||||
- Test all changes in `docs/` before releasing
|
||||
- Use `npm run dev:theme` for theme development with hot reloading
|
||||
- Format code with `npx prettier --write .` before committing
|
||||
- Verify multi-language functionality across supported languages
|
||||
@@ -1,193 +0,0 @@
|
||||
# AGENTS.md
|
||||
|
||||
This file provides guidance to AI coding agents when working with code in this repository.
|
||||
|
||||
## Project Overview
|
||||
|
||||
Hextra is a modern, responsive Hugo theme designed for creating documentation websites, technical blogs, and static sites. Built with Tailwind CSS, it offers features like full-text search, dark mode, multi-language support, and extensive customization options.
|
||||
|
||||
## Development Commands
|
||||
|
||||
### Initial Setup
|
||||
|
||||
When working in a new worktree or fresh clone without `node_modules`, run `npm install` first to install dependencies:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
### Development Server
|
||||
|
||||
```bash
|
||||
# Start development server with theme reloading (recommended for theme development)
|
||||
npm run dev:theme
|
||||
```
|
||||
|
||||
### Building
|
||||
|
||||
```bash
|
||||
# Build the example site
|
||||
npm run build
|
||||
|
||||
# Build CSS assets only
|
||||
npm run build:css
|
||||
```
|
||||
|
||||
## Architecture Overview
|
||||
|
||||
### Hugo Theme Structure
|
||||
|
||||
- **Base Layout**: `layouts/baseof.html` wraps all pages
|
||||
- **Specialized Layouts**: `layouts/docs/`, `layouts/blog/`, `layouts/hextra-home.html`
|
||||
- **Partials**: Reusable components in `layouts/_partials/`
|
||||
- Core UI: `navbar.html`, `sidebar.html`, `footer.html`, `breadcrumb.html`, `toc.html`
|
||||
- Utilities: `layouts/_partials/utils/` for helper functions
|
||||
- Custom overrides: `layouts/_partials/custom/` for user customizations
|
||||
- **Shortcodes**: Custom Markdown extensions in `layouts/_shortcodes/`
|
||||
- **Render Hooks**: Custom Markdown rendering in `layouts/_markup/` for codeblocks, headings, images, and links
|
||||
|
||||
### Asset Organization
|
||||
|
||||
```
|
||||
assets/
|
||||
├── css/
|
||||
│ ├── styles.css # Main stylesheet (Tailwind entry point)
|
||||
│ ├── compiled/main.css # Built CSS output (generated)
|
||||
│ ├── components/ # Component-specific styles
|
||||
│ ├── chroma/ # Syntax highlighting themes
|
||||
│ └── custom.css # User customization entry point
|
||||
└── js/
|
||||
├── core/ # Core JS components
|
||||
└── flexsearch.js # Search functionality
|
||||
```
|
||||
|
||||
### Key Components
|
||||
|
||||
- **Search**: FlexSearch-powered full-text search (`assets/js/flexsearch.js`)
|
||||
- **Navigation**: Responsive navbar and auto-generated sidebar
|
||||
- **Theme Toggle**: Dark/light mode switching
|
||||
- **Internationalization**: 20+ language support in `i18n/`
|
||||
|
||||
### Content Features
|
||||
|
||||
- **Shortcodes**: `callout`, `card`, `cards`, `tabs`, `tab`, `details`, `steps`, `filetree`, `jupyter`, `badge`, `icon`, `pdf`, `include`, `asciinema`, `term`
|
||||
- **Code Features**: Syntax highlighting (Chroma), copy buttons, line numbers via render hooks
|
||||
- **SEO**: Open Graph, Twitter Cards, structured data
|
||||
- **Performance**: Minimal JavaScript, optimized CSS with Tailwind
|
||||
|
||||
## Development Workflow
|
||||
|
||||
### Example Site Development
|
||||
|
||||
The `docs/` directory serves as both documentation and testing ground:
|
||||
|
||||
- Test new features here before releasing
|
||||
- Configuration examples in `docs/hugo.yaml` showing multi-language setup
|
||||
- Content examples demonstrate all theme capabilities
|
||||
- Run from docs with: `hugo server --themesDir=../..`
|
||||
|
||||
### CSS Development Workflow
|
||||
|
||||
- Source: `assets/css/styles.css` (main stylesheet)
|
||||
- Build process: Tailwind CSS → PostCSS → `assets/css/compiled/main.css`
|
||||
- Component styles organized in `assets/css/components/`
|
||||
- Chroma syntax highlighting themes in `assets/css/chroma/`
|
||||
- CSS compilation requires Node.js dependencies (PostCSS, Tailwind CSS v4+)
|
||||
|
||||
#### Rebuilding CSS after template changes
|
||||
|
||||
Tailwind CSS relies on `docs/hugo_stats.json` to know which HTML tags, classes, and IDs are actually used in the built site, so it can tree-shake unused styles. When you modify layouts, partials, or shortcodes you must **regenerate `hugo_stats.json` first**, then rebuild the CSS:
|
||||
|
||||
1. **Generate `docs/hugo_stats.json`** — Run Hugo with the `dev.toml` config (which sets `build.buildStats.enable = true`):
|
||||
|
||||
```bash
|
||||
# Using npm (starts a dev server that writes hugo_stats.json on every rebuild):
|
||||
npm run dev:theme
|
||||
|
||||
# Or a one-shot build using the raw Hugo command:
|
||||
hugo --config=hugo.yaml,../dev.toml --themesDir=../.. --source=docs
|
||||
```
|
||||
|
||||
2. **Build the CSS** — With an up-to-date `hugo_stats.json` in place, compile the stylesheet:
|
||||
|
||||
```bash
|
||||
npm run build:css
|
||||
```
|
||||
|
||||
> **Why two steps?** `dev.toml` mounts `docs/hugo_stats.json` into the Hugo asset pipeline (`assets/notwatching/hugo_stats.json`) and configures a cache-buster so that changes to the stats file trigger a CSS recompile during `dev:theme`. When running outside the dev server you need to perform these steps manually in order.
|
||||
|
||||
### Customization Points
|
||||
|
||||
- Custom partials: `layouts/_partials/custom/`
|
||||
- Custom CSS: `assets/css/custom.css`
|
||||
- Site-specific overrides: Copy any layout to your site's `layouts/` directory
|
||||
|
||||
## Configuration & Requirements
|
||||
|
||||
### Theme Requirements
|
||||
|
||||
- Hugo minimum version: 0.146.0 (extended version required - see `theme.toml`)
|
||||
- Go 1.20+ (as specified in `go.mod`)
|
||||
- Node.js for CSS compilation (PostCSS, Tailwind CSS v4+)
|
||||
|
||||
### Key Configuration Files
|
||||
|
||||
- `docs/hugo.yaml` - Example Hugo configuration with multi-language setup
|
||||
- `postcss.config.mjs` - PostCSS configuration for CSS processing
|
||||
- `package.json` - Node.js dependencies and build scripts
|
||||
|
||||
### Development Environment
|
||||
|
||||
- Default Hugo development server: Port 1313
|
||||
- Development server runs with `--disableFastRender -D` for better development experience
|
||||
- Theme development uses `--logLevel=debug` for detailed logging
|
||||
|
||||
### Multi-language Support
|
||||
|
||||
- Configure languages in `hugo.yaml` (supports 20+ languages including RTL)
|
||||
- Translation files in `i18n/` directory (e.g., `en.yaml`, `fa.yaml`, `ja.yaml`, `zh-cn.yaml`)
|
||||
- Example supports English, Persian (RTL), Japanese, and Simplified Chinese
|
||||
|
||||
## Theme Development Guidelines
|
||||
|
||||
### Hugo Theme Conventions
|
||||
|
||||
- Theme files in this repository override Hugo defaults
|
||||
- Follow Hugo's theme development guidelines for compatibility
|
||||
- Maintain backward compatibility with existing configurations
|
||||
|
||||
### JavaScript & Performance
|
||||
|
||||
- All JavaScript components are designed to have minimal footprint
|
||||
- Core JS components in `assets/js/core/`: `theme.js`, `nav-menu.js`, `code-copy.js`, `sidebar.js`, `tabs.js`, etc.
|
||||
- FlexSearch powers offline full-text search (`assets/js/flexsearch.js`)
|
||||
|
||||
### CSS Architecture
|
||||
|
||||
- Uses Tailwind CSS v4+ with PostCSS processing
|
||||
- Component-based CSS organization in `assets/css/components/`
|
||||
- Compiled output goes to `assets/css/compiled/main.css`
|
||||
- Prettier formatting for Go templates and code consistency
|
||||
|
||||
### Accessibility (WCAG Compliance)
|
||||
|
||||
All new features and UI changes must follow the [Web Content Accessibility Guidelines (WCAG) 2.2](https://www.w3.org/TR/WCAG22/) at the **AA** conformance level. Key requirements:
|
||||
|
||||
- **Semantic HTML**: Use appropriate elements (`<nav>`, `<main>`, `<aside>`, `<button>`, `<ul>`, etc.) instead of generic `<div>`/`<span>` where applicable.
|
||||
- **ARIA attributes**: Add `aria-label`, `aria-expanded`, `aria-controls`, `aria-current`, `role`, and other ARIA attributes to interactive components (menus, toggles, dropdowns, modals) so screen readers can interpret them.
|
||||
- **Keyboard navigation**: All interactive elements must be reachable and operable via keyboard (`Tab`, `Enter`, `Escape`, arrow keys). Manage focus appropriately when opening/closing menus, modals, and drawers.
|
||||
- **Focus indicators**: Never remove visible focus outlines. Use the existing `hextra-focus` utility or equivalent visible focus ring styles.
|
||||
- **Color contrast**: Text and interactive elements must meet WCAG AA contrast ratios (4.5:1 for normal text, 3:1 for large text). Verify in both light and dark modes.
|
||||
- **Images and icons**: Decorative SVGs/icons should have `aria-hidden="true"`. Meaningful images need descriptive `alt` text.
|
||||
- **Skip links and landmarks**: Preserve existing skip-navigation links and ARIA landmark roles (`role="navigation"`, `role="search"`, etc.).
|
||||
- **Live regions**: Use `aria-live` for dynamic content updates (e.g., search results, status messages) so assistive technology announces changes.
|
||||
- **Form controls**: Associate `<label>` elements with inputs. Provide accessible names for buttons that contain only icons.
|
||||
|
||||
When introducing a new component or modifying an existing one, verify it works with keyboard-only navigation and review the rendered HTML for proper semantics and ARIA usage.
|
||||
|
||||
### Testing & Quality Assurance
|
||||
|
||||
- Test all changes in `docs/` before releasing
|
||||
- Use `npm run dev:theme` for theme development with hot reloading
|
||||
- Format code with `npx prettier --write .` before committing
|
||||
- Verify multi-language functionality across supported languages
|
||||
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 Xin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,49 +0,0 @@
|
||||
<div align="center">
|
||||
<h1 align="center">هگزترا</h1>
|
||||
<sup align="center"><a href="README.md">English</a> | <a href="README.zh-cn.md">简体中文</a> | <a href="README.fa.md">فارسی</a></sup>
|
||||
<p align="center">تم هیوگو مدرن، پاسخگو و دارای امکانات کامل برای ایجاد وبسایتهای استاتیک زیبا.</p>
|
||||
|
||||
نسخهی نمایشی → [imfing.github.io/hextra](https://imfing.github.io/hextra/fa)
|
||||
</div>
|
||||
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/5097752/263550533-c18343ca-3848-4230-b5c0-ee989d7916da.png">
|
||||
<img alt="Hextra" src="https://user-images.githubusercontent.com/5097752/263550528-663599f9-17a1-4686-b5c4-3da233b5034d.png">
|
||||
</picture>
|
||||
|
||||
<div align="right">
|
||||
<a href="https://github.com/imfing/hextra/actions/workflows/pages.yml"><img alt="GitHub Actions Status" src="https://github.com/imfing/hextra/actions/workflows/pages.yml/badge.svg"></a> <a href="https://app.netlify.com/sites/hugo-hextra/deploys"><img alt="Netlify Status" src="https://api.netlify.com/api/v1/badges/61d6e55a-2447-487e-b59f-c9537e5df175/deploy-status"></a>
|
||||
</div>
|
||||
|
||||
## ویژگیها
|
||||
|
||||
- **طراحی زیبا** - با الهام از Nextra، هگزترا از Tailwind CSS برای ارائه یک طراحی مدرن که سایت شما را برجسته میکند، استفاده میکند.
|
||||
- **طراحی واکنشگرا و حالت تیره** - در تمام دستگاهها، از تلفن همراه، تبلت تا دسکتاپ، عالی به نظر میرسد. حالت تیره نیز برای انطباق با شرایط مختلف روشنایی پشتیبانی میشود.
|
||||
- **سریع و سبک** - طراحی شده توسط Hugo، یک ایجادکننده سایت استاتیک سریع مثل رعد و برق که در یک فایل باینری قرار گرفته است، هگزترا ردپای خود را به حداقل میرساند. برای استفاده از آن به جاوااسکریپت یا Node.js نیازی ندارید.
|
||||
- **جستجوی متن کامل** - جستجوی متن کاملا آفلاین داخلی طراحی شده توسط FlexSearch، بدون نیاز به پیکربندی اضافی.
|
||||
- **امکانات کامل** - برای بهتر کردن محتوای شما مارکداون، برجستهکردن سینتکس، فرمولهای ریاضی LaTeX، نمودارها و عناصر Shortcodeها را شامل میشه. فهرست مطالب، بردکرامب، صفحهبندی، پیمایش نوار کناری و موارد دیگر همه به صورت خودکار تولید میشوند.
|
||||
- **چند زبانه و سئو آماده** - سایتهای چند زبانه با حالت چند زبانه Hugo راحت ساخته میشوند. پشتیبانی خارج از جعبه برای برچسبهای سئو، Open Graph و کارتهای توییتر گنجانده شده است.
|
||||
- **پشتیبانی از دسترسپذیری** - اجزای تعاملی از نشانهگذاری معنایی، رفتار سازگار با صفحهکلید و بررسیهای خودکار دسترسپذیری استفاده میکنند تا رابط کاربری در گردشکارهای رایج فناوریهای کمکی قابل استفاده بماند.
|
||||
|
||||
## شروع کنید
|
||||
|
||||
### شروع سریع از طریق Template
|
||||
|
||||
استفاده از [Hextra Starter Template](https://github.com/imfing/hextra-starter-template) سادهترین روش برای راهاندازی سریع یک وبسایت جدید با تم هگزترا است. با کلیک بر روی دکمه "Use this template" در بالای صفحه مخزن شروع کنید.
|
||||
|
||||
مخزن تم همچنین شامل یک [گردش کار گیتهاب Actions](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow) رای بهکاراندازی وبسایت شما در گیتهاب Pages است.
|
||||
|
||||
<img alt="Hextra Starter Template" src="https://user-images.githubusercontent.com/5097752/263551418-c403b9a9-a76c-47a6-8466-513d772ef0b7.jpg" width=600/>
|
||||
|
||||
### استفاده
|
||||
|
||||
برای اطلاعات بیشتر به بخش [مستندات](https://imfing.github.io/hextra/fa/docs) مراجعه کنید.
|
||||
|
||||
## مشارکت کردن
|
||||
|
||||
از مشارکت افراد جدید استقبال میکنیم.
|
||||
برای شروع، [راهنمای مشارکت](.github/CONTRIBUTING.md) را بررسی کنید.
|
||||
|
||||
## مجوز
|
||||
|
||||
[مجوز MIT](./LICENSE)
|
||||
@@ -1,49 +0,0 @@
|
||||
<div align="center">
|
||||
<h1 align="center">Hextra</h1>
|
||||
<sup align="center"><a href="README.md">English</a> | <a href="README.zh-cn.md">简体中文</a> | <a href="README.fa.md">فارسی</a></sup>
|
||||
<p align="center">Modern, responsive, batteries-included Hugo theme for creating beautiful static websites.</p>
|
||||
|
||||
Demo → [imfing.github.io/hextra](https://imfing.github.io/hextra/)
|
||||
</div>
|
||||
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/5097752/263550533-c18343ca-3848-4230-b5c0-ee989d7916da.png">
|
||||
<img alt="Hextra" src="https://user-images.githubusercontent.com/5097752/263550528-663599f9-17a1-4686-b5c4-3da233b5034d.png">
|
||||
</picture>
|
||||
|
||||
<div align="right">
|
||||
<a href="https://github.com/imfing/hextra/actions/workflows/pages.yml"><img alt="GitHub Actions Status" src="https://github.com/imfing/hextra/actions/workflows/pages.yml/badge.svg"></a> <a href="https://app.netlify.com/sites/hugo-hextra/deploys"><img alt="Netlify Status" src="https://api.netlify.com/api/v1/badges/61d6e55a-2447-487e-b59f-c9537e5df175/deploy-status"></a>
|
||||
</div>
|
||||
|
||||
## Features
|
||||
|
||||
- **Beautiful Design** - Inspired by Nextra, Hextra utilizes Tailwind CSS to offer a modern design that makes your site look outstanding.
|
||||
- **Responsive Layout and Dark Mode** - It looks great on all devices, from mobile to desktop. Dark mode is also supported to accommodate various lighting conditions.
|
||||
- **Fast and Lightweight** - Powered by Hugo, a lightning-fast static-site generator housed in a single binary file, Hextra keeps its footprint minimal. No JavaScript or Node.js are needed to use it.
|
||||
- **Full-text Search** - Built-in offline full-text search powered by FlexSearch, no extra configuration required.
|
||||
- **Battery-included** - Markdown, syntax highlighting, LaTeX math formulae, diagrams and Shortcodes elements to enhance your content. Table of contents, breadcrumbs, pagination, sidebar navigation and more are all automatically generated.
|
||||
- **Multi-language and SEO Ready** - Multi-language sites made easy with Hugo's multilingual mode. Out-of-the-box support is included for SEO tags, Open Graph, and Twitter Cards.
|
||||
- **Accessibility Support** - Interactive components use semantic markup, keyboard-friendly behavior, and automated accessibility checks to keep the UI usable across common assistive workflows.
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Use the template
|
||||
|
||||
Using the [Hextra Starter Template](https://github.com/imfing/hextra-starter-template) is the simplest method to bootstrap a new website with Hextra theme. Get started by clicking the "Use this template" button on the template repository page.
|
||||
|
||||
The template repository also includes a [GitHub Actions workflow](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow) for deploying your website to GitHub Pages.
|
||||
|
||||
<img alt="Hextra Starter Template" src="https://user-images.githubusercontent.com/5097752/263551418-c403b9a9-a76c-47a6-8466-513d772ef0b7.jpg" width=600/>
|
||||
|
||||
### Usage
|
||||
|
||||
Refer to the [documentation](https://imfing.github.io/hextra/docs) for more information.
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome.
|
||||
Check out the [contributing guide](.github/CONTRIBUTING.md) to get started.
|
||||
|
||||
## License
|
||||
|
||||
[MIT License](./LICENSE)
|
||||
@@ -1,46 +0,0 @@
|
||||
<div align="center">
|
||||
<h1 align="center">Hextra</h1>
|
||||
<sup align="center"><a href="README.md">English</a> | <a href="README.zh-cn.md">简体中文</a> | <a href="README.fa.md">فارسی</a></sup>
|
||||
<p align="center">用于创建美观的静态站点的现代化, 响应式, 功能强大的 Hugo 主题.</p>
|
||||
|
||||
演示 → [imfing.github.io/hextra](https://imfing.github.io/hextra/)
|
||||
</div>
|
||||
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/5097752/263550533-c18343ca-3848-4230-b5c0-ee989d7916da.png">
|
||||
<img alt="Hextra" src="https://user-images.githubusercontent.com/5097752/263550528-663599f9-17a1-4686-b5c4-3da233b5034d.png">
|
||||
</picture>
|
||||
|
||||
<div align="right">
|
||||
<a href="https://github.com/imfing/hextra/actions/workflows/pages.yml"><img alt="GitHub Actions Status" src="https://github.com/imfing/hextra/actions/workflows/pages.yml/badge.svg"></a> <a href="https://app.netlify.com/sites/hugo-hextra/deploys"><img alt="Netlify Status" src="https://api.netlify.com/api/v1/badges/61d6e55a-2447-487e-b59f-c9537e5df175/deploy-status"></a>
|
||||
</div>
|
||||
|
||||
## 特性
|
||||
|
||||
- **美观的设计** - 受 Nextra 的启发,Hextra 利用 Tailwind CSS 提供现代化的设计,使您的网站看起来美观有加.
|
||||
- **响应式布局和深色模式支持** - 在任何设备上看起来都足够美观, 无论是手机, 平板电脑或者电脑. 深色模式的支持使 Hextra 可以应对各种照明环境.
|
||||
- **快速且轻量** - 由 Hugo 强力支持, Hugo 是一个快如闪电的静态站点生成器, 这一切都只需一个可执行文件, Hextra 始终保持最小化, 无需 Javascript 或者 Node.js.
|
||||
- **全文搜索** - 集成了 Flexsearch 的全文搜索, 无需额外的配置.
|
||||
- **功能齐全** - Markdown, 代码高亮, LaTex 数学公式, diagrams 图表和 Shortcodes 都可以用于丰富你的内容. 目录, 面包屑导航, 分页, 侧边栏等均由 Hextra 自动生成。
|
||||
- **多语言和 SEO Ready** - Hugo 的多语言模式使得构建多语言网站更简单. 具有 SEO tags, Open Graph, 和 Twitter Cards 等诸多开箱即用的功能.
|
||||
- **无障碍支持** - 交互组件使用语义化标记、友好的键盘交互以及自动化无障碍检查,以便在常见辅助技术工作流中保持良好的可用性。
|
||||
|
||||
## 快速开始
|
||||
|
||||
### 使用模板
|
||||
|
||||
使用 [Hextra stater template](https://github.com/imfing/hextra-starter-template) 是使用 Hextra 主题的最简单方法. 点击仓库页面上的 `Use this template` 按钮开始使用.
|
||||
|
||||
此仓库中包含一个 [GitHub Actions workflow](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow) 来帮助你免费在 GitHub Pages 上自动构建和部署网站.
|
||||
|
||||
### 使用
|
||||
|
||||
转至[文档](https://imfing.github.io/hextra/zh-cn/docs)
|
||||
|
||||
## 贡献
|
||||
|
||||
该项目正在积极开发中. 欢迎贡献!
|
||||
|
||||
## 许可证
|
||||
|
||||
[MIT License](./LICENSE)
|
||||
@@ -1,89 +0,0 @@
|
||||
.dark .highlight {
|
||||
/* Background .bg { color: #c9d1d9; background-color: #0d1117; }
|
||||
/* PreWrapper .chroma { color: #c9d1d9; background-color: #0d1117; } */
|
||||
/* Other */ .chroma .x { }
|
||||
/* Error */ .chroma .err { color: #f85149 }
|
||||
/* CodeLine */ .chroma .cl { }
|
||||
/* LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit }
|
||||
/* LineTableTD .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } */
|
||||
/* LineTable .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } */
|
||||
/* LineHighlight .chroma .hl { background-color: #ffffcc } */
|
||||
/* LineNumbersTable .chroma .lnt { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #64686c } */
|
||||
/* LineNumbers .chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #6e7681 } */
|
||||
/* Line */ .chroma .line { display: flex; }
|
||||
/* Keyword */ .chroma .k { color: #ff7b72 }
|
||||
/* KeywordConstant */ .chroma .kc { color: #79c0ff }
|
||||
/* KeywordDeclaration */ .chroma .kd { color: #ff7b72 }
|
||||
/* KeywordNamespace */ .chroma .kn { color: #ff7b72 }
|
||||
/* KeywordPseudo */ .chroma .kp { color: #79c0ff }
|
||||
/* KeywordReserved */ .chroma .kr { color: #ff7b72 }
|
||||
/* KeywordType */ .chroma .kt { color: #ff7b72 }
|
||||
/* Name */ .chroma .n { }
|
||||
/* NameAttribute */ .chroma .na { }
|
||||
/* NameBuiltin */ .chroma .nb { }
|
||||
/* NameBuiltinPseudo */ .chroma .bp { }
|
||||
/* NameClass */ .chroma .nc { color: #f0883e; font-weight: bold }
|
||||
/* NameConstant */ .chroma .no { color: #79c0ff; font-weight: bold }
|
||||
/* NameDecorator */ .chroma .nd { color: #d2a8ff; font-weight: bold }
|
||||
/* NameEntity */ .chroma .ni { color: #ffa657 }
|
||||
/* NameException */ .chroma .ne { color: #f0883e; font-weight: bold }
|
||||
/* NameFunction */ .chroma .nf { color: #d2a8ff; font-weight: bold }
|
||||
/* NameFunctionMagic */ .chroma .fm { }
|
||||
/* NameLabel */ .chroma .nl { color: #79c0ff; font-weight: bold }
|
||||
/* NameNamespace */ .chroma .nn { color: #ff7b72 }
|
||||
/* NameOther */ .chroma .nx { }
|
||||
/* NameProperty */ .chroma .py { color: #79c0ff }
|
||||
/* NameTag */ .chroma .nt { color: #7ee787 }
|
||||
/* NameVariable */ .chroma .nv { color: #79c0ff }
|
||||
/* NameVariableClass */ .chroma .vc { }
|
||||
/* NameVariableGlobal */ .chroma .vg { }
|
||||
/* NameVariableInstance */ .chroma .vi { }
|
||||
/* NameVariableMagic */ .chroma .vm { }
|
||||
/* Literal */ .chroma .l { color: #a5d6ff }
|
||||
/* LiteralDate */ .chroma .ld { color: #79c0ff }
|
||||
/* LiteralString */ .chroma .s { color: #a5d6ff }
|
||||
/* LiteralStringAffix */ .chroma .sa { color: #79c0ff }
|
||||
/* LiteralStringBacktick */ .chroma .sb { color: #a5d6ff }
|
||||
/* LiteralStringChar */ .chroma .sc { color: #a5d6ff }
|
||||
/* LiteralStringDelimiter */ .chroma .dl { color: #79c0ff }
|
||||
/* LiteralStringDoc */ .chroma .sd { color: #a5d6ff }
|
||||
/* LiteralStringDouble */ .chroma .s2 { color: #a5d6ff }
|
||||
/* LiteralStringEscape */ .chroma .se { color: #79c0ff }
|
||||
/* LiteralStringHeredoc */ .chroma .sh { color: #79c0ff }
|
||||
/* LiteralStringInterpol */ .chroma .si { color: #a5d6ff }
|
||||
/* LiteralStringOther */ .chroma .sx { color: #a5d6ff }
|
||||
/* LiteralStringRegex */ .chroma .sr { color: #79c0ff }
|
||||
/* LiteralStringSingle */ .chroma .s1 { color: #a5d6ff }
|
||||
/* LiteralStringSymbol */ .chroma .ss { color: #a5d6ff }
|
||||
/* LiteralNumber */ .chroma .m { color: #a5d6ff }
|
||||
/* LiteralNumberBin */ .chroma .mb { color: #a5d6ff }
|
||||
/* LiteralNumberFloat */ .chroma .mf { color: #a5d6ff }
|
||||
/* LiteralNumberHex */ .chroma .mh { color: #a5d6ff }
|
||||
/* LiteralNumberInteger */ .chroma .mi { color: #a5d6ff }
|
||||
/* LiteralNumberIntegerLong */ .chroma .il { color: #a5d6ff }
|
||||
/* LiteralNumberOct */ .chroma .mo { color: #a5d6ff }
|
||||
/* Operator */ .chroma .o { color: #ff7b72; font-weight: bold }
|
||||
/* OperatorWord */ .chroma .ow { color: #ff7b72; font-weight: bold }
|
||||
/* Punctuation */ .chroma .p { }
|
||||
/* Comment */ .chroma .c { color: #8b949e; font-style: italic }
|
||||
/* CommentHashbang */ .chroma .ch { color: #8b949e; font-style: italic }
|
||||
/* CommentMultiline */ .chroma .cm { color: #8b949e; font-style: italic }
|
||||
/* CommentSingle */ .chroma .c1 { color: #8b949e; font-style: italic }
|
||||
/* CommentSpecial */ .chroma .cs { color: #8b949e; font-weight: bold; font-style: italic }
|
||||
/* CommentPreproc */ .chroma .cp { color: #8b949e; font-weight: bold; font-style: italic }
|
||||
/* CommentPreprocFile */ .chroma .cpf { color: #8b949e; font-weight: bold; font-style: italic }
|
||||
/* Generic */ .chroma .g { }
|
||||
/* GenericDeleted */ .chroma .gd { color: #ffa198; background-color: #490202 }
|
||||
/* GenericEmph */ .chroma .ge { color: inherit; font-style: italic }
|
||||
/* GenericError */ .chroma .gr { color: #ffa198 }
|
||||
/* GenericHeading */ .chroma .gh { color: #79c0ff; font-weight: bold }
|
||||
/* GenericInserted */ .chroma .gi { color: #56d364; background-color: #0f5323 }
|
||||
/* GenericOutput */ .chroma .go { color: #8b949e }
|
||||
/* GenericPrompt */ .chroma .gp { color: #8b949e }
|
||||
/* GenericStrong */ .chroma .gs { font-weight: bold }
|
||||
/* GenericSubheading */ .chroma .gu { color: #79c0ff }
|
||||
/* GenericTraceback */ .chroma .gt { color: #ff7b72 }
|
||||
/* GenericUnderline */ .chroma .gl { text-decoration: underline }
|
||||
/* TextWhitespace */ .chroma .w { color: #6e7681 }
|
||||
}
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
/* Light theme for syntax highlight */
|
||||
/* Generated using `hugo gen chromastyles --style=github` */
|
||||
.highlight {
|
||||
/* Background .bg { background-color: #ffffff; } */
|
||||
/* PreWrapper .chroma { background-color: #ffffff; } */
|
||||
/* Other .chroma .x { } */
|
||||
/* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 }
|
||||
/* CodeLine .chroma .cl { } */
|
||||
/* LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit }
|
||||
/* LineTableTD .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } */
|
||||
/* LineTable .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } */
|
||||
/* LineHighlight .chroma .hl { background-color: #ffffcc } */
|
||||
/* LineNumbersTable .chroma .lnt { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } */
|
||||
/* LineNumbers .chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } */
|
||||
/* Line */ .chroma .line { display: flex; }
|
||||
/* Keyword */ .chroma .k { color: #000000; font-weight: bold }
|
||||
/* KeywordConstant */ .chroma .kc { color: #000000; font-weight: bold }
|
||||
/* KeywordDeclaration */ .chroma .kd { color: #000000; font-weight: bold }
|
||||
/* KeywordNamespace */ .chroma .kn { color: #000000; font-weight: bold }
|
||||
/* KeywordPseudo */ .chroma .kp { color: #000000; font-weight: bold }
|
||||
/* KeywordReserved */ .chroma .kr { color: #000000; font-weight: bold }
|
||||
/* KeywordType */ .chroma .kt { color: #445588; font-weight: bold }
|
||||
/* Name .chroma .n { } */
|
||||
/* NameAttribute */ .chroma .na { color: #008080 }
|
||||
/* NameBuiltin */ .chroma .nb { color: #0086b3 }
|
||||
/* NameBuiltinPseudo */ .chroma .bp { color: #999999 }
|
||||
/* NameClass */ .chroma .nc { color: #445588; font-weight: bold }
|
||||
/* NameConstant */ .chroma .no { color: #008080 }
|
||||
/* NameDecorator */ .chroma .nd { color: #3c5d5d; font-weight: bold }
|
||||
/* NameEntity */ .chroma .ni { color: #800080 }
|
||||
/* NameException */ .chroma .ne { color: #990000; font-weight: bold }
|
||||
/* NameFunction */ .chroma .nf { color: #990000; font-weight: bold }
|
||||
/* NameFunctionMagic .chroma .fm { } */
|
||||
/* NameLabel */ .chroma .nl { color: #990000; font-weight: bold }
|
||||
/* NameNamespace */ .chroma .nn { color: #555555 }
|
||||
/* NameOther .chroma .nx { } */
|
||||
/* NameProperty .chroma .py { } */
|
||||
/* NameTag */ .chroma .nt { color: #000080 }
|
||||
/* NameVariable */ .chroma .nv { color: #008080 }
|
||||
/* NameVariableClass */ .chroma .vc { color: #008080 }
|
||||
/* NameVariableGlobal */ .chroma .vg { color: #008080 }
|
||||
/* NameVariableInstance */ .chroma .vi { color: #008080 }
|
||||
/* NameVariableMagic .chroma .vm { } */
|
||||
/* Literal .chroma .l { } */
|
||||
/* LiteralDate .chroma .ld { } */
|
||||
/* LiteralString */ .chroma .s { color: #dd1144 }
|
||||
/* LiteralStringAffix */ .chroma .sa { color: #dd1144 }
|
||||
/* LiteralStringBacktick */ .chroma .sb { color: #dd1144 }
|
||||
/* LiteralStringChar */ .chroma .sc { color: #dd1144 }
|
||||
/* LiteralStringDelimiter */ .chroma .dl { color: #dd1144 }
|
||||
/* LiteralStringDoc */ .chroma .sd { color: #dd1144 }
|
||||
/* LiteralStringDouble */ .chroma .s2 { color: #dd1144 }
|
||||
/* LiteralStringEscape */ .chroma .se { color: #dd1144 }
|
||||
/* LiteralStringHeredoc */ .chroma .sh { color: #dd1144 }
|
||||
/* LiteralStringInterpol */ .chroma .si { color: #dd1144 }
|
||||
/* LiteralStringOther */ .chroma .sx { color: #dd1144 }
|
||||
/* LiteralStringRegex */ .chroma .sr { color: #009926 }
|
||||
/* LiteralStringSingle */ .chroma .s1 { color: #dd1144 }
|
||||
/* LiteralStringSymbol */ .chroma .ss { color: #990073 }
|
||||
/* LiteralNumber */ .chroma .m { color: #009999 }
|
||||
/* LiteralNumberBin */ .chroma .mb { color: #009999 }
|
||||
/* LiteralNumberFloat */ .chroma .mf { color: #009999 }
|
||||
/* LiteralNumberHex */ .chroma .mh { color: #009999 }
|
||||
/* LiteralNumberInteger */ .chroma .mi { color: #009999 }
|
||||
/* LiteralNumberIntegerLong */ .chroma .il { color: #009999 }
|
||||
/* LiteralNumberOct */ .chroma .mo { color: #009999 }
|
||||
/* Operator */ .chroma .o { color: #000000; font-weight: bold }
|
||||
/* OperatorWord */ .chroma .ow { color: #000000; font-weight: bold }
|
||||
/* Punctuation .chroma .p { } */
|
||||
/* Comment */ .chroma .c { color: #999988; font-style: italic }
|
||||
/* CommentHashbang */ .chroma .ch { color: #999988; font-style: italic }
|
||||
/* CommentMultiline */ .chroma .cm { color: #999988; font-style: italic }
|
||||
/* CommentSingle */ .chroma .c1 { color: #999988; font-style: italic }
|
||||
/* CommentSpecial */ .chroma .cs { color: #999999; font-weight: bold; font-style: italic }
|
||||
/* CommentPreproc */ .chroma .cp { color: #999999; font-weight: bold; font-style: italic }
|
||||
/* CommentPreprocFile */ .chroma .cpf { color: #999999; font-weight: bold; font-style: italic }
|
||||
/* Generic .chroma .g { } */
|
||||
/* GenericDeleted */ .chroma .gd { color: #000000; background-color: #ffdddd }
|
||||
/* GenericEmph */ .chroma .ge { color: #000000; font-style: italic }
|
||||
/* GenericError */ .chroma .gr { color: #aa0000 }
|
||||
/* GenericHeading */ .chroma .gh { color: #999999 }
|
||||
/* GenericInserted */ .chroma .gi { color: #000000; background-color: #ddffdd }
|
||||
/* GenericOutput */ .chroma .go { color: #888888 }
|
||||
/* GenericPrompt */ .chroma .gp { color: #555555 }
|
||||
/* GenericStrong */ .chroma .gs { font-weight: bold }
|
||||
/* GenericSubheading */ .chroma .gu { color: #aaaaaa }
|
||||
/* GenericTraceback */ .chroma .gt { color: #aa0000 }
|
||||
/* GenericUnderline */ .chroma .gl { text-decoration: underline }
|
||||
/* TextWhitespace */ .chroma .w { color: #bbbbbb }
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
||||
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--hx-font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--hx-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--hx-color-red-100:oklch(93.6% .032 17.717);--hx-color-red-200:oklch(88.5% .062 18.334);--hx-color-red-900:oklch(39.6% .141 25.723);--hx-color-orange-50:oklch(98% .016 73.684);--hx-color-orange-100:oklch(95.4% .038 75.164);--hx-color-orange-300:oklch(83.7% .128 66.29);--hx-color-orange-400:oklch(75% .183 55.934);--hx-color-orange-800:oklch(47% .157 37.304);--hx-color-amber-100:oklch(96.2% .059 95.617);--hx-color-amber-200:oklch(92.4% .12 95.746);--hx-color-amber-900:oklch(41.4% .112 45.904);--hx-color-yellow-50:oklch(98.7% .026 102.212);--hx-color-yellow-100:oklch(97.3% .071 103.193);--hx-color-yellow-200:oklch(94.5% .129 101.54);--hx-color-yellow-700:oklch(55.4% .135 66.442);--hx-color-yellow-900:oklch(42.1% .095 57.708);--hx-color-green-100:oklch(96.2% .044 156.743);--hx-color-green-200:oklch(92.5% .084 155.995);--hx-color-green-900:oklch(39.3% .095 152.535);--hx-color-blue-100:oklch(93.2% .032 255.585);--hx-color-blue-200:oklch(88.2% .059 254.128);--hx-color-blue-900:oklch(37.9% .146 265.522);--hx-color-indigo-100:oklch(93% .034 272.788);--hx-color-indigo-200:oklch(87% .065 274.039);--hx-color-indigo-900:oklch(35.9% .144 278.697);--hx-color-purple-100:oklch(94.6% .033 307.174);--hx-color-purple-200:oklch(90.2% .063 306.703);--hx-color-purple-900:oklch(38.1% .176 304.987);--hx-color-slate-50:oklch(98.4% .003 247.858);--hx-color-slate-100:oklch(96.8% .007 247.896);--hx-color-slate-900:oklch(20.8% .042 265.755);--hx-color-gray-50:oklch(98.5% .002 247.839);--hx-color-gray-100:oklch(96.7% .003 264.542);--hx-color-gray-200:oklch(92.8% .006 264.531);--hx-color-gray-300:oklch(87.2% .01 258.338);--hx-color-gray-400:oklch(70.7% .022 261.325);--hx-color-gray-500:oklch(55.1% .027 264.364);--hx-color-gray-600:oklch(44.6% .03 256.802);--hx-color-gray-700:oklch(37.3% .034 259.733);--hx-color-gray-800:oklch(27.8% .033 256.848);--hx-color-gray-900:oklch(21% .034 264.665);--hx-color-neutral-50:oklch(98.5% 0 0);--hx-color-neutral-200:oklch(92.2% 0 0);--hx-color-neutral-300:oklch(87% 0 0);--hx-color-neutral-400:oklch(70.8% 0 0);--hx-color-neutral-500:oklch(55.6% 0 0);--hx-color-neutral-600:oklch(43.9% 0 0);--hx-color-neutral-700:oklch(37.1% 0 0);--hx-color-neutral-800:oklch(26.9% 0 0);--hx-color-neutral-900:oklch(20.5% 0 0);--hx-color-black:#000;--hx-color-white:#fff;--hx-spacing:.25rem;--hx-breakpoint-xl:80rem;--hx-text-xs:.75rem;--hx-text-xs--line-height:calc(1 / .75);--hx-text-sm:.875rem;--hx-text-sm--line-height:calc(1.25 / .875);--hx-text-base:1rem;--hx-text-base--line-height:calc(1.5 / 1);--hx-text-lg:1.125rem;--hx-text-lg--line-height:calc(1.75 / 1.125);--hx-text-xl:1.25rem;--hx-text-xl--line-height:calc(1.75 / 1.25);--hx-text-2xl:1.5rem;--hx-text-2xl--line-height:calc(2 / 1.5);--hx-text-3xl:1.875rem;--hx-text-3xl--line-height:calc(2.25 / 1.875);--hx-text-4xl:2.25rem;--hx-text-4xl--line-height:calc(2.5 / 2.25);--hx-text-5xl:3rem;--hx-text-5xl--line-height:1;--hx-font-weight-normal:400;--hx-font-weight-medium:500;--hx-font-weight-semibold:600;-Line truncated
|
||||
@@ -1,3 +0,0 @@
|
||||
.hextra-archive-timeline {
|
||||
@apply hx:border-l-2 hx:border-black/15 hx:dark:border-white/15;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
.hextra-badge {
|
||||
@apply hx:inline-flex hx:items-center;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
.hextra-banner-hidden .hextra-banner {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hextra-banner {
|
||||
:where(a):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:underline hx:decoration-from-font;
|
||||
}
|
||||
:where(p):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:leading-7 hx:first:mt-0;
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
.hextra-cards {
|
||||
grid-template-columns: repeat(auto-fill, minmax(max(250px, calc((100% - 1rem * 2) / var(--hextra-cards-grid-cols))), 1fr));
|
||||
}
|
||||
|
||||
.hextra-card {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.hextra-card img {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.hextra-card:hover .hextra-card-icon svg {
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
.hextra-card .hextra-card-icon svg {
|
||||
width: 1.5rem;
|
||||
color: #00000033;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
.hextra-card p {
|
||||
margin-top: 0.5rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dark .hextra-card .hextra-card-icon svg {
|
||||
color: #ffffff66;
|
||||
}
|
||||
|
||||
.dark .hextra-card:hover .hextra-card-icon svg {
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
.hextra-card-tag {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
top: 5px;
|
||||
&:where(:dir(ltr)) {
|
||||
right: 5px;
|
||||
}
|
||||
&:where(:dir(rtl)) {
|
||||
left: 5px;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
@supports (
|
||||
(-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))
|
||||
) {
|
||||
.hextra-code-copy-btn {
|
||||
@apply hx:backdrop-blur-md hx:opacity-85 hx:dark:opacity-80;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
.hextra-feature-grid {
|
||||
@media (min-width: 1024px) {
|
||||
grid-template-columns: repeat(var(--hextra-feature-grid-cols), minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
.hextra-jupyter-code-cell {
|
||||
scrollbar-gutter: auto;
|
||||
|
||||
@apply hx:mt-6;
|
||||
|
||||
.hextra-jupyter-code-cell-outputs-container {
|
||||
@apply hx:text-xs hx:overflow-hidden;
|
||||
|
||||
.hextra-jupyter-code-cell-outputs {
|
||||
@apply hx:overflow-auto hx:max-h-[50vh];
|
||||
|
||||
pre {
|
||||
@apply hx:text-xs hx:overflow-auto hx:max-w-full;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
nav {
|
||||
.hextra-search-wrapper {
|
||||
@apply hx:hidden hx:md:inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
@supports (
|
||||
(-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))
|
||||
) {
|
||||
.hextra-nav-container-blur {
|
||||
@apply hx:backdrop-blur-md hx:bg-white/[.85] hx:dark:bg-dark/80!;
|
||||
}
|
||||
}
|
||||
|
||||
/* Hamburger Menu - Flattened Structure */
|
||||
.hextra-hamburger-menu svg g {
|
||||
@apply hx:origin-center hx:transition-all hx:duration-100 hx:ease-out;
|
||||
}
|
||||
|
||||
.hextra-hamburger-menu svg path {
|
||||
@apply hx:opacity-100 hx:transition-all hx:duration-100 hx:ease-out hx:delay-100;
|
||||
}
|
||||
|
||||
.hextra-hamburger-menu svg.open path {
|
||||
@apply hx:transition-transform hx:duration-100 hx:ease-out hx:delay-0;
|
||||
}
|
||||
|
||||
.hextra-hamburger-menu svg.open g {
|
||||
@apply hx:transition-transform hx:duration-100 hx:ease-out hx:delay-100;
|
||||
}
|
||||
|
||||
.hextra-hamburger-menu svg.open > path {
|
||||
@apply hx:opacity-0;
|
||||
}
|
||||
|
||||
.hextra-hamburger-menu svg.open > g:nth-of-type(1) {
|
||||
@apply hx:rotate-45;
|
||||
}
|
||||
|
||||
.hextra-hamburger-menu svg.open > g:nth-of-type(1) path {
|
||||
@apply hx:translate-y-1;
|
||||
}
|
||||
|
||||
.hextra-hamburger-menu svg.open > g:nth-of-type(2) {
|
||||
@apply hx:-rotate-45;
|
||||
}
|
||||
|
||||
.hextra-hamburger-menu svg.open > g:nth-of-type(2) path {
|
||||
@apply hx:-translate-y-1;
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
.hextra-scrollbar, .hextra-scrollbar * {
|
||||
scrollbar-width: thin; /* Firefox */
|
||||
scrollbar-color: oklch(55.55% 0 0 / 40%) transparent; /* Firefox */
|
||||
|
||||
scrollbar-gutter: stable;
|
||||
&::-webkit-scrollbar {
|
||||
@apply hx:w-3 hx:h-3;
|
||||
}
|
||||
&::-webkit-scrollbar-track {
|
||||
@apply hx:bg-transparent;
|
||||
}
|
||||
&::-webkit-scrollbar-thumb {
|
||||
@apply hx:rounded-[10px];
|
||||
}
|
||||
&:hover::-webkit-scrollbar-thumb {
|
||||
border: 3px solid transparent;
|
||||
background-color: var(--tw-shadow-color);
|
||||
background-clip: content-box;
|
||||
@apply hx:shadow-neutral-500/20 hx:hover:shadow-neutral-500/40;
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
.hextra-search-wrapper {
|
||||
li {
|
||||
@apply hx:mx-2.5 hx:wrap-break-word hx:rounded-md hx:contrast-more:border hx:text-gray-800 hx:contrast-more:border-transparent hx:dark:text-gray-300;
|
||||
a {
|
||||
@apply hx:focus-visible:outline-none hx:block hx:scroll-m-12 hx:px-2.5 hx:py-2;
|
||||
}
|
||||
|
||||
.hextra-search-title {
|
||||
@apply hx:text-base hx:font-semibold hx:leading-5;
|
||||
}
|
||||
|
||||
.hextra-search-active {
|
||||
@apply hx:rounded-md hx:bg-primary-500/10 hx:contrast-more:border-primary-500;
|
||||
}
|
||||
}
|
||||
|
||||
.hextra-search-no-result {
|
||||
@apply hx:block hx:select-none hx:p-8 hx:text-center hx:text-sm hx:text-gray-400;
|
||||
}
|
||||
|
||||
.hextra-search-prefix {
|
||||
@apply hx:mx-2.5 hx:mb-2 hx:mt-6 hx:select-none hx:border-b hx:border-black/10 hx:px-2.5 hx:pb-1.5 hx:text-xs hx:font-semibold
|
||||
hx:uppercase hx:text-gray-500 hx:first:mt-0 hx:dark:border-white/20 hx:dark:text-gray-300 hx:contrast-more:border-gray-600
|
||||
hx:contrast-more:text-gray-900 hx:contrast-more:dark:border-gray-50 hx:contrast-more:dark:text-gray-50;
|
||||
}
|
||||
|
||||
.hextra-search-excerpt {
|
||||
@apply hx:overflow-hidden hx:text-ellipsis hx:mt-1 hx:text-sm hx:leading-[1.35rem] hx:text-gray-600 hx:dark:text-gray-400 hx:contrast-more:dark:text-gray-50;
|
||||
display: -webkit-box;
|
||||
line-clamp: 1;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.hextra-search-match {
|
||||
@apply hx:text-primary-600;
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
@media (max-width: 48rem) {
|
||||
.hextra-sidebar-container {
|
||||
@apply hx:fixed hx:pt-[calc(var(--navbar-height)+var(--hextra-banner-height))] hx:top-0 hx:w-full hx:bottom-0 hx:z-15 hx:overscroll-contain hx:bg-white hx:dark:bg-dark;
|
||||
transition: transform 0.4s cubic-bezier(0.52, 0.16, 0.04, 1);
|
||||
will-change: transform, opacity;
|
||||
contain: layout style;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.hextra-sidebar-container {
|
||||
li > .hextra-sidebar-children {
|
||||
@apply hx:h-0;
|
||||
}
|
||||
li.open > .hextra-sidebar-children {
|
||||
@apply hx:h-auto hx:pt-1;
|
||||
}
|
||||
li.open > .hextra-sidebar-item > .hextra-sidebar-collapsible-button > svg > path {
|
||||
@apply hx:rotate-90;
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
.hextra-steps {
|
||||
:where(h2, h3, h4, h5, h6):not(.no-step-marker) {
|
||||
counter-increment: step;
|
||||
@apply hx:ltr:before:ml-[-41px] hx:rtl:before:mr-[-44px];
|
||||
/* https://github.com/tailwindlabs/tailwindcss/issues/15597#issuecomment-2582673546 */
|
||||
@apply hx:before:bg-gray-100 hx:dark:before:bg-neutral-800;
|
||||
@apply hx:before:border-4 hx:before:border-white hx:dark:before:border-dark;
|
||||
&:before {
|
||||
content: counter(step);
|
||||
@apply hx:absolute hx:size-[33px];
|
||||
@apply hx:rounded-full hx:text-neutral-400 hx:text-base hx:font-normal hx:text-center hx:-indent-px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:lang(fa) .hextra-steps {
|
||||
:where(h2, h3, h4, h5, h6):not(.no-step-marker) {
|
||||
&:before {
|
||||
content: counter(step, persian);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
/* Table of Contents Scroll Spy Styles */
|
||||
.hextra-toc a.hextra-toc-active {
|
||||
@apply hx:text-gray-900! hx:dark:text-gray-50! hx:transition-all hx:duration-200;
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
/* Code syntax highlight */
|
||||
@import "./chroma/light.css";
|
||||
@import "./chroma/dark.css";
|
||||
|
||||
.hextra-code-block {
|
||||
@apply hx:text-[.9em] hx:leading-5;
|
||||
|
||||
pre {
|
||||
@apply hx:text-[.9em] hx:bg-primary-700/5 hx:overflow-x-auto hx:font-medium hx:subpixel-antialiased hx:dark:bg-primary-300/10 hx:contrast-more:border hx:contrast-more:border-primary-900/20 hx:contrast-more:contrast-150 hx:contrast-more:dark:border-primary-100/40;
|
||||
}
|
||||
|
||||
.hextra-code-filename {
|
||||
@apply hx:absolute hx:top-0 hx:z-1 hx:w-full hx:truncate hx:rounded-t-xl hx:bg-primary-700/5 hx:py-2 hx:px-4 hx:text-xs hx:text-gray-700 hx:dark:bg-primary-300/10 hx:dark:text-gray-200;
|
||||
}
|
||||
|
||||
.hextra-code-filename + pre:not(.lntable pre) {
|
||||
/* Override padding for code blocks with filename but no highlight */
|
||||
@apply hx:pt-12;
|
||||
}
|
||||
}
|
||||
|
||||
.hextra-code-block pre:not(.lntable pre) {
|
||||
@apply hx:px-4 hx:mb-4 hx:py-4 hx:rounded-xl;
|
||||
}
|
||||
|
||||
.hextra-code-block div:nth-of-type(2) pre {
|
||||
@apply hx:pt-12 hx:pb-4;
|
||||
}
|
||||
|
||||
.chroma {
|
||||
.lntable {
|
||||
@apply hx:m-0 hx:block hx:w-auto hx:overflow-auto hx:rounded-xl;
|
||||
|
||||
pre {
|
||||
@apply hx:pt-4 hx:pb-4;
|
||||
}
|
||||
}
|
||||
.ln,
|
||||
.lnt:not(.hl > .lnt),
|
||||
.hl:not(.line) {
|
||||
@apply hx:pl-4 hx:pr-4 hx:min-w-[2.6rem] hx:text-neutral-600 hx:dark:text-neutral-300;
|
||||
}
|
||||
.lntd {
|
||||
@apply hx:p-0 hx:align-top;
|
||||
}
|
||||
.lntd:last-of-type {
|
||||
@apply hx:w-full;
|
||||
}
|
||||
/* LineHighlight */
|
||||
.hl {
|
||||
@apply hx:block hx:w-full hx:bg-primary-800/10;
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
hx:max-w-full
|
||||
@@ -1,91 +0,0 @@
|
||||
@import "tailwindcss" prefix(hx);
|
||||
|
||||
@custom-variant dark (&:where(.dark, .dark *));
|
||||
|
||||
@theme {
|
||||
--color-primary-50: hsl(var(--primary-hue) var(--primary-saturation) calc(var(--primary-lightness) + calc(calc(100% - var(--primary-lightness)) / 50) * 47));
|
||||
--color-primary-100: hsl(var(--primary-hue) var(--primary-saturation) calc(var(--primary-lightness) + calc(calc(100% - var(--primary-lightness)) / 50) * 44));
|
||||
--color-primary-200: hsl(var(--primary-hue) var(--primary-saturation) calc(var(--primary-lightness) + calc(calc(100% - var(--primary-lightness)) / 50) * 36));
|
||||
--color-primary-300: hsl(var(--primary-hue) var(--primary-saturation) calc(var(--primary-lightness) + calc(calc(100% - var(--primary-lightness)) / 50) * 27));
|
||||
--color-primary-400: hsl(var(--primary-hue) var(--primary-saturation) calc(var(--primary-lightness) + calc(calc(100% - var(--primary-lightness)) / 50) * 16));
|
||||
--color-primary-500: hsl(var(--primary-hue) var(--primary-saturation) var(--primary-lightness));
|
||||
--color-primary-600: hsl(var(--primary-hue) var(--primary-saturation) calc(calc(var(--primary-lightness) / 50) * 45));
|
||||
--color-primary-700: hsl(var(--primary-hue) var(--primary-saturation) calc(calc(var(--primary-lightness) / 50) * 39));
|
||||
--color-primary-800: hsl(var(--primary-hue) var(--primary-saturation) calc(calc(var(--primary-lightness) / 50) * 32));
|
||||
--color-primary-900: hsl(var(--primary-hue) var(--primary-saturation) calc(calc(var(--primary-lightness) / 50) * 24));
|
||||
--color-dark: #111;
|
||||
}
|
||||
|
||||
html {
|
||||
@apply hx:text-base hx:antialiased;
|
||||
}
|
||||
|
||||
body {
|
||||
@apply hx:w-full hx:bg-white hx:dark:bg-dark hx:dark:text-gray-100;
|
||||
}
|
||||
|
||||
:root {
|
||||
--primary-hue: 212deg;
|
||||
--primary-saturation: 100%;
|
||||
--primary-lightness: 50%;
|
||||
--navbar-height: 4rem;
|
||||
--hextra-banner-height: 2rem;
|
||||
--menu-height: 3.75rem; /* 60px */
|
||||
}
|
||||
|
||||
.dark {
|
||||
--primary-hue: 204deg;
|
||||
--primary-saturation: 100%;
|
||||
--primary-lightness: 50%;
|
||||
}
|
||||
|
||||
@utility hextra-focus {
|
||||
@apply hx:outline-none hx:ring-2 hx:ring-primary-200 hx:ring-offset-1 hx:ring-offset-primary-300 hx:dark:ring-primary-800 hx:dark:ring-offset-primary-700;
|
||||
}
|
||||
|
||||
@utility hextra-focus-visible {
|
||||
@apply hx:focus-visible:outline-none hx:focus-visible:ring-2 hx:focus-visible:ring-primary-200 hx:focus-visible:ring-offset-1 hx:focus-visible:ring-offset-primary-300 hx:dark:focus-visible:ring-primary-800 hx:dark:focus-visible:ring-offset-primary-700;
|
||||
}
|
||||
|
||||
@utility hextra-focus-visible-inset {
|
||||
@apply hx:focus-visible:outline-none hx:focus-visible:ring-inset hx:focus-visible:ring-2 hx:focus-visible:ring-primary-200 hx:dark:focus-visible:ring-primary-800 hx:focus-visible:ring-offset-0;
|
||||
}
|
||||
|
||||
@layer base {
|
||||
abbr:where([title]) {
|
||||
cursor: help;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after {
|
||||
animation-duration: 0.01ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
scroll-behavior: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
@layer base {
|
||||
:where(a, button, [role="tab"], [role="menuitem"], [role="menuitemradio"], input, select, textarea, [tabindex="0"]):not(
|
||||
[class*="hextra-focus-visible"]
|
||||
):focus-visible {
|
||||
@apply hx:hextra-focus;
|
||||
}
|
||||
}
|
||||
|
||||
@import "./typography.css";
|
||||
@import "./highlight.css";
|
||||
@import "./components/cards.css";
|
||||
@import "./components/steps.css";
|
||||
@import "./components/search.css";
|
||||
@import "./components/sidebar.css";
|
||||
@import "./components/banner.css";
|
||||
@import "./components/navbar.css";
|
||||
@import "./components/scrollbar.css";
|
||||
@import "./components/code-copy.css";
|
||||
@import "./components/hextra/feature-grid.css";
|
||||
@import "./components/jupyter.css";
|
||||
@import "./components/badge.css";
|
||||
@import "./components/toc.css";
|
||||
@import "./components/archives.css";
|
||||
@@ -1,147 +0,0 @@
|
||||
.content {
|
||||
:where(h1):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:mt-2 hx:text-4xl hx:font-bold hx:tracking-tight hx:text-slate-900 hx:dark:text-slate-100;
|
||||
}
|
||||
:where(h2):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:font-semibold hx:tracking-tight hx:text-slate-900 hx:dark:text-slate-100 hx:mt-10 hx:border-b hx:pb-1 hx:text-3xl hx:border-neutral-200/70 hx:contrast-more:border-neutral-400 hx:dark:border-primary-100/10 hx:contrast-more:dark:border-neutral-400;
|
||||
}
|
||||
:where(h3):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:font-semibold hx:tracking-tight hx:text-slate-900 hx:dark:text-slate-100 hx:mt-8 hx:text-2xl;
|
||||
}
|
||||
:where(h4):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:font-semibold hx:tracking-tight hx:text-slate-900 hx:dark:text-slate-100 hx:mt-8 hx:text-xl;
|
||||
}
|
||||
:where(h5):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:font-semibold hx:tracking-tight hx:text-slate-900 hx:dark:text-slate-100 hx:mt-8 hx:text-lg;
|
||||
}
|
||||
:where(h6):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:font-semibold hx:tracking-tight hx:text-slate-900 hx:dark:text-slate-100 hx:mt-8 hx:text-base;
|
||||
}
|
||||
:where(p):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:mt-6 hx:leading-7 hx:first:mt-0;
|
||||
}
|
||||
:where(a):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:text-primary-600 hx:underline hx:decoration-from-font;
|
||||
}
|
||||
:where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:mt-6 hx:border-gray-300 hx:italic hx:text-gray-700 hx:dark:border-gray-700 hx:dark:text-gray-400 hx:first:mt-0 hx:ltr:border-l-2 hx:ltr:pl-6 hx:rtl:border-r-2 hx:rtl:pr-6;
|
||||
}
|
||||
:where(pre):not(:where(.hextra-code-block pre, [class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:bg-primary-700/5 hx:mb-4 hx:overflow-x-auto hx:rounded-xl hx:font-medium hx:subpixel-antialiased hx:dark:bg-primary-300/10 hx:text-[.9em] hx:contrast-more:border hx:contrast-more:border-primary-900/20 hx:contrast-more:contrast-150 hx:contrast-more:dark:border-primary-100/40 hx:py-4;
|
||||
}
|
||||
:where(code):not(:where(.hextra-code-block code, [class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:border-black/4 hx:bg-black/3 hx:wrap-break-word hx:rounded-md hx:border hx:py-0.5 hx:px-[.25em] hx:text-[.9em] hx:dark:border-white/10 hx:dark:bg-white/10;
|
||||
}
|
||||
:where(table):not(:where(.hextra-code-block table, [class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:block hx:overflow-x-auto hx:my-6 hx:p-0 hx:first:mt-0 hx:w-full hx:text-sm hx:leading-5 hx:border-collapse;
|
||||
|
||||
thead {
|
||||
@apply hx:bg-gray-50 hx:dark:bg-gray-600/20;
|
||||
}
|
||||
tr {
|
||||
@apply hx:m-0 hx:border-t hx:border-gray-300 hx:p-0 hx:dark:border-gray-600;
|
||||
}
|
||||
th {
|
||||
@apply hx:m-0 hx:border hx:border-gray-300 hx:p-2 hx:font-semibold hx:dark:border-gray-600;
|
||||
}
|
||||
td {
|
||||
@apply hx:m-0 hx:border hx:border-gray-300 hx:p-2 hx:dark:border-gray-600;
|
||||
}
|
||||
}
|
||||
:where(ol):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:mt-6 hx:list-decimal hx:first:mt-0 hx:ltr:ml-6 hx:rtl:mr-6;
|
||||
li {
|
||||
@apply hx:my-2;
|
||||
}
|
||||
}
|
||||
:where(ul):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:mt-6 hx:list-disc hx:first:mt-0 hx:ltr:ml-6 hx:rtl:mr-6;
|
||||
li {
|
||||
@apply hx:my-2;
|
||||
}
|
||||
}
|
||||
/* Task lists - hide list markers for lists containing checkboxes */
|
||||
:where(ul):not(:where([class~=not-prose],[class~=not-prose] *)):has(li input[type="checkbox"]) {
|
||||
@apply hx:list-none;
|
||||
}
|
||||
/* This CSS rule targets the first nested unordered (ul) or ordered (ol) list
|
||||
inside the list item (li) of any parent ul or ol.
|
||||
The rule sets the top margin of the selected list to zero. */
|
||||
:where(ul, ol) > li > :where(ul, ol):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:mt-0;
|
||||
}
|
||||
:where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:border-black/4 hx:bg-black/3 hx:wrap-break-word hx:rounded-md hx:border hx:py-0.5 hx:px-[.25em] hx:text-[.9em] hx:dark:border-white/10 hx:dark:bg-white/10;
|
||||
}
|
||||
:where(pre.mermaid):not(:where(.hextra-code-block pre, [class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:bg-transparent hx:rounded-none hx:dark:bg-transparent;
|
||||
}
|
||||
:where(img):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:mx-auto hx:my-4 hx:rounded-md;
|
||||
}
|
||||
:where(figure):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
figcaption {
|
||||
@apply hx:text-sm hx:text-gray-500 hx:dark:text-gray-400 hx:mt-2 hx:block hx:text-center;
|
||||
}
|
||||
}
|
||||
/* Definition list */
|
||||
:where(dl):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
dt {
|
||||
@apply hx:mt-6 hx:font-semibold;
|
||||
}
|
||||
dd {
|
||||
@apply hx:my-2 hx:ps-6;
|
||||
}
|
||||
}
|
||||
/* Horizontal line */
|
||||
:where(hr):not(:where([class~=not-prose],[class~=not-prose] *)) {
|
||||
@apply hx:my-10 hx:first:mt-0 hx:last:mb-0 hx:border-gray-200 hx:dark:border-neutral-800;
|
||||
}
|
||||
.footnotes {
|
||||
@apply hx:mt-12 hx:text-sm;
|
||||
|
||||
hr {
|
||||
@apply hx:border-gray-200 hx:dark:border-neutral-800;
|
||||
}
|
||||
}
|
||||
.subheading-anchor {
|
||||
@apply hx:opacity-0 hx:transition-opacity hx:ltr:ml-1 hx:rtl:mr-1;
|
||||
|
||||
span:target + &,
|
||||
:hover > &,
|
||||
&:focus-visible {
|
||||
@apply hx:opacity-100;
|
||||
}
|
||||
|
||||
span + &,
|
||||
:hover > & {
|
||||
@apply hx:no-underline!;
|
||||
}
|
||||
|
||||
@apply hx:after:text-gray-300 hx:dark:after:text-neutral-700;
|
||||
&:after {
|
||||
@apply hx:content-['#'] hx:px-1;
|
||||
span:target + & {
|
||||
@apply hx:text-gray-400;
|
||||
@apply hx:dark:text-neutral-500;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
article details > summary {
|
||||
&::-webkit-details-marker {
|
||||
@apply hx:hidden;
|
||||
}
|
||||
&::before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' class='hx:h-5 hx:w-5' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z' clip-rule='evenodd' /%3E%3C/svg%3E");
|
||||
height: 1.2em;
|
||||
width: 1.2em;
|
||||
vertical-align: -4px;
|
||||
padding: 0 0.6em;
|
||||
}
|
||||
}
|
||||
|
||||
:lang(fa) ol {
|
||||
list-style-type: persian;
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
/* Hugo template to derive CSS variables from site and page parameters */
|
||||
|
||||
/* Do not remove the following comment. It is used by Hugo to render CSS variables.
|
||||
{{- $layoutWidthValues := dict "normal" "80rem" "wide" "90rem" "full" "100%" -}}
|
||||
{{- $layoutWidthDefault := index $layoutWidthValues "normal" -}}
|
||||
|
||||
{{- $maxPageWidth := (index $layoutWidthValues (site.Params.page.width | default "normal")) | default $layoutWidthDefault -}}
|
||||
{{- $maxNavbarWidth := (index $layoutWidthValues (site.Params.navbar.width | default "normal")) | default $layoutWidthDefault -}}
|
||||
{{- $maxFooterWidth := (index $layoutWidthValues (site.Params.footer.width | default "normal")) | default $layoutWidthDefault -}}
|
||||
|
||||
{{- $maxContentWidth := "72rem" -}}
|
||||
*/
|
||||
|
||||
:root {
|
||||
--hextra-max-page-width: {{ $maxPageWidth }};
|
||||
--hextra-max-content-width: {{ $maxContentWidth }};
|
||||
--hextra-max-navbar-width: {{ $maxNavbarWidth }};
|
||||
--hextra-max-footer-width: {{ $maxFooterWidth }};
|
||||
}
|
||||
|
||||
.hextra-max-page-width {
|
||||
max-width: var(--hextra-max-page-width);
|
||||
}
|
||||
|
||||
.hextra-max-content-width {
|
||||
max-width: var(--hextra-max-content-width);
|
||||
}
|
||||
|
||||
.hextra-max-navbar-width {
|
||||
max-width: var(--hextra-max-navbar-width);
|
||||
}
|
||||
|
||||
.hextra-max-footer-width {
|
||||
max-width: var(--hextra-max-footer-width);
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
// Back to top button
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const backToTop = document.querySelector("#backToTop");
|
||||
if (backToTop) {
|
||||
backToTop.addEventListener("click", scrollUp);
|
||||
document.addEventListener("scroll", (e) => {
|
||||
if (window.scrollY > 300) {
|
||||
backToTop.classList.remove("hx:opacity-0");
|
||||
backToTop.removeAttribute("tabindex");
|
||||
} else {
|
||||
backToTop.classList.add("hx:opacity-0");
|
||||
backToTop.setAttribute("tabindex", "-1");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function scrollUp() {
|
||||
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||
window.scroll({
|
||||
top: 0,
|
||||
left: 0,
|
||||
behavior: prefersReducedMotion ? 'auto' : 'smooth',
|
||||
});
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
// {{- if site.Params.banner }}
|
||||
(function () {
|
||||
const banner = document.querySelector(".hextra-banner")
|
||||
document.documentElement.style.setProperty("--hextra-banner-height", banner.clientHeight+"px");
|
||||
|
||||
const closeBtn = banner.querySelector(".hextra-banner-close-button");
|
||||
|
||||
closeBtn.addEventListener("click", () => {
|
||||
document.documentElement.classList.add("hextra-banner-hidden");
|
||||
document.documentElement.style.setProperty("--hextra-banner-height", "0px");
|
||||
|
||||
localStorage.setItem('{{ site.Params.banner.key | default `banner-closed` }}', "0");
|
||||
});
|
||||
})();
|
||||
// {{- end -}}
|
||||
@@ -1,91 +0,0 @@
|
||||
// Copy button for code blocks
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const getCopyIcon = () => {
|
||||
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
||||
svg.innerHTML = `
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" />
|
||||
`;
|
||||
svg.setAttribute('fill', 'none');
|
||||
svg.setAttribute('viewBox', '0 0 24 24');
|
||||
svg.setAttribute('stroke', 'currentColor');
|
||||
svg.setAttribute('stroke-width', '2');
|
||||
return svg;
|
||||
}
|
||||
|
||||
const getSuccessIcon = () => {
|
||||
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
||||
svg.innerHTML = `
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7" />
|
||||
`;
|
||||
svg.setAttribute('fill', 'none');
|
||||
svg.setAttribute('viewBox', '0 0 24 24');
|
||||
svg.setAttribute('stroke', 'currentColor');
|
||||
svg.setAttribute('stroke-width', '2');
|
||||
return svg;
|
||||
}
|
||||
|
||||
// Make scrollable code blocks focusable for keyboard users.
|
||||
const updateScrollableCodeBlocks = () => {
|
||||
document.querySelectorAll('.hextra-code-block pre, .highlight pre').forEach(function (pre) {
|
||||
if (pre.scrollWidth > pre.clientWidth) {
|
||||
pre.setAttribute('tabindex', '0');
|
||||
} else {
|
||||
pre.removeAttribute('tabindex');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
updateScrollableCodeBlocks();
|
||||
|
||||
let resizeRaf;
|
||||
window.addEventListener('resize', () => {
|
||||
if (resizeRaf) {
|
||||
cancelAnimationFrame(resizeRaf);
|
||||
}
|
||||
resizeRaf = requestAnimationFrame(updateScrollableCodeBlocks);
|
||||
});
|
||||
|
||||
document.querySelectorAll('.hextra-code-copy-btn').forEach(function (button) {
|
||||
// Add copy and success icons
|
||||
button.querySelector('.hextra-copy-icon')?.appendChild(getCopyIcon());
|
||||
button.querySelector('.hextra-success-icon')?.appendChild(getSuccessIcon());
|
||||
|
||||
// Add click event listener for copy button
|
||||
button.addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
// Get the code target
|
||||
const target = button.parentElement.previousElementSibling;
|
||||
let codeElement;
|
||||
if (target.tagName === 'CODE') {
|
||||
codeElement = target;
|
||||
} else {
|
||||
// Select the last code element in case line numbers are present
|
||||
const codeElements = target.querySelectorAll('code');
|
||||
codeElement = codeElements[codeElements.length - 1];
|
||||
}
|
||||
if (codeElement) {
|
||||
let code = codeElement.innerText;
|
||||
// Replace double newlines with single newlines in the innerText
|
||||
// as each line inside <span> has trailing newline '\n'
|
||||
if ("lang" in codeElement.dataset) {
|
||||
code = code.replace(/\n\n/g, '\n');
|
||||
}
|
||||
navigator.clipboard.writeText(code).then(function () {
|
||||
button.classList.add('copied');
|
||||
var originalLabel = button.getAttribute('aria-label');
|
||||
var copiedLabel = button.dataset.copiedLabel || 'Copied!';
|
||||
button.setAttribute('aria-label', copiedLabel);
|
||||
setTimeout(function () {
|
||||
button.classList.remove('copied');
|
||||
button.setAttribute('aria-label', originalLabel);
|
||||
}, 1000);
|
||||
}).catch(function (err) {
|
||||
console.error('Failed to copy text: ', err);
|
||||
});
|
||||
} else {
|
||||
console.error('Target element not found');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,22 +0,0 @@
|
||||
// {{ $faviconDarkExists := fileExists (path.Join "static" "favicon-dark.svg") }}
|
||||
(function () {
|
||||
const faviconEl = document.getElementById("favicon-svg");
|
||||
const faviconDarkExists = "{{ $faviconDarkExists }}" === "true";
|
||||
|
||||
if (faviconEl && faviconDarkExists) {
|
||||
const lightFavicon = '{{ "favicon.svg" | relURL }}';
|
||||
const darkFavicon = '{{ "favicon-dark.svg" | relURL }}';
|
||||
|
||||
const darkModeQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
||||
|
||||
function updateFavicon(e) {
|
||||
faviconEl.href = e.matches ? darkFavicon : lightFavicon;
|
||||
}
|
||||
|
||||
// Set favicon on load
|
||||
updateFavicon(darkModeQuery);
|
||||
|
||||
// Listen for system preference changes
|
||||
darkModeQuery.addEventListener("change", updateFavicon);
|
||||
}
|
||||
})();
|
||||
@@ -1,15 +0,0 @@
|
||||
// Script for filetree shortcode collapsing/expanding folders used in the theme
|
||||
// ======================================================================
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const folders = document.querySelectorAll(".hextra-filetree-folder");
|
||||
folders.forEach(function (folder) {
|
||||
folder.addEventListener("click", function () {
|
||||
Array.from(folder.children).forEach(function (el) {
|
||||
el.dataset.state = el.dataset.state === "open" ? "closed" : "open";
|
||||
});
|
||||
var newState = folder.nextElementSibling.dataset.state === "open" ? "closed" : "open";
|
||||
folder.nextElementSibling.dataset.state = newState;
|
||||
folder.setAttribute('aria-expanded', newState === 'open' ? 'true' : 'false');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,103 +0,0 @@
|
||||
(function () {
|
||||
const languageSwitchers = document.querySelectorAll('.hextra-language-switcher');
|
||||
const closeSwitcher = (switcher, focusSwitcher = false) => {
|
||||
switcher.dataset.state = 'closed';
|
||||
switcher.setAttribute('aria-expanded', 'false');
|
||||
const optionsElement = switcher.nextElementSibling;
|
||||
optionsElement.classList.add('hx:hidden');
|
||||
if (focusSwitcher) {
|
||||
switcher.focus();
|
||||
}
|
||||
};
|
||||
|
||||
const openSwitcher = (switcher, focusTarget = "none") => {
|
||||
switcher.dataset.state = 'open';
|
||||
switcher.setAttribute('aria-expanded', 'true');
|
||||
const optionsElement = switcher.nextElementSibling;
|
||||
if (optionsElement.classList.contains('hx:hidden')) {
|
||||
toggleMenu(switcher);
|
||||
} else {
|
||||
resizeMenu(switcher);
|
||||
}
|
||||
|
||||
if (focusTarget !== "none") {
|
||||
const items = Array.from(optionsElement.querySelectorAll('[role="menuitem"]'));
|
||||
if (items.length > 0) {
|
||||
const target = focusTarget === "last" ? items[items.length - 1] : items[0];
|
||||
target.focus();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
languageSwitchers.forEach((switcher) => {
|
||||
switcher.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
if (switcher.dataset.state === 'open') {
|
||||
closeSwitcher(switcher);
|
||||
} else {
|
||||
openSwitcher(switcher);
|
||||
}
|
||||
});
|
||||
|
||||
switcher.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'ArrowDown') {
|
||||
e.preventDefault();
|
||||
openSwitcher(switcher, 'first');
|
||||
} else if (e.key === 'ArrowUp') {
|
||||
e.preventDefault();
|
||||
openSwitcher(switcher, 'last');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
document.querySelectorAll('.hextra-language-options[role=menu]').forEach((menu) => {
|
||||
menu.addEventListener('keydown', (e) => {
|
||||
const items = Array.from(menu.querySelectorAll('[role="menuitem"]'));
|
||||
if (items.length === 0) return;
|
||||
|
||||
const currentIndex = items.indexOf(document.activeElement);
|
||||
let newIndex;
|
||||
|
||||
switch (e.key) {
|
||||
case 'ArrowDown':
|
||||
e.preventDefault();
|
||||
newIndex = (currentIndex + 1) % items.length;
|
||||
items[newIndex].focus();
|
||||
break;
|
||||
case 'ArrowUp':
|
||||
e.preventDefault();
|
||||
newIndex = (currentIndex - 1 + items.length) % items.length;
|
||||
items[newIndex].focus();
|
||||
break;
|
||||
case 'Home':
|
||||
e.preventDefault();
|
||||
items[0].focus();
|
||||
break;
|
||||
case 'End':
|
||||
e.preventDefault();
|
||||
items[items.length - 1].focus();
|
||||
break;
|
||||
case 'Escape': {
|
||||
e.preventDefault();
|
||||
const switcher = menu.previousElementSibling;
|
||||
if (switcher) {
|
||||
closeSwitcher(switcher, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
window.addEventListener("resize", () => languageSwitchers.forEach(resizeMenu));
|
||||
|
||||
// Dismiss language switcher when clicking outside.
|
||||
document.addEventListener('click', (e) => {
|
||||
if (!e.target.closest('.hextra-language-switcher') && !e.target.closest('.hextra-language-options')) {
|
||||
languageSwitchers.forEach((switcher) => {
|
||||
closeSwitcher(switcher);
|
||||
});
|
||||
}
|
||||
});
|
||||
})();
|
||||
@@ -1,84 +0,0 @@
|
||||
// Hamburger menu for mobile navigation
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const menu = document.querySelector('.hextra-hamburger-menu');
|
||||
const sidebarContainer = document.querySelector('.hextra-sidebar-container');
|
||||
const mobileQuery = window.matchMedia('(max-width: 767px)');
|
||||
|
||||
function isMenuOpen() {
|
||||
return menu.querySelector('svg').classList.contains('open');
|
||||
}
|
||||
|
||||
// On mobile, the sidebar is off-screen so hide it from assistive tech
|
||||
function syncAriaHidden() {
|
||||
if (mobileQuery.matches) {
|
||||
sidebarContainer.setAttribute('aria-hidden', isMenuOpen() ? 'false' : 'true');
|
||||
} else {
|
||||
sidebarContainer.removeAttribute('aria-hidden');
|
||||
}
|
||||
}
|
||||
|
||||
// Set initial state
|
||||
syncAriaHidden();
|
||||
mobileQuery.addEventListener('change', syncAriaHidden);
|
||||
|
||||
function toggleMenu(options = {}) {
|
||||
const { focusOnOpen = true } = options;
|
||||
|
||||
// Toggle the hamburger menu
|
||||
menu.querySelector('svg').classList.toggle('open');
|
||||
|
||||
// When the menu is open, we want to show the navigation sidebar
|
||||
sidebarContainer.classList.toggle('hx:max-md:[transform:translate3d(0,-100%,0)]');
|
||||
sidebarContainer.classList.toggle('hx:max-md:[transform:translate3d(0,0,0)]');
|
||||
|
||||
// When the menu is open, we want to prevent the body from scrolling
|
||||
document.body.classList.toggle('hx:overflow-hidden');
|
||||
document.body.classList.toggle('hx:md:overflow-auto');
|
||||
|
||||
// Sync aria-expanded and aria-hidden
|
||||
const isOpen = isMenuOpen();
|
||||
menu.setAttribute('aria-expanded', isOpen ? 'true' : 'false');
|
||||
syncAriaHidden();
|
||||
|
||||
// Move focus into sidebar when opening, restore when closing
|
||||
if (isOpen) {
|
||||
if (focusOnOpen) {
|
||||
const firstFocusable = sidebarContainer.querySelector('a, button, input, [tabindex="0"]');
|
||||
if (firstFocusable) firstFocusable.focus();
|
||||
}
|
||||
} else {
|
||||
menu.focus();
|
||||
}
|
||||
}
|
||||
|
||||
menu.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
// Pointer-initiated clicks on mobile should not force focus into the search input,
|
||||
// which opens the software keyboard immediately.
|
||||
toggleMenu({ focusOnOpen: e.detail === 0 });
|
||||
});
|
||||
|
||||
// Close menu on Escape key (mobile only)
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape' && mobileQuery.matches && isMenuOpen()) {
|
||||
toggleMenu();
|
||||
}
|
||||
});
|
||||
|
||||
// Select all anchor tags in the sidebar container
|
||||
const sidebarLinks = sidebarContainer.querySelectorAll('a');
|
||||
|
||||
// Add click event listener to each anchor tag
|
||||
sidebarLinks.forEach(link => {
|
||||
link.addEventListener('click', (e) => {
|
||||
// Check if the href attribute contains a hash symbol (links to a heading)
|
||||
if (link.getAttribute('href') && link.getAttribute('href').startsWith('#')) {
|
||||
// Only dismiss overlay on mobile view
|
||||
if (window.innerWidth < 768) {
|
||||
toggleMenu();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,126 +0,0 @@
|
||||
(function () {
|
||||
const hiddenClass = "hx:hidden";
|
||||
const dropdownToggles = document.querySelectorAll(".hextra-nav-menu-toggle");
|
||||
const closeDropdown = (toggle, focusToggle = false) => {
|
||||
toggle.dataset.state = "closed";
|
||||
toggle.setAttribute("aria-expanded", "false");
|
||||
const menuItemsElement = toggle.nextElementSibling;
|
||||
menuItemsElement.classList.add(hiddenClass);
|
||||
if (focusToggle) {
|
||||
toggle.focus();
|
||||
}
|
||||
};
|
||||
|
||||
const openDropdown = (toggle, focusTarget = "none") => {
|
||||
// Close all other dropdowns first.
|
||||
dropdownToggles.forEach((otherToggle) => {
|
||||
if (otherToggle !== toggle) {
|
||||
closeDropdown(otherToggle);
|
||||
}
|
||||
});
|
||||
|
||||
toggle.dataset.state = "open";
|
||||
toggle.setAttribute("aria-expanded", "true");
|
||||
const menuItemsElement = toggle.nextElementSibling;
|
||||
|
||||
// Position dropdown centered with toggle.
|
||||
menuItemsElement.style.position = "absolute";
|
||||
menuItemsElement.style.top = "100%";
|
||||
menuItemsElement.style.left = "50%";
|
||||
menuItemsElement.style.transform = "translateX(-50%)";
|
||||
menuItemsElement.style.zIndex = "1000";
|
||||
menuItemsElement.classList.remove(hiddenClass);
|
||||
|
||||
if (focusTarget !== "none") {
|
||||
const items = Array.from(menuItemsElement.querySelectorAll('[role="menuitem"]'));
|
||||
if (items.length > 0) {
|
||||
const target = focusTarget === "last" ? items[items.length - 1] : items[0];
|
||||
target.focus();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
dropdownToggles.forEach((toggle) => {
|
||||
toggle.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
// Toggle current dropdown.
|
||||
const isOpen = toggle.dataset.state === "open";
|
||||
if (isOpen) {
|
||||
closeDropdown(toggle);
|
||||
} else {
|
||||
openDropdown(toggle);
|
||||
}
|
||||
});
|
||||
|
||||
toggle.addEventListener("keydown", (e) => {
|
||||
if (e.key === "ArrowDown") {
|
||||
e.preventDefault();
|
||||
openDropdown(toggle, "first");
|
||||
} else if (e.key === "ArrowUp") {
|
||||
e.preventDefault();
|
||||
openDropdown(toggle, "last");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
document.querySelectorAll(".hextra-nav-menu-items[role=menu]").forEach((menu) => {
|
||||
menu.addEventListener("keydown", (e) => {
|
||||
const items = Array.from(menu.querySelectorAll('[role="menuitem"]'));
|
||||
if (items.length === 0) return;
|
||||
|
||||
const currentIndex = items.indexOf(document.activeElement);
|
||||
let newIndex;
|
||||
|
||||
switch (e.key) {
|
||||
case "ArrowDown":
|
||||
e.preventDefault();
|
||||
newIndex = (currentIndex + 1) % items.length;
|
||||
items[newIndex].focus();
|
||||
break;
|
||||
case "ArrowUp":
|
||||
e.preventDefault();
|
||||
newIndex = (currentIndex - 1 + items.length) % items.length;
|
||||
items[newIndex].focus();
|
||||
break;
|
||||
case "Home":
|
||||
e.preventDefault();
|
||||
items[0].focus();
|
||||
break;
|
||||
case "End":
|
||||
e.preventDefault();
|
||||
items[items.length - 1].focus();
|
||||
break;
|
||||
case "Escape": {
|
||||
e.preventDefault();
|
||||
const toggle = menu.previousElementSibling;
|
||||
if (toggle) {
|
||||
closeDropdown(toggle, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Dismiss dropdown when clicking outside.
|
||||
document.addEventListener("click", (e) => {
|
||||
if (!e.target.closest(".hextra-nav-menu-toggle") && !e.target.closest(".hextra-nav-menu-items")) {
|
||||
dropdownToggles.forEach((toggle) => {
|
||||
closeDropdown(toggle);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Close dropdowns on escape key.
|
||||
document.addEventListener("keydown", (e) => {
|
||||
if (e.key === "Escape") {
|
||||
dropdownToggles.forEach((toggle) => {
|
||||
if (toggle.dataset.state === "open") {
|
||||
closeDropdown(toggle, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
})();
|
||||
@@ -1,172 +0,0 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// Pre-fetch markdown content for all copy buttons to avoid Safari NotAllowedError
|
||||
// Safari requires clipboard writes to happen synchronously within user gesture
|
||||
const copyButtons = document.querySelectorAll('.hextra-page-context-menu-copy');
|
||||
const contentCache = new Map();
|
||||
|
||||
// Pre-fetch content for each button on page load
|
||||
copyButtons.forEach(button => {
|
||||
const url = button.dataset.url;
|
||||
if (url) {
|
||||
fetch(url)
|
||||
.then(response => {
|
||||
if (response.ok) return response.text();
|
||||
throw new Error('Failed to fetch');
|
||||
})
|
||||
.then(markdown => contentCache.set(url, markdown))
|
||||
.catch(error => console.error('Failed to pre-fetch markdown:', error));
|
||||
}
|
||||
});
|
||||
|
||||
// Initialize copy buttons with synchronous clipboard access
|
||||
copyButtons.forEach(button => {
|
||||
button.addEventListener('click', () => {
|
||||
const url = button.dataset.url;
|
||||
const markdown = contentCache.get(url);
|
||||
|
||||
if (markdown) {
|
||||
// Synchronous clipboard write initiation - works in Safari
|
||||
navigator.clipboard.writeText(markdown)
|
||||
.then(() => {
|
||||
button.classList.add('copied');
|
||||
setTimeout(() => button.classList.remove('copied'), 1000);
|
||||
})
|
||||
.catch(error => console.error('Failed to copy markdown:', error));
|
||||
} else {
|
||||
// Fallback: fetch and copy (may fail in Safari if content not pre-fetched)
|
||||
fetch(url)
|
||||
.then(response => {
|
||||
if (!response.ok) throw new Error('Failed to fetch');
|
||||
return response.text();
|
||||
})
|
||||
.then(text => {
|
||||
contentCache.set(url, text);
|
||||
return navigator.clipboard.writeText(text);
|
||||
})
|
||||
.then(() => {
|
||||
button.classList.add('copied');
|
||||
setTimeout(() => button.classList.remove('copied'), 1000);
|
||||
})
|
||||
.catch(error => console.error('Failed to copy markdown:', error));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Initialize dropdown toggles
|
||||
const dropdownToggles = document.querySelectorAll('.hextra-page-context-menu-toggle');
|
||||
dropdownToggles.forEach(toggle => {
|
||||
const container = toggle.closest('.hextra-page-context-menu');
|
||||
const menu = container.querySelector('.hextra-page-context-menu-dropdown');
|
||||
const chevron = toggle.querySelector('[data-chevron]');
|
||||
|
||||
toggle.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
const isOpen = toggle.dataset.state === 'open';
|
||||
|
||||
// Close all other dropdowns first
|
||||
dropdownToggles.forEach(t => {
|
||||
if (t !== toggle) {
|
||||
t.dataset.state = 'closed';
|
||||
t.setAttribute('aria-expanded', 'false');
|
||||
const otherContainer = t.closest('.hextra-page-context-menu');
|
||||
const otherMenu = otherContainer.querySelector('.hextra-page-context-menu-dropdown');
|
||||
const otherChevron = t.querySelector('[data-chevron]');
|
||||
otherMenu.classList.add('hx:hidden');
|
||||
if (otherChevron) {
|
||||
otherChevron.style.transform = '';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Toggle current
|
||||
toggle.dataset.state = isOpen ? 'closed' : 'open';
|
||||
toggle.setAttribute('aria-expanded', isOpen ? 'false' : 'true');
|
||||
menu.classList.toggle('hx:hidden', isOpen);
|
||||
|
||||
// Rotate chevron icon
|
||||
if (chevron) {
|
||||
chevron.style.transform = isOpen ? '' : 'rotate(180deg)';
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Close dropdown when clicking outside
|
||||
document.addEventListener('click', (e) => {
|
||||
// Check if click is outside any dropdown container
|
||||
const isOutside = !e.target.closest('.hextra-page-context-menu');
|
||||
if (isOutside) {
|
||||
dropdownToggles.forEach(toggle => {
|
||||
toggle.dataset.state = 'closed';
|
||||
toggle.setAttribute('aria-expanded', 'false');
|
||||
const container = toggle.closest('.hextra-page-context-menu');
|
||||
const menu = container.querySelector('.hextra-page-context-menu-dropdown');
|
||||
const chevron = toggle.querySelector('[data-chevron]');
|
||||
menu.classList.add('hx:hidden');
|
||||
if (chevron) {
|
||||
chevron.style.transform = '';
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Close dropdown on Escape key and return focus to toggle
|
||||
document.addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Escape') {
|
||||
dropdownToggles.forEach(toggle => {
|
||||
if (toggle.dataset.state === 'open') {
|
||||
const container = toggle.closest('.hextra-page-context-menu');
|
||||
closeDropdown(container);
|
||||
toggle.focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Helper to close dropdown
|
||||
const closeDropdown = (container) => {
|
||||
if (!container) return;
|
||||
|
||||
const toggle = container.querySelector('.hextra-page-context-menu-toggle');
|
||||
const menu = container.querySelector('.hextra-page-context-menu-dropdown');
|
||||
|
||||
if (!toggle || !menu) return;
|
||||
|
||||
const chevron = toggle.querySelector('[data-chevron]');
|
||||
toggle.dataset.state = 'closed';
|
||||
toggle.setAttribute('aria-expanded', 'false');
|
||||
menu.classList.add('hx:hidden');
|
||||
if (chevron) {
|
||||
chevron.style.transform = '';
|
||||
}
|
||||
};
|
||||
|
||||
// Handle dropdown menu copy action
|
||||
document.querySelectorAll('.hextra-page-context-menu-dropdown button[data-action="copy"]').forEach(btn => {
|
||||
btn.addEventListener('click', async (e) => {
|
||||
e.stopPropagation();
|
||||
const container = btn.closest('.hextra-page-context-menu');
|
||||
if (!container) return;
|
||||
|
||||
const copyBtn = container.querySelector('.hextra-page-context-menu-copy');
|
||||
if (!copyBtn) return;
|
||||
|
||||
closeDropdown(container);
|
||||
copyBtn.click();
|
||||
});
|
||||
});
|
||||
|
||||
// Handle dropdown menu view action
|
||||
document.querySelectorAll('.hextra-page-context-menu-dropdown button[data-action="view"]').forEach(btn => {
|
||||
btn.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
const container = btn.closest('.hextra-page-context-menu');
|
||||
if (!container) return;
|
||||
|
||||
const url = btn.dataset.url;
|
||||
if (!url) return;
|
||||
|
||||
closeDropdown(container);
|
||||
window.open(url, '_blank', 'noopener,noreferrer');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,37 +0,0 @@
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
scrollToActiveItem();
|
||||
enableCollapsibles();
|
||||
});
|
||||
|
||||
function enableCollapsibles() {
|
||||
const buttons = document.querySelectorAll(".hextra-sidebar-collapsible-button");
|
||||
buttons.forEach(function (button) {
|
||||
button.addEventListener("click", function (e) {
|
||||
e.preventDefault();
|
||||
const list = button.closest('li');
|
||||
if (list) {
|
||||
list.classList.toggle("open");
|
||||
button.setAttribute('aria-expanded', list.classList.contains('open') ? 'true' : 'false');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function scrollToActiveItem() {
|
||||
const sidebarScrollbar = document.querySelector("aside.hextra-sidebar-container > .hextra-scrollbar");
|
||||
const activeItems = document.querySelectorAll(".hextra-sidebar-active-item");
|
||||
const visibleActiveItem = Array.from(activeItems).find(function (activeItem) {
|
||||
return activeItem.getBoundingClientRect().height > 0;
|
||||
});
|
||||
|
||||
if (!visibleActiveItem) {
|
||||
return;
|
||||
}
|
||||
|
||||
const yOffset = visibleActiveItem.clientHeight;
|
||||
const yDistance = visibleActiveItem.getBoundingClientRect().top - sidebarScrollbar.getBoundingClientRect().top;
|
||||
sidebarScrollbar.scrollTo({
|
||||
behavior: "instant",
|
||||
top: yDistance - yOffset
|
||||
});
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
function computeMenuTranslation(switcher, optionsElement) {
|
||||
// Calculate the position of a language options element.
|
||||
const switcherRect = switcher.getBoundingClientRect();
|
||||
|
||||
// Must be called before optionsElement.clientWidth.
|
||||
optionsElement.style.minWidth = `${Math.max(switcherRect.width, 50)}px`;
|
||||
|
||||
const isOnTop = switcher.dataset.location === 'top';
|
||||
const isOnBottom = switcher.dataset.location === 'bottom';
|
||||
const isOnBottomRight = switcher.dataset.location === 'bottom-right';
|
||||
const isRTL = document.documentElement.dir === 'rtl'
|
||||
|
||||
// Stuck on the left side of the switcher.
|
||||
let x = switcherRect.left;
|
||||
|
||||
if (isOnTop && !isRTL || isOnBottom && isRTL || isOnBottomRight && !isRTL) {
|
||||
// Stuck on the right side of the switcher.
|
||||
x = switcherRect.right - optionsElement.clientWidth;
|
||||
}
|
||||
|
||||
// Stuck on the top of the switcher.
|
||||
let y = switcherRect.top - window.innerHeight - 10;
|
||||
|
||||
if (isOnTop) {
|
||||
// Stuck on the bottom of the switcher.
|
||||
y = switcherRect.top - window.innerHeight + optionsElement.clientHeight + switcher.clientHeight + 4;
|
||||
}
|
||||
|
||||
return { x: x, y: y };
|
||||
}
|
||||
|
||||
function toggleMenu(switcher) {
|
||||
const optionsElement = switcher.nextElementSibling;
|
||||
|
||||
optionsElement.classList.toggle('hx:hidden');
|
||||
|
||||
// Calculate the position of a language options element.
|
||||
const translate = computeMenuTranslation(switcher, optionsElement);
|
||||
|
||||
optionsElement.style.transform = `translate3d(${translate.x}px, ${translate.y}px, 0)`;
|
||||
}
|
||||
|
||||
function resizeMenu(switcher) {
|
||||
const optionsElement = switcher.nextElementSibling;
|
||||
|
||||
if (optionsElement.classList.contains('hx:hidden')) return;
|
||||
|
||||
// Calculate the position of a language options element.
|
||||
const translate = computeMenuTranslation(switcher, optionsElement);
|
||||
|
||||
optionsElement.style.transform = `translate3d(${translate.x}px, ${translate.y}px, 0)`;
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
(function () {
|
||||
function updateGroup(container, index) {
|
||||
const tabs = Array.from(container.querySelectorAll('.hextra-tabs-toggle'));
|
||||
tabs.forEach((tab, i) => {
|
||||
tab.dataset.state = i === index ? 'selected' : '';
|
||||
if (i === index) {
|
||||
tab.setAttribute('aria-selected', 'true');
|
||||
tab.tabIndex = 0;
|
||||
} else {
|
||||
tab.setAttribute('aria-selected', 'false');
|
||||
tab.tabIndex = -1;
|
||||
}
|
||||
});
|
||||
const panelsContainer = container.parentElement.nextElementSibling;
|
||||
if (!panelsContainer) return;
|
||||
Array.from(panelsContainer.children).forEach((panel, i) => {
|
||||
panel.dataset.state = i === index ? 'selected' : '';
|
||||
panel.setAttribute('aria-hidden', i === index ? 'false' : 'true');
|
||||
if (i === index) {
|
||||
panel.tabIndex = 0;
|
||||
} else {
|
||||
panel.removeAttribute('tabindex');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const syncGroups = document.querySelectorAll('[data-tab-group]');
|
||||
|
||||
syncGroups.forEach((group) => {
|
||||
const key = encodeURIComponent(group.dataset.tabGroup);
|
||||
const saved = localStorage.getItem('hextra-tab-' + key);
|
||||
if (saved !== null) {
|
||||
updateGroup(group, parseInt(saved, 10));
|
||||
}
|
||||
});
|
||||
|
||||
document.querySelectorAll('.hextra-tabs-toggle').forEach((button) => {
|
||||
button.addEventListener('click', function (e) {
|
||||
const targetButton = e.currentTarget;
|
||||
const container = targetButton.parentElement;
|
||||
const index = Array.from(container.querySelectorAll('.hextra-tabs-toggle')).indexOf(
|
||||
targetButton
|
||||
);
|
||||
|
||||
if (container.dataset.tabGroup) {
|
||||
// Sync behavior: update all tab groups with the same name
|
||||
const tabGroupValue = container.dataset.tabGroup;
|
||||
const key = encodeURIComponent(tabGroupValue);
|
||||
document
|
||||
.querySelectorAll('[data-tab-group="' + tabGroupValue + '"]')
|
||||
.forEach((grp) => updateGroup(grp, index));
|
||||
localStorage.setItem('hextra-tab-' + key, index.toString());
|
||||
} else {
|
||||
// Non-sync behavior: update only this specific tab group
|
||||
updateGroup(container, index);
|
||||
}
|
||||
});
|
||||
|
||||
// Keyboard navigation for tabs
|
||||
button.addEventListener('keydown', function (e) {
|
||||
const container = button.parentElement;
|
||||
const tabs = Array.from(container.querySelectorAll('.hextra-tabs-toggle'));
|
||||
const currentIndex = tabs.indexOf(button);
|
||||
let newIndex;
|
||||
|
||||
switch (e.key) {
|
||||
case 'ArrowRight':
|
||||
case 'ArrowDown':
|
||||
e.preventDefault();
|
||||
newIndex = (currentIndex + 1) % tabs.length;
|
||||
break;
|
||||
case 'ArrowLeft':
|
||||
case 'ArrowUp':
|
||||
e.preventDefault();
|
||||
newIndex = (currentIndex - 1 + tabs.length) % tabs.length;
|
||||
break;
|
||||
case 'Home':
|
||||
e.preventDefault();
|
||||
newIndex = 0;
|
||||
break;
|
||||
case 'End':
|
||||
e.preventDefault();
|
||||
newIndex = tabs.length - 1;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
if (container.dataset.tabGroup) {
|
||||
const tabGroupValue = container.dataset.tabGroup;
|
||||
const key = encodeURIComponent(tabGroupValue);
|
||||
document
|
||||
.querySelectorAll('[data-tab-group="' + tabGroupValue + '"]')
|
||||
.forEach((grp) => updateGroup(grp, newIndex));
|
||||
localStorage.setItem('hextra-tab-' + key, newIndex.toString());
|
||||
} else {
|
||||
updateGroup(container, newIndex);
|
||||
}
|
||||
tabs[newIndex].focus();
|
||||
});
|
||||
});
|
||||
})();
|
||||
@@ -1,15 +0,0 @@
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
// Hugo task lists render bare checkboxes; provide an accessible name.
|
||||
document.querySelectorAll("main#content li > input[type='checkbox']").forEach(function (checkbox) {
|
||||
if (checkbox.hasAttribute("aria-label") || checkbox.hasAttribute("aria-labelledby")) {
|
||||
return;
|
||||
}
|
||||
var listItem = checkbox.closest("li");
|
||||
if (!listItem) return;
|
||||
|
||||
var labelText = listItem.textContent.replace(/\s+/g, " ").trim();
|
||||
if (labelText) {
|
||||
checkbox.setAttribute("aria-label", labelText);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1,112 +0,0 @@
|
||||
// Light / Dark theme toggle
|
||||
(function () {
|
||||
const defaultTheme = '{{ site.Params.theme.default | default `system`}}'
|
||||
const themes = ["light", "dark"];
|
||||
|
||||
const themeToggleButtons = document.querySelectorAll(".hextra-theme-toggle");
|
||||
const themeToggleOptions = document.querySelectorAll(".hextra-theme-toggle-options button[role=menuitemradio]");
|
||||
|
||||
function applyTheme(theme) {
|
||||
theme = themes.includes(theme) ? theme : "system";
|
||||
|
||||
themeToggleButtons.forEach((btn) => btn.parentElement.dataset.theme = theme );
|
||||
themeToggleOptions.forEach((option) => {
|
||||
option.setAttribute('aria-checked', option.dataset.item === theme ? 'true' : 'false');
|
||||
});
|
||||
|
||||
localStorage.setItem("color-theme", theme);
|
||||
}
|
||||
|
||||
function switchTheme(theme) {
|
||||
setTheme(theme);
|
||||
applyTheme(theme);
|
||||
}
|
||||
|
||||
const colorTheme = "color-theme" in localStorage ? localStorage.getItem("color-theme") : defaultTheme;
|
||||
switchTheme(colorTheme);
|
||||
|
||||
// Add click event handler to the menu items.
|
||||
themeToggleOptions.forEach((option) => {
|
||||
option.addEventListener("click", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
switchTheme(option.dataset.item);
|
||||
})
|
||||
})
|
||||
|
||||
// Add click event handler to the buttons
|
||||
themeToggleButtons.forEach((toggler) => {
|
||||
toggler.addEventListener("click", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
toggler.dataset.state = toggler.dataset.state === 'open' ? 'closed' : 'open';
|
||||
toggleMenu(toggler);
|
||||
const isOpen = toggler.dataset.state === 'open';
|
||||
toggler.setAttribute('aria-expanded', isOpen ? 'true' : 'false');
|
||||
|
||||
// Focus first menuitem when opening
|
||||
if (isOpen) {
|
||||
const firstItem = toggler.nextElementSibling.querySelector('button[role=menuitemradio]');
|
||||
if (firstItem) firstItem.focus();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
window.addEventListener("resize", () => themeToggleButtons.forEach(resizeMenu))
|
||||
|
||||
// Dismiss the menu when clicking outside
|
||||
document.addEventListener('click', (e) => {
|
||||
if (e.target.closest('.hextra-theme-toggle') === null) {
|
||||
themeToggleButtons.forEach((toggler) => {
|
||||
toggler.dataset.state = 'closed';
|
||||
toggler.setAttribute('aria-expanded', 'false');
|
||||
toggler.nextElementSibling.classList.add('hx:hidden');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Keyboard navigation for the theme menu
|
||||
document.querySelectorAll('.hextra-theme-toggle-options[role=menu]').forEach(function (menu) {
|
||||
menu.addEventListener('keydown', function (e) {
|
||||
const items = Array.from(menu.querySelectorAll('button[role=menuitemradio]'));
|
||||
const currentIndex = items.indexOf(document.activeElement);
|
||||
let newIndex;
|
||||
|
||||
switch (e.key) {
|
||||
case 'ArrowDown':
|
||||
e.preventDefault();
|
||||
newIndex = (currentIndex + 1) % items.length;
|
||||
items[newIndex].focus();
|
||||
break;
|
||||
case 'ArrowUp':
|
||||
e.preventDefault();
|
||||
newIndex = (currentIndex - 1 + items.length) % items.length;
|
||||
items[newIndex].focus();
|
||||
break;
|
||||
case 'Home':
|
||||
e.preventDefault();
|
||||
items[0].focus();
|
||||
break;
|
||||
case 'End':
|
||||
e.preventDefault();
|
||||
items[items.length - 1].focus();
|
||||
break;
|
||||
case 'Escape':
|
||||
e.preventDefault();
|
||||
var toggler = menu.previousElementSibling;
|
||||
toggler.dataset.state = 'closed';
|
||||
toggler.setAttribute('aria-expanded', 'false');
|
||||
menu.classList.add('hx:hidden');
|
||||
toggler.focus();
|
||||
break;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Listen for system theme changes
|
||||
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
|
||||
if (localStorage.getItem("color-theme") === "system") {
|
||||
setTheme("system");
|
||||
}
|
||||
});
|
||||
})();
|
||||
@@ -1,97 +0,0 @@
|
||||
/**
|
||||
* TOC Scroll - Highlights active TOC links based on visible headings
|
||||
*
|
||||
* Uses Intersection Observer to track heading visibility and applies
|
||||
* 'hextra-toc-active' class to corresponding TOC links. Selects the
|
||||
* topmost heading when multiple are visible.
|
||||
*
|
||||
* Requires: .hextra-toc element, matching heading IDs, toc.css styles
|
||||
*/
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const toc = document.querySelector(".hextra-toc");
|
||||
if (!toc) return;
|
||||
|
||||
const tocLinks = toc.querySelectorAll('a[href^="#"]');
|
||||
if (tocLinks.length === 0) return;
|
||||
|
||||
const headingIds = Array.from(tocLinks).map((link) => link.getAttribute("href").substring(1));
|
||||
|
||||
const headings = headingIds.map((id) => document.getElementById(decodeURIComponent(id))).filter(Boolean);
|
||||
if (headings.length === 0) return;
|
||||
|
||||
let currentActiveLink = null;
|
||||
let isHashNavigation = false;
|
||||
|
||||
// Create intersection observer
|
||||
const observer = new IntersectionObserver(
|
||||
(entries) => {
|
||||
// Skip observer updates during hash navigation
|
||||
if (isHashNavigation) return;
|
||||
|
||||
const visibleHeadings = entries.filter((entry) => entry.isIntersecting).map((entry) => entry.target);
|
||||
|
||||
if (visibleHeadings.length === 0) return;
|
||||
|
||||
// Find the heading closest to the top of the viewport
|
||||
const topMostHeading = visibleHeadings.reduce((closest, heading) => {
|
||||
const headingTop = heading.getBoundingClientRect().top;
|
||||
const closestTop = closest.getBoundingClientRect().top;
|
||||
return Math.abs(headingTop) < Math.abs(closestTop) ? heading : closest;
|
||||
});
|
||||
|
||||
// Encode the id and make it lowercase to match the TOC link
|
||||
const targetId = encodeURIComponent(topMostHeading.id).toLowerCase();
|
||||
const targetLink = toc.querySelector(`a[href="#${targetId}"]`);
|
||||
|
||||
if (targetLink && targetLink !== currentActiveLink) {
|
||||
// Remove active class from previous link
|
||||
if (currentActiveLink) {
|
||||
currentActiveLink.classList.remove("hextra-toc-active");
|
||||
currentActiveLink.removeAttribute("aria-current");
|
||||
}
|
||||
|
||||
// Add active class to current link
|
||||
targetLink.classList.add("hextra-toc-active");
|
||||
targetLink.setAttribute("aria-current", "location");
|
||||
currentActiveLink = targetLink;
|
||||
}
|
||||
},
|
||||
{
|
||||
rootMargin: "-20px 0px -60% 0px", // Adjust sensitivity
|
||||
threshold: [0, 0.1, 0.5, 1],
|
||||
}
|
||||
);
|
||||
|
||||
// Observe all headings
|
||||
headings.forEach((heading) => observer.observe(heading));
|
||||
|
||||
// Handle direct navigation to page with hash
|
||||
function handleHashNavigation() {
|
||||
const hash = window.location.hash; // already url encoded
|
||||
if (hash) {
|
||||
const targetLink = toc.querySelector(`a[href="${hash}"]`);
|
||||
if (targetLink) {
|
||||
// Disable observer temporarily during hash navigation
|
||||
isHashNavigation = true;
|
||||
|
||||
if (currentActiveLink) {
|
||||
currentActiveLink.classList.remove("hextra-toc-active");
|
||||
currentActiveLink.removeAttribute("aria-current");
|
||||
}
|
||||
targetLink.classList.add("hextra-toc-active");
|
||||
targetLink.setAttribute("aria-current", "location");
|
||||
currentActiveLink = targetLink;
|
||||
|
||||
// Re-enable observer after scroll settles
|
||||
setTimeout(() => { isHashNavigation = false; }, 500);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Handle hash changes navigation
|
||||
window.addEventListener("hashchange", handleHashNavigation);
|
||||
|
||||
// Handle initial load
|
||||
setTimeout(handleHashNavigation, 100);
|
||||
});
|
||||