From d1bc8db6548aa86cd4f3f3fadd1f2e9d6c8c9176 Mon Sep 17 00:00:00 2001 From: Simon Martens Date: Wed, 17 Sep 2025 10:05:19 +0200 Subject: [PATCH] count ontinuations --- GEMINI.md | 231 ++++ views/assets/scripts.js | 464 +++++++- views/assets/style.css | 2 +- .../routes/ausgabe/components/_bilder.gohtml | 41 - .../components/_fullwidth_layout.gohtml | 579 ---------- .../components/_inhaltsverzeichnis.gohtml | 231 ++-- .../components/_newspaper_layout.gohtml | 1001 ----------------- views/routes/kategorie/head.gohtml | 0 views/routes/kontakt/body.gohtml | 0 views/routes/ort/head.gohtml | 0 views/routes/search/head.gohtml | 0 views/transform/main.js | 945 +++++++++++++++- views/transform/site.css | 68 ++ 13 files changed, 1820 insertions(+), 1742 deletions(-) create mode 100644 GEMINI.md delete mode 100644 views/routes/ausgabe/components/_bilder.gohtml delete mode 100644 views/routes/ausgabe/components/_fullwidth_layout.gohtml create mode 100644 views/routes/kategorie/head.gohtml create mode 100644 views/routes/kontakt/body.gohtml create mode 100644 views/routes/ort/head.gohtml create mode 100644 views/routes/search/head.gohtml diff --git a/GEMINI.md b/GEMINI.md new file mode 100644 index 0000000..e892a76 --- /dev/null +++ b/GEMINI.md @@ -0,0 +1,231 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +KGPZ Web is a Go-based web application for serving historical newspaper data from the KGPZ (Königsberger Gelehrte und Politische Zeitung) digital archive. The application combines server-rendered HTML with HTMX for progressive enhancement, providing a modern web interface for browsing historical content. + +## Architecture + +The application follows a modular Go architecture: + +- **Main Application**: `kgpz_web.go` - Entry point and application lifecycle management +- **App Core**: `app/kgpz.go` - Core business logic and data processing +- **Controllers**: Route handlers for different content types (issues, agents, places, categories, search) +- **View Models**: Data structures for template rendering with pre-processed business logic (`viewmodels/`) +- **XML Models**: Data structures for parsing source XML files (`xmlmodels/`) +- **Providers**: External service integrations (Git, GND, XML parsing, search) +- **Templating**: Custom template engine with Go template integration and helper functions +- **Views**: Frontend assets and templates in `views/` directory + +### Key Components + +1. **Data Sources**: XML files from Git repository containing historical newspaper metadata +2. **Search**: Full-text search powered by Bleve search engine +3. **External Integrations**: GND (Gemeinsame Normdatei) for person metadata, Geonames for place data +4. **Template System**: Custom engine supporting layouts and partials with embedded filesystem and helper functions + +## Development Commands + +### Go Backend +```bash +# Run the application in development mode +go run kgpz_web.go + +# Build the application +go build -o kgpz_web kgpz_web.go + +# Run tests +go test ./helpers/xsdtime/ + +# Format code +go fmt ./... + +# Check for issues +go vet ./... +``` + +### Frontend Assets (from views/ directory) +```bash +cd views/ + +# Development server with hot reloading +npm run dev + +# Build production assets +npm run build + +# Build CSS with Tailwind +npm run tailwind + +# Build CSS with PostCSS +npm run css + +# Preview built assets +npm run preview +``` + +## Configuration + +The application uses JSON configuration files: +- `config.dev.json` - Development configuration (if exists) +- `config.json` - Default configuration (fallback) + +Key configuration options: +- `git_url`: Source repository URL for data +- `git_branch`: Branch to use for data +- `webhook_endpoint`: GitHub webhook endpoint for auto-updates +- `debug`: Enable debug mode and logging +- `watch`: Enable file watching for template hot-reloading + +## Data Flow + +1. **Startup**: Application clones/pulls Git repository with XML data +2. **Parsing**: XML files parsed into structured models (agents, places, works, issues) +3. **Enrichment**: External APIs (GND, Geonames) enrich metadata +4. **Indexing**: Full-text search index built using Bleve +5. **Serving**: HTTP server serves templated content with HTMX interactions + +## Key Dependencies + +- **Web Framework**: Fiber (high-performance HTTP framework) +- **Search**: Bleve (full-text search engine) +- **Git Operations**: go-git (Git repository operations) +- **Frontend**: HTMX + Tailwind CSS for progressive enhancement +- **Build Tools**: Vite for asset bundling, PostCSS for CSS processing + +## Template Structure + +Templates are embedded in the binary: +- **Layouts**: `views/layouts/` - Base page structures +- **Routes**: `views/routes/` - Page-specific templates +- **Assets**: `views/assets/` - Compiled CSS and static files + +The template system supports nested layouts and automatic reloading in development mode when `watch: true` is enabled. + +## Views Directory Structure + +The `views/` directory contains all frontend templates, assets, and build configuration: + +### Directory Layout +``` +views/ +├── layouts/ # Base templates and layouts +│ ├── components/ # Shared layout components (_header, _footer, _menu) +│ └── default/ # Default layout (root.gohtml) +├── routes/ # Page-specific templates +│ ├── akteure/ # Agents/People pages (body.gohtml, head.gohtml) +│ ├── ausgabe/ # Issue pages with components +│ │ └── components/ # Issue-specific components (_inhaltsverzeichnis, _bilder, etc.) +│ ├── components/ # Shared route components (_akteur.gohtml) +│ ├── datenschutz/ # Privacy policy +│ ├── edition/ # Edition pages +│ ├── kategorie/ # Category pages +│ ├── kontakt/ # Contact pages +│ ├── ort/ # Places pages +│ ├── search/ # Search pages +│ └── zitation/ # Citation pages +├── assets/ # Compiled output assets +│ ├── css/ # Compiled CSS files +│ ├── js/ # JavaScript libraries and compiled scripts +│ ├── fonts/ # Font files +│ ├── logo/ # Logo and favicon files +│ └── xslt/ # XSLT transformation files +├── public/ # Static public assets +├── transform/ # Source files for build process +│ ├── main.js # Main JavaScript entry point +│ └── site.css # Source CSS with Tailwind directives +└── node_modules/ # NPM dependencies +``` + +### Template System + +**Layout Templates** (`layouts/`): +- `default/root.gohtml`: Base HTML structure with head, HTMX, Alpine.js setup +- `components/_header.gohtml`: Site header with navigation +- `components/_footer.gohtml`: Site footer +- `components/_menu.gohtml`: Main navigation menu + +**Route Templates** (`routes/`): +Each route has dedicated `head.gohtml` and `body.gohtml` files following Go template conventions: +- Pages use German naming: `akteure` (agents), `ausgabe` (issues), `ort` (places), etc. +- Component partials prefixed with `_` (e.g., `_akteur.gohtml`, `_inhaltsverzeichnis.gohtml`) +- HTMX-powered interactions for dynamic content loading + +**Template Features**: +- Go template syntax with custom functions from `templating/engine.go` +- Block template inheritance system +- HTMX integration for progressive enhancement +- Conditional development/production asset loading +- Template helper functions for UI components (PageIcon, BeilagePageIcon) +- Pre-processed view models to minimize template logic + +### Frontend Assets + +**JavaScript Stack**: +- **HTMX**: Core interactivity and AJAX requests +- **Alpine.js**: Lightweight reactivity for UI components +- **Custom Extensions**: HTMX plugins for response targets, client-side templates, loading states +- **Build Tool**: Vite for module bundling and development server + +**CSS Stack**: +- **Tailwind CSS v4**: Utility-first CSS framework +- **PostCSS**: CSS processing pipeline +- **RemixIcon**: Icon font library +- **Custom Fonts**: Typography setup in `assets/css/fonts.css` + +**Build Process**: +- **Source**: `transform/main.js` and `transform/site.css` +- **Output**: Compiled to `assets/scripts.js` and `assets/style.css` +- **Vite Config**: Production build targeting ES modules +- **PostCSS Config**: Tailwind CSS processing + +### Asset Loading Strategy + +The root template conditionally loads assets based on environment: +- Development: Uses dev favicon, enables hot reloading +- Production: Optimized assets, production favicon +- Module imports: ES6 modules with `setup()` function from compiled scripts +- Deferred loading: HTMX and Alpine.js loaded with `defer` attribute + +## Template Architecture & Best Practices + +### View Model Philosophy +The application follows a **logic-in-Go, presentation-in-templates** approach: + +- **View Models** (`viewmodels/issue_view.go`): Pre-process all business logic, calculations, and data transformations +- **Templates**: Focus purely on presentation using pre-calculated data +- **Helper Functions** (`templating/engine.go`): Reusable UI components and formatting + +### Key View Model Features +- **Pre-calculated metadata**: Page icons, grid layouts, visibility flags +- **Grouped data structures**: Complex relationships resolved in Go +- **Template helpers**: `PageIcon()`, `BeilagePageIcon()` for consistent UI components + +### Template Organization +**Ausgabe (Issue) Templates**: +- `body.gohtml`: Main layout structure with conditional rendering +- `components/_inhaltsverzeichnis.gohtml`: Table of contents with pre-processed page data +- `components/_newspaper_layout.gohtml`: Newspaper page grid with absolute positioning +- `components/_bilder.gohtml`: Simple image gallery fallback +- Interactive highlighting system with intersection observer and scroll detection + +### JavaScript Integration +- **Progressive Enhancement**: HTMX + Alpine.js for interactivity +- **Real-time Highlighting**: Intersection Observer API with scroll fallback +- **Page Navigation**: Smooth scrolling with visibility detection +- **Responsive Design**: Mobile-optimized with proper touch interactions + +## Development Workflow + +1. Backend changes: Modify Go files, restart server +2. Template changes: Edit templates in `views/`, automatic reload if watching enabled +3. CSS changes: Run `npm run css` or `npm run tailwind` in views directory +4. JavaScript changes: Edit `transform/main.js`, run `npm run build` +5. Full rebuild: `go build` for backend, `npm run build` for frontend assets + +### Adding New Template Logic +1. **First**: Add business logic to view models in Go +2. **Second**: Create reusable template helper functions if needed +3. **Last**: Use pre-processed data in templates for presentation only \ No newline at end of file diff --git a/views/assets/scripts.js b/views/assets/scripts.js index e256647..bb9da21 100644 --- a/views/assets/scripts.js +++ b/views/assets/scripts.js @@ -1,39 +1,39 @@ -const p = "script[xslt-onload]", a = "xslt-template", u = "xslt-transformed", c = /* @__PURE__ */ new Map(); -function m() { - let t = htmx.findAll(p); - for (let e of t) - T(e); +const S = "script[xslt-onload]", w = "xslt-template", T = "xslt-transformed", f = /* @__PURE__ */ new Map(); +function b() { + let n = htmx.findAll(S); + for (let t of n) + A(t); } -function T(t) { - if (t.getAttribute(u) === "true" || !t.hasAttribute(a)) +function A(n) { + if (n.getAttribute(T) === "true" || !n.hasAttribute(w)) return; - let e = "#" + t.getAttribute(a), o = c.get(e); - if (!o) { - let n = htmx.find(e); - if (n) { - let l = n.innerHTML ? new DOMParser().parseFromString(n.innerHTML, "application/xml") : n.contentDocument; - o = new XSLTProcessor(), o.importStylesheet(l), c.set(e, o); + let t = "#" + n.getAttribute(w), e = f.get(t); + if (!e) { + let a = htmx.find(t); + if (a) { + let s = a.innerHTML ? new DOMParser().parseFromString(a.innerHTML, "application/xml") : a.contentDocument; + e = new XSLTProcessor(), e.importStylesheet(s), f.set(t, e); } else - throw new Error("Unknown XSLT template: " + e); + throw new Error("Unknown XSLT template: " + t); } - let i = new DOMParser().parseFromString(t.innerHTML, "application/xml"), s = o.transformToFragment(i, document), r = new XMLSerializer().serializeToString(s); - t.outerHTML = r; + let o = new DOMParser().parseFromString(n.innerHTML, "application/xml"), i = e.transformToFragment(o, document), r = new XMLSerializer().serializeToString(i); + n.outerHTML = r; } -function f() { - document.querySelectorAll("template[simple]").forEach((e) => { - let o = e.getAttribute("id"), i = e.content; +function L() { + document.querySelectorAll("template[simple]").forEach((t) => { + let e = t.getAttribute("id"), o = t.content; customElements.define( - o, + e, class extends HTMLElement { constructor() { - super(), this.appendChild(i.cloneNode(!0)), this.slots = this.querySelectorAll("slot"); + super(), this.appendChild(o.cloneNode(!0)), this.slots = this.querySelectorAll("slot"); } connectedCallback() { - let s = []; + let i = []; this.slots.forEach((r) => { - let n = r.getAttribute("name"), l = this.querySelector(`[slot="${n}"]`); - l && (r.replaceWith(l.cloneNode(!0)), s.push(l)); - }), s.forEach((r) => { + let a = r.getAttribute("name"), s = this.querySelector(`[slot="${a}"]`); + s && (r.replaceWith(s.cloneNode(!0)), i.push(s)); + }), i.forEach((r) => { r.remove(); }); } @@ -41,11 +41,415 @@ function f() { ); }); } -function d() { - m(), htmx.on("htmx:load", function(t) { - m(); - }), f(); +window.highlightObserver = window.highlightObserver || null; +window.currentPageContainers = window.currentPageContainers || []; +window.currentActiveIndex = window.currentActiveIndex || 0; +window.pageObserver = window.pageObserver || null; +window.scrollTimeout = window.scrollTimeout || null; +function B() { + window.highlightObserver && (window.highlightObserver.disconnect(), window.highlightObserver = null); + const n = document.querySelectorAll(".newspaper-page-container"); + window.highlightObserver = new IntersectionObserver( + (t) => { + x(); + }, + { + rootMargin: "-20% 0px -70% 0px" + } + ), n.forEach((t) => { + window.highlightObserver.observe(t); + }); +} +function x() { + const n = []; + document.querySelectorAll(".newspaper-page-container").forEach((e) => { + const o = e.getBoundingClientRect(), i = window.innerHeight, r = Math.max(o.top, 0), a = Math.min(o.bottom, i), s = Math.max(0, a - r), l = o.height, g = s / l >= 0.5, u = e.querySelector("img[data-page]"), m = u ? u.getAttribute("data-page") : "unknown"; + g && u && m && !n.includes(m) && n.push(m); + }), q(n), n.length > 0 && E(n); +} +function q(n) { + document.querySelectorAll(".continuation-entry").forEach((t) => { + t.style.display = "none"; + }), n.forEach((t) => { + const e = document.querySelector(`[data-page-container="${t}"]`); + e && e.querySelectorAll(".continuation-entry").forEach((i) => { + i.style.display = ""; + }); + }), k(n), M(); +} +function k(n) { + document.querySelectorAll(".work-title").forEach((t) => { + const e = t.getAttribute("data-short-title"); + e && (t.textContent = e); + }), n.forEach((t) => { + const e = document.querySelector(`[data-page-container="${t}"]`); + e && e.querySelectorAll(".work-title").forEach((i) => { + const r = i.getAttribute("data-full-title"); + r && r !== i.getAttribute("data-short-title") && (i.textContent = r); + }); + }); +} +function M() { + document.querySelectorAll(".page-entry").forEach((n) => { + const t = n.querySelectorAll(".inhalts-entry"); + let e = !1; + t.forEach((o) => { + window.getComputedStyle(o).display !== "none" && (e = !0); + }), e ? n.style.display = "" : n.style.display = "none"; + }); +} +function C(n) { + E([n]); +} +function E(n) { + console.log("markCurrentPagesInInhaltsverzeichnis called with:", n), document.querySelectorAll("[data-page-container]").forEach((e) => { + e.hasAttribute("data-beilage") ? (e.classList.remove("border-red-500"), e.classList.add("border-amber-400")) : (e.classList.remove("border-red-500"), e.classList.add("border-slate-300")); + }), document.querySelectorAll(".page-number-inhalts").forEach((e) => { + e.classList.remove("text-red-600", "font-bold"), e.classList.add("text-slate-700", "font-semibold"), e.style.textDecoration = "", e.style.pointerEvents = "", e.classList.contains("bg-blue-50") ? e.classList.add("hover:bg-blue-100") : e.classList.contains("bg-amber-50") && e.classList.add("hover:bg-amber-100"), !e.classList.contains("bg-amber-50") && !e.classList.contains("bg-blue-50") && e.classList.add("bg-blue-50"); + }), document.querySelectorAll(".inhalts-entry").forEach((e) => { + e.classList.add("hover:bg-slate-100"), e.style.cursor = ""; + }), document.querySelectorAll('.inhalts-entry a[href*="/"]').forEach((e) => { + e.classList.remove("no-underline"), e.classList.contains("bg-blue-50") && e.classList.add("hover:bg-blue-100"); + }); + const t = []; + n.forEach((e) => { + const o = document.querySelector( + `.page-number-inhalts[data-page-number="${e}"]` + ); + if (o) { + o.classList.remove( + "text-slate-700", + "hover:bg-blue-100", + "hover:bg-amber-100" + ), o.classList.add("text-red-600", "font-bold"), o.style.textDecoration = "none", o.style.pointerEvents = "none", t.push(o); + const i = document.querySelector(`[data-page-container="${e}"]`); + i && (i.classList.remove("border-slate-300", "border-amber-400"), i.classList.add("border-red-500")); + const r = o.closest(".page-entry"); + r && (r.querySelectorAll(".inhalts-entry").forEach((s) => { + s.classList.remove("hover:bg-slate-100"), s.style.cursor = "default"; + }), r.querySelectorAll('a[href*="/"]').forEach((s) => { + s.getAttribute("aria-current") === "page" && (s.style.textDecoration = "none", s.style.pointerEvents = "none", s.classList.add("no-underline"), s.classList.remove("hover:bg-blue-100")); + })); + } + }), t.length > 0 && H(t[0]), document.querySelectorAll(".page-indicator").forEach((e) => { + e.classList.remove("text-red-600", "font-bold"), e.classList.add("text-slate-600", "font-semibold"), e.classList.contains("bg-amber-50") || e.classList.add("bg-blue-50"); + }), n.forEach((e) => { + const o = document.querySelector(`.page-indicator[data-page="${e}"]`); + o && (o.classList.remove("text-slate-600"), o.classList.add("text-red-600", "font-bold")); + }); +} +function H(n) { + const t = n.closest(".lg\\:overflow-y-auto"); + if (t) { + const e = t.getBoundingClientRect(), o = n.getBoundingClientRect(), i = o.top < e.top, r = o.bottom > e.bottom; + (i || r) && n.scrollIntoView({ + behavior: "smooth", + block: "center" + }); + } +} +function R(n, t, e) { + const o = document.getElementById("pageModal"), i = document.getElementById("modalImage"); + i.src = n.src, i.alt = n.alt, o.classList.remove("hidden"), C(t); +} +function I() { + document.getElementById("pageModal").classList.add("hidden"); +} +function $() { + if (window.pageObserver && (window.pageObserver.disconnect(), window.pageObserver = null), window.currentPageContainers = Array.from( + document.querySelectorAll(".newspaper-page-container") + ), window.currentActiveIndex = 0, h(), document.querySelector(".newspaper-page-container")) { + let t = /* @__PURE__ */ new Set(); + window.pageObserver = new IntersectionObserver( + (e) => { + if (e.forEach((o) => { + const i = window.currentPageContainers.indexOf(o.target); + i !== -1 && (o.isIntersecting ? t.add(i) : t.delete(i)); + }), t.size > 0) { + const i = Array.from(t).sort((r, a) => r - a)[0]; + i !== window.currentActiveIndex && (window.currentActiveIndex = i, h()); + } + }, + { + rootMargin: "-20% 0px -70% 0px" + } + ), window.currentPageContainers.forEach((e) => { + window.pageObserver.observe(e); + }); + } +} +function O() { + if (window.currentActiveIndex > 0) { + let n = -1; + const t = []; + window.currentPageContainers.forEach((o, i) => { + const r = o.getBoundingClientRect(), a = window.innerHeight, s = Math.max(r.top, 0), l = Math.min(r.bottom, a), d = Math.max(0, l - s), g = r.height; + d / g >= 0.3 && t.push(i); + }); + const e = Math.min(...t); + for (let o = e - 1; o >= 0; o--) + if (!t.includes(o)) { + n = o; + break; + } + n === -1 && e > 0 && (n = e - 1), n >= 0 && (window.currentActiveIndex = n, window.currentPageContainers[window.currentActiveIndex].scrollIntoView({ + behavior: "smooth", + block: "start" + }), setTimeout(() => { + h(); + }, 100)); + } +} +function K() { + if (window.currentActiveIndex < window.currentPageContainers.length - 1) { + let n = -1; + const t = []; + window.currentPageContainers.forEach((o, i) => { + const r = o.getBoundingClientRect(), a = window.innerHeight, s = Math.max(r.top, 0), l = Math.min(r.bottom, a), d = Math.max(0, l - s), g = r.height; + d / g >= 0.3 && t.push(i); + }); + const e = Math.max(...t); + for (let o = e + 1; o < window.currentPageContainers.length; o++) + if (!t.includes(o)) { + n = o; + break; + } + n === -1 && e < window.currentPageContainers.length - 1 && (n = e + 1), n >= 0 && n < window.currentPageContainers.length && (window.currentActiveIndex = n, window.currentPageContainers[window.currentActiveIndex].scrollIntoView({ + behavior: "smooth", + block: "start" + }), setTimeout(() => { + h(); + }, 100)); + } +} +function V() { + if (P()) { + const t = document.querySelector("#newspaper-content .newspaper-page-container"); + t && t.scrollIntoView({ + behavior: "smooth", + block: "start" + }); + } else { + const t = document.querySelector('[class*="border-t-2 border-amber-200"]'); + t && t.scrollIntoView({ + behavior: "smooth", + block: "start" + }); + } +} +function P() { + const n = []; + window.currentPageContainers.forEach((t, e) => { + const o = t.getBoundingClientRect(), i = window.innerHeight, r = Math.max(o.top, 0), a = Math.min(o.bottom, i), s = Math.max(0, a - r), l = o.height; + s / l >= 0.3 && n.push(e); + }); + for (const t of n) { + const e = window.currentPageContainers[t]; + if (e && e.id && e.id.includes("beilage-")) + return !0; + } + return !1; +} +function h() { + const n = document.getElementById("prevPageBtn"), t = document.getElementById("nextPageBtn"), e = document.getElementById("beilageBtn"); + if (n && (window.currentActiveIndex <= 0 ? n.style.display = "none" : n.style.display = "flex"), t && (window.currentActiveIndex >= window.currentPageContainers.length - 1 ? t.style.display = "none" : t.style.display = "flex"), e) { + const o = P(), i = e.querySelector("i"); + o ? (e.title = "Zur Hauptausgabe", e.className = "w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-gray-100 hover:bg-gray-200 text-gray-700 hover:text-gray-800 border border-gray-300 transition-colors duration-200 flex items-center justify-center cursor-pointer", i && (i.className = "ri-file-text-line text-lg lg:text-xl")) : (e.title = "Zu Beilage", e.className = "w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-amber-100 hover:bg-amber-200 text-amber-700 hover:text-amber-800 border border-amber-300 transition-colors duration-200 flex items-center justify-center cursor-pointer", i && (i.className = "ri-attachment-line text-lg lg:text-xl")); + } +} +function D() { + const n = document.getElementById("shareLinkBtn"); + let t = ""; + if (window.currentActiveIndex !== void 0 && window.currentPageContainers && window.currentPageContainers[window.currentActiveIndex]) { + const i = window.currentPageContainers[window.currentActiveIndex].querySelector("[data-page]"); + i && (t = `#page-${i.getAttribute("data-page")}`); + } + const e = window.location.origin + window.location.pathname + t; + navigator.share ? navigator.share({ + title: document.title, + url: e + }).catch((o) => { + y(e, n); + }) : y(e, n); +} +function y(n, t) { + if (navigator.clipboard) + navigator.clipboard.writeText(n).then(() => { + c(t, "Link kopiert!"); + }).catch((e) => { + c(t, "Kopieren fehlgeschlagen"); + }); + else { + const e = document.createElement("textarea"); + e.value = n, document.body.appendChild(e), e.select(); + try { + const o = document.execCommand("copy"); + c(t, o ? "Link kopiert!" : "Kopieren fehlgeschlagen"); + } catch { + c(t, "Kopieren fehlgeschlagen"); + } finally { + document.body.removeChild(e); + } + } +} +function Z() { + const n = document.getElementById("citationBtn"), t = document.title || "KGPZ", e = window.location.href, o = (/* @__PURE__ */ new Date()).toLocaleDateString("de-DE"), i = `Königsberger Gelehrte und Politische Zeitung (KGPZ). ${t}. Digital verfügbar unter: ${e} (Zugriff: ${o}).`; + if (navigator.clipboard) + navigator.clipboard.writeText(i).then(() => { + c(n, "Zitation kopiert!"); + }).catch((r) => { + c(n, "Kopieren fehlgeschlagen"); + }); + else { + const r = document.createElement("textarea"); + r.value = i, document.body.appendChild(r), r.select(); + try { + const a = document.execCommand("copy"); + c(n, a ? "Zitation kopiert!" : "Kopieren fehlgeschlagen"); + } catch { + c(n, "Kopieren fehlgeschlagen"); + } finally { + document.body.removeChild(r); + } + } +} +function c(n, t) { + const e = document.querySelector(".simple-popup"); + e && e.remove(); + const o = document.createElement("div"); + o.className = "simple-popup", o.textContent = t, o.style.cssText = ` + position: fixed; + background: #374151; + color: white; + padding: 6px 12px; + border-radius: 6px; + font-size: 13px; + font-weight: 500; + z-index: 1000; + pointer-events: none; + opacity: 0; + transition: opacity 0.2s ease; + white-space: nowrap; + `; + const i = n.getBoundingClientRect(), r = window.innerHeight, a = window.innerWidth; + let s = i.left - 10, l = i.bottom + 8; + const d = 120, g = 32; + s + d > a && (s = i.right - d + 10), l + g > r && (l = i.top - g - 8), o.style.left = Math.max(5, s) + "px", o.style.top = Math.max(5, l) + "px", document.body.appendChild(o), setTimeout(() => { + o.style.opacity = "1"; + }, 10), setTimeout(() => { + o.style.opacity = "0", setTimeout(() => { + o.parentNode && o.remove(); + }, 200); + }, 2e3); +} +function v() { + const n = window.location.hash; + let t = "", e = null; + if (n.startsWith("#page-")) { + if (t = n.replace("#page-", ""), e = document.getElementById(`page-${t}`), !e) { + const o = document.querySelectorAll(".newspaper-page-container[data-pages]"); + for (const i of o) { + const r = i.getAttribute("data-pages"); + if (r && r.split(",").includes(t)) { + e = i; + break; + } + } + } + e || (e = document.getElementById(`beilage-1-page-${t}`) || document.getElementById(`beilage-2-page-${t}`) || document.querySelector(`[id*="beilage"][id*="page-${t}"]`)); + } else if (n.startsWith("#beilage-")) { + const o = n.match(/#beilage-(\d+)-page-(\d+)/); + if (o) { + const i = o[1]; + t = o[2], e = document.getElementById(`beilage-${i}-page-${t}`); + } + } + e && t && setTimeout(() => { + e.scrollIntoView({ + behavior: "smooth", + block: "start" + }), C(t); + }, 300); +} +function z(n, t, e = !1) { + let o = ""; + e ? o = `#beilage-1-page-${n}` : o = `#page-${n}`; + const i = window.location.origin + window.location.pathname + o; + if (navigator.clipboard) + navigator.clipboard.writeText(i).then(() => { + c(t, "Link kopiert!"); + }).catch((r) => { + c(t, "Kopieren fehlgeschlagen"); + }); + else { + const r = document.createElement("textarea"); + r.value = i, document.body.appendChild(r), r.select(); + try { + const a = document.execCommand("copy"); + c(t, a ? "Link kopiert!" : "Kopieren fehlgeschlagen"); + } catch { + c(t, "Kopieren fehlgeschlagen"); + } finally { + document.body.removeChild(r); + } + } +} +function _(n, t) { + const e = document.title || "KGPZ", o = `${window.location.origin}${window.location.pathname}#page-${n}`, i = (/* @__PURE__ */ new Date()).toLocaleDateString("de-DE"), r = `Königsberger Gelehrte und Politische Zeitung (KGPZ). ${e}, Seite ${n}. Digital verfügbar unter: ${o} (Zugriff: ${i}).`; + if (navigator.clipboard) + navigator.clipboard.writeText(r).then(() => { + c(t, "Zitation kopiert!"); + }).catch((a) => { + c(t, "Kopieren fehlgeschlagen"); + }); + else { + const a = document.createElement("textarea"); + a.value = r, document.body.appendChild(a), a.select(); + try { + const s = document.execCommand("copy"); + c(t, s ? "Zitation kopiert!" : "Kopieren fehlgeschlagen"); + } catch { + c(t, "Kopieren fehlgeschlagen"); + } finally { + document.body.removeChild(a); + } + } +} +function p() { + B(), $(), window.addEventListener("scroll", function() { + clearTimeout(window.scrollTimeout), window.scrollTimeout = setTimeout(() => { + x(), h(); + }, 50); + }), v(), window.addEventListener("hashchange", v), document.addEventListener("keydown", function(n) { + n.key === "Escape" && I(); + }); +} +window.enlargePage = R; +window.closeModal = I; +window.scrollToPreviousPage = O; +window.scrollToNextPage = K; +window.scrollToBeilage = V; +window.shareCurrentPage = D; +window.generateCitation = Z; +window.copyPagePermalink = z; +window.generatePageCitation = _; +function F() { + b(), L(), document.querySelector(".newspaper-page-container") && p(), htmx.on("htmx:load", function(n) { + b(); + }), document.body.addEventListener("htmx:afterSwap", function(n) { + setTimeout(() => { + document.querySelector(".newspaper-page-container") && p(); + }, 100); + }), document.body.addEventListener("htmx:afterSettle", function(n) { + setTimeout(() => { + document.querySelector(".newspaper-page-container") && p(); + }, 200); + }), document.body.addEventListener("htmx:load", function(n) { + setTimeout(() => { + document.querySelector(".newspaper-page-container") && p(); + }, 100); + }); } export { - d as setup + F as setup }; diff --git a/views/assets/style.css b/views/assets/style.css index dbd9add..adadcdc 100644 --- a/views/assets/style.css +++ b/views/assets/style.css @@ -1 +1 @@ -/*! tailwindcss v4.0.0 | MIT License | https://tailwindcss.com */@layer theme{:root{--font-sans:"Source Sans 3","Merriweather Sans",ui-sans-serif;--font-serif:"Merriweather",ui-serif;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(.971 .013 17.38);--color-red-100:oklch(.936 .032 17.717);--color-red-200:oklch(.885 .062 18.334);--color-red-300:oklch(.808 .114 19.571);--color-red-400:oklch(.704 .191 22.216);--color-red-500:oklch(.637 .237 25.331);--color-red-600:oklch(.577 .245 27.325);--color-red-700:oklch(.505 .213 27.518);--color-red-800:oklch(.444 .177 26.899);--color-red-900:oklch(.396 .141 25.723);--color-red-950:oklch(.258 .092 26.042);--color-orange-50:oklch(.98 .016 73.684);--color-orange-100:oklch(.954 .038 75.164);--color-orange-200:oklch(.901 .076 70.697);--color-orange-300:oklch(.837 .128 66.29);--color-orange-400:oklch(.75 .183 55.934);--color-orange-500:oklch(.705 .213 47.604);--color-orange-600:oklch(.646 .222 41.116);--color-orange-700:oklch(.553 .195 38.402);--color-orange-800:oklch(.47 .157 37.304);--color-orange-900:oklch(.408 .123 38.172);--color-orange-950:oklch(.266 .079 36.259);--color-amber-50:oklch(.987 .022 95.277);--color-amber-100:oklch(.962 .059 95.617);--color-amber-200:oklch(.924 .12 95.746);--color-amber-300:oklch(.879 .169 91.605);--color-amber-400:oklch(.828 .189 84.429);--color-amber-500:oklch(.769 .188 70.08);--color-amber-600:oklch(.666 .179 58.318);--color-amber-700:oklch(.555 .163 48.998);--color-amber-800:oklch(.473 .137 46.201);--color-amber-900:oklch(.414 .112 45.904);--color-amber-950:oklch(.279 .077 45.635);--color-yellow-50:oklch(.987 .026 102.212);--color-yellow-100:oklch(.973 .071 103.193);--color-yellow-200:oklch(.945 .129 101.54);--color-yellow-300:oklch(.905 .182 98.111);--color-yellow-400:oklch(.852 .199 91.936);--color-yellow-500:oklch(.795 .184 86.047);--color-yellow-600:oklch(.681 .162 75.834);--color-yellow-700:oklch(.554 .135 66.442);--color-yellow-800:oklch(.476 .114 61.907);--color-yellow-900:oklch(.421 .095 57.708);--color-yellow-950:oklch(.286 .066 53.813);--color-lime-50:oklch(.986 .031 120.757);--color-lime-100:oklch(.967 .067 122.328);--color-lime-200:oklch(.938 .127 124.321);--color-lime-300:oklch(.897 .196 126.665);--color-lime-400:oklch(.841 .238 128.85);--color-lime-500:oklch(.768 .233 130.85);--color-lime-600:oklch(.648 .2 131.684);--color-lime-700:oklch(.532 .157 131.589);--color-lime-800:oklch(.453 .124 130.933);--color-lime-900:oklch(.405 .101 131.063);--color-lime-950:oklch(.274 .072 132.109);--color-green-50:oklch(.982 .018 155.826);--color-green-100:oklch(.962 .044 156.743);--color-green-200:oklch(.925 .084 155.995);--color-green-300:oklch(.871 .15 154.449);--color-green-400:oklch(.792 .209 151.711);--color-green-500:oklch(.723 .219 149.579);--color-green-600:oklch(.627 .194 149.214);--color-green-700:oklch(.527 .154 150.069);--color-green-800:oklch(.448 .119 151.328);--color-green-900:oklch(.393 .095 152.535);--color-green-950:oklch(.266 .065 152.934);--color-emerald-50:oklch(.979 .021 166.113);--color-emerald-100:oklch(.95 .052 163.051);--color-emerald-200:oklch(.905 .093 164.15);--color-emerald-300:oklch(.845 .143 164.978);--color-emerald-400:oklch(.765 .177 163.223);--color-emerald-500:oklch(.696 .17 162.48);--color-emerald-600:oklch(.596 .145 163.225);--color-emerald-700:oklch(.508 .118 165.612);--color-emerald-800:oklch(.432 .095 166.913);--color-emerald-900:oklch(.378 .077 168.94);--color-emerald-950:oklch(.262 .051 172.552);--color-teal-50:oklch(.984 .014 180.72);--color-teal-100:oklch(.953 .051 180.801);--color-teal-200:oklch(.91 .096 180.426);--color-teal-300:oklch(.855 .138 181.071);--color-teal-400:oklch(.777 .152 181.912);--color-teal-500:oklch(.704 .14 182.503);--color-teal-600:oklch(.6 .118 184.704);--color-teal-700:oklch(.511 .096 186.391);--color-teal-800:oklch(.437 .078 188.216);--color-teal-900:oklch(.386 .063 188.416);--color-teal-950:oklch(.277 .046 192.524);--color-cyan-50:oklch(.984 .019 200.873);--color-cyan-100:oklch(.956 .045 203.388);--color-cyan-200:oklch(.917 .08 205.041);--color-cyan-300:oklch(.865 .127 207.078);--color-cyan-400:oklch(.789 .154 211.53);--color-cyan-500:oklch(.715 .143 215.221);--color-cyan-600:oklch(.609 .126 221.723);--color-cyan-700:oklch(.52 .105 223.128);--color-cyan-800:oklch(.45 .085 224.283);--color-cyan-900:oklch(.398 .07 227.392);--color-cyan-950:oklch(.302 .056 229.695);--color-sky-50:oklch(.977 .013 236.62);--color-sky-100:oklch(.951 .026 236.824);--color-sky-200:oklch(.901 .058 230.902);--color-sky-300:oklch(.828 .111 230.318);--color-sky-400:oklch(.746 .16 232.661);--color-sky-500:oklch(.685 .169 237.323);--color-sky-600:oklch(.588 .158 241.966);--color-sky-700:oklch(.5 .134 242.749);--color-sky-800:oklch(.443 .11 240.79);--color-sky-900:oklch(.391 .09 240.876);--color-sky-950:oklch(.293 .066 243.157);--color-blue-50:oklch(.97 .014 254.604);--color-blue-100:oklch(.932 .032 255.585);--color-blue-200:oklch(.882 .059 254.128);--color-blue-300:oklch(.809 .105 251.813);--color-blue-400:oklch(.707 .165 254.624);--color-blue-500:oklch(.623 .214 259.815);--color-blue-600:oklch(.546 .245 262.881);--color-blue-700:oklch(.488 .243 264.376);--color-blue-800:oklch(.424 .199 265.638);--color-blue-900:oklch(.379 .146 265.522);--color-blue-950:oklch(.282 .091 267.935);--color-indigo-50:oklch(.962 .018 272.314);--color-indigo-100:oklch(.93 .034 272.788);--color-indigo-200:oklch(.87 .065 274.039);--color-indigo-300:oklch(.785 .115 274.713);--color-indigo-400:oklch(.673 .182 276.935);--color-indigo-500:oklch(.585 .233 277.117);--color-indigo-600:oklch(.511 .262 276.966);--color-indigo-700:oklch(.457 .24 277.023);--color-indigo-800:oklch(.398 .195 277.366);--color-indigo-900:oklch(.359 .144 278.697);--color-indigo-950:oklch(.257 .09 281.288);--color-violet-50:oklch(.969 .016 293.756);--color-violet-100:oklch(.943 .029 294.588);--color-violet-200:oklch(.894 .057 293.283);--color-violet-300:oklch(.811 .111 293.571);--color-violet-400:oklch(.702 .183 293.541);--color-violet-500:oklch(.606 .25 292.717);--color-violet-600:oklch(.541 .281 293.009);--color-violet-700:oklch(.491 .27 292.581);--color-violet-800:oklch(.432 .232 292.759);--color-violet-900:oklch(.38 .189 293.745);--color-violet-950:oklch(.283 .141 291.089);--color-purple-50:oklch(.977 .014 308.299);--color-purple-100:oklch(.946 .033 307.174);--color-purple-200:oklch(.902 .063 306.703);--color-purple-300:oklch(.827 .119 306.383);--color-purple-400:oklch(.714 .203 305.504);--color-purple-500:oklch(.627 .265 303.9);--color-purple-600:oklch(.558 .288 302.321);--color-purple-700:oklch(.496 .265 301.924);--color-purple-800:oklch(.438 .218 303.724);--color-purple-900:oklch(.381 .176 304.987);--color-purple-950:oklch(.291 .149 302.717);--color-fuchsia-50:oklch(.977 .017 320.058);--color-fuchsia-100:oklch(.952 .037 318.852);--color-fuchsia-200:oklch(.903 .076 319.62);--color-fuchsia-300:oklch(.833 .145 321.434);--color-fuchsia-400:oklch(.74 .238 322.16);--color-fuchsia-500:oklch(.667 .295 322.15);--color-fuchsia-600:oklch(.591 .293 322.896);--color-fuchsia-700:oklch(.518 .253 323.949);--color-fuchsia-800:oklch(.452 .211 324.591);--color-fuchsia-900:oklch(.401 .17 325.612);--color-fuchsia-950:oklch(.293 .136 325.661);--color-pink-50:oklch(.971 .014 343.198);--color-pink-100:oklch(.948 .028 342.258);--color-pink-200:oklch(.899 .061 343.231);--color-pink-300:oklch(.823 .12 346.018);--color-pink-400:oklch(.718 .202 349.761);--color-pink-500:oklch(.656 .241 354.308);--color-pink-600:oklch(.592 .249 .584);--color-pink-700:oklch(.525 .223 3.958);--color-pink-800:oklch(.459 .187 3.815);--color-pink-900:oklch(.408 .153 2.432);--color-pink-950:oklch(.284 .109 3.907);--color-rose-50:oklch(.969 .015 12.422);--color-rose-100:oklch(.941 .03 12.58);--color-rose-200:oklch(.892 .058 10.001);--color-rose-300:oklch(.81 .117 11.638);--color-rose-400:oklch(.712 .194 13.428);--color-rose-500:oklch(.645 .246 16.439);--color-rose-600:oklch(.586 .253 17.585);--color-rose-700:oklch(.514 .222 16.935);--color-rose-800:oklch(.455 .188 13.697);--color-rose-900:oklch(.41 .159 10.272);--color-rose-950:oklch(.271 .105 12.094);--color-slate-50:oklch(.984 .003 247.858);--color-slate-100:oklch(.968 .007 247.896);--color-slate-200:oklch(.929 .013 255.508);--color-slate-300:oklch(.869 .022 252.894);--color-slate-400:oklch(.704 .04 256.788);--color-slate-500:oklch(.554 .046 257.417);--color-slate-600:oklch(.446 .043 257.281);--color-slate-700:oklch(.372 .044 257.287);--color-slate-800:oklch(.279 .041 260.031);--color-slate-900:oklch(.208 .042 265.755);--color-slate-950:oklch(.129 .042 264.695);--color-gray-50:oklch(.985 .002 247.839);--color-gray-100:oklch(.967 .003 264.542);--color-gray-200:oklch(.928 .006 264.531);--color-gray-300:oklch(.872 .01 258.338);--color-gray-400:oklch(.707 .022 261.325);--color-gray-500:oklch(.551 .027 264.364);--color-gray-600:oklch(.446 .03 256.802);--color-gray-700:oklch(.373 .034 259.733);--color-gray-800:oklch(.278 .033 256.848);--color-gray-900:oklch(.21 .034 264.665);--color-gray-950:oklch(.13 .028 261.692);--color-zinc-50:oklch(.985 0 0);--color-zinc-100:oklch(.967 .001 286.375);--color-zinc-200:oklch(.92 .004 286.32);--color-zinc-300:oklch(.871 .006 286.286);--color-zinc-400:oklch(.705 .015 286.067);--color-zinc-500:oklch(.552 .016 285.938);--color-zinc-600:oklch(.442 .017 285.786);--color-zinc-700:oklch(.37 .013 285.805);--color-zinc-800:oklch(.274 .006 286.033);--color-zinc-900:oklch(.21 .006 285.885);--color-zinc-950:oklch(.141 .005 285.823);--color-neutral-50:oklch(.985 0 0);--color-neutral-100:oklch(.97 0 0);--color-neutral-200:oklch(.922 0 0);--color-neutral-300:oklch(.87 0 0);--color-neutral-400:oklch(.708 0 0);--color-neutral-500:oklch(.556 0 0);--color-neutral-600:oklch(.439 0 0);--color-neutral-700:oklch(.371 0 0);--color-neutral-800:oklch(.269 0 0);--color-neutral-900:oklch(.205 0 0);--color-neutral-950:oklch(.145 0 0);--color-stone-50:oklch(.985 .001 106.423);--color-stone-100:oklch(.97 .001 106.424);--color-stone-200:oklch(.923 .003 48.717);--color-stone-300:oklch(.869 .005 56.366);--color-stone-400:oklch(.709 .01 56.259);--color-stone-500:oklch(.553 .013 58.071);--color-stone-600:oklch(.444 .011 73.639);--color-stone-700:oklch(.374 .01 67.558);--color-stone-800:oklch(.268 .007 34.298);--color-stone-900:oklch(.216 .006 56.043);--color-stone-950:oklch(.147 .004 49.25);--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-sm:40rem;--breakpoint-md:48rem;--breakpoint-lg:64rem;--breakpoint-xl:80rem;--breakpoint-2xl:96rem;--container-3xs:16rem;--container-2xs:18rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--text-9xl:8rem;--text-9xl--line-height:1;--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--leading-loose:2;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--radius-4xl:2rem;--shadow-2xs:0 1px #0000000d;--shadow-xs:0 1px 2px 0 #0000000d;--shadow-sm:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--shadow-md:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--shadow-lg:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--shadow-xl:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--shadow-2xl:0 25px 50px -12px #00000040;--inset-shadow-2xs:inset 0 1px #0000000d;--inset-shadow-xs:inset 0 1px 1px #0000000d;--inset-shadow-sm:inset 0 2px 4px #0000000d;--drop-shadow-xs:0 1px 1px #0000000d;--drop-shadow-sm:0 1px 2px #00000026;--drop-shadow-md:0 3px 3px #0000001f;--drop-shadow-lg:0 4px 4px #00000026;--drop-shadow-xl:0 9px 7px #0000001a;--drop-shadow-2xl:0 25px 25px #00000026;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--animate-bounce:bounce 1s infinite;--blur-xs:4px;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--blur-2xl:40px;--blur-3xl:64px;--perspective-dramatic:100px;--perspective-near:300px;--perspective-normal:500px;--perspective-midrange:800px;--perspective-distant:1200px;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-font-feature-settings:var(--font-sans--font-feature-settings);--default-font-variation-settings:var(--font-sans--font-variation-settings);--default-mono-font-family:var(--font-mono);--default-mono-font-feature-settings:var(--font-mono--font-feature-settings);--default-mono-font-variation-settings:var(--font-mono--font-variation-settings);--font-script:Rancho,ui-serif;--color-abyss:#0b1215;--color-shadow:#0f171f;--color-eclipse:#0b0b0b;--color-storm:#020c1a;--color-deep:#011122;--color-obsidian:#161616}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}body{line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1;color:color-mix(in oklab,currentColor 50%,transparent)}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,:after,:before,::backdrop{border-color:var(--color-gray-200,currentColor)}::file-selector-button{border-color:var(--color-gray-200,currentColor)}}@layer components{html{font-size:15.5px}body{background-color:var(--color-slate-50)}h1,h2,h3,h4{font-family:var(--font-serif);--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}a{-webkit-hyphens:none;hyphens:none;color:var(--color-slate-700);text-decoration-line:underline;text-decoration-style:dotted}@media (hover:hover){a:hover{color:var(--color-slate-900);text-decoration-style:solid}}ul{margin-block:calc(var(--spacing)*2)}li{margin-left:calc(var(--spacing)*14);list-style-type:disc}a[aria-current=page]{color:var(--color-red-500)!important}main{flex-grow:1;flex-shrink:0}}@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-2{top:calc(var(--spacing)*2)}.right-2{right:calc(var(--spacing)*2)}.z-40{z-index:40}.z-50{z-index:50}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.col-span-10{grid-column:span 10/span 10}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.\!m-0{margin:calc(var(--spacing)*0)!important}.mx-auto{margin-inline:auto}.my-4{margin-block:calc(var(--spacing)*4)}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-12{margin-top:calc(var(--spacing)*12)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-2{margin-left:calc(var(--spacing)*2)}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-auto{height:auto}.h-full{height:100%}.max-h-full{max-height:100%}.min-h-screen{min-height:100vh}.w-6{width:calc(var(--spacing)*6)}.w-6\/12{width:50%}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-14{width:calc(var(--spacing)*14)}.w-16{width:calc(var(--spacing)*16)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\(--breakpoint-2xl\){max-width:var(--breakpoint-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-full{max-width:100%}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.translate-2{--tw-translate-x:calc(var(--spacing)*2);--tw-translate-y:calc(var(--spacing)*2);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-x-\[-1\]{--tw-scale-x:-1;scale:var(--tw-scale-x)var(--tw-scale-y)}.transform{transform:var(--tw-rotate-x)var(--tw-rotate-y)var(--tw-rotate-z)var(--tw-skew-x)var(--tw-skew-y)}.cursor-pointer{cursor:pointer}.columns-1{columns:1}.break-inside-avoid{break-inside:avoid}.grid-flow-row-dense{grid-auto-flow:dense}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.grid-cols-subgrid{grid-template-columns:subgrid}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-8{gap:calc(var(--spacing)*8)}.gap-x-1{column-gap:calc(var(--spacing)*1)}.gap-x-2{column-gap:calc(var(--spacing)*2)}.gap-x-4{column-gap:calc(var(--spacing)*4)}.gap-x-8{column-gap:calc(var(--spacing)*8)}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*0)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*0)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.gap-y-2{row-gap:calc(var(--spacing)*2)}.gap-y-4{row-gap:calc(var(--spacing)*4)}.gap-y-10{row-gap:calc(var(--spacing)*10)}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-t-8{border-top-style:var(--tw-border-style);border-top-width:8px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-amber-200{border-color:var(--color-amber-200)}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-400{border-color:var(--color-amber-400)}.border-blue-300{border-color:var(--color-blue-300)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-300{border-color:var(--color-green-300)}.border-red-200{border-color:var(--color-red-200)}.border-red-500{border-color:var(--color-red-500)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-slate-600{border-color:var(--color-slate-600)}.border-stone-200{border-color:var(--color-stone-200)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-600{background-color:var(--color-amber-600)}.bg-black{background-color:var(--color-black)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-500{background-color:var(--color-red-500)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-stone-100{background-color:var(--color-stone-100)}.bg-white{background-color:var(--color-white)}.object-contain{object-fit:contain}.\!p-0{padding:calc(var(--spacing)*0)!important}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.px-0{padding-inline:calc(var(--spacing)*0)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-8{padding-block:calc(var(--spacing)*8)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-6{padding-top:calc(var(--spacing)*6)}.pt-8{padding-top:calc(var(--spacing)*8)}.pr-1{padding-right:calc(var(--spacing)*1)}.pb-16{padding-bottom:calc(var(--spacing)*16)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-right{text-align:right}.align-bottom{vertical-align:bottom}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-wrap{text-wrap:wrap}.hyphens-auto{-webkit-hyphens:auto;hyphens:auto}.whitespace-nowrap{white-space:nowrap}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-black{color:var(--color-black)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-green-700{color:var(--color-green-700)}.text-red-600{color:var(--color-red-600)}.text-red-800{color:var(--color-red-800)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-white{color:var(--color-white)}.italic{font-style:italic}.no-underline{text-decoration-line:none}.no-underline\!{text-decoration-line:none!important}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.decoration-slate-400{-webkit-text-decoration-color:var(--color-slate-400);text-decoration-color:var(--color-slate-400)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.\[a-zA-Z\:\\-\\\.\]{a-zA-Z:\-\.}.font-variant-small-caps{font-variant-caps:small-caps}.first\:mb-0:first-child{margin-bottom:calc(var(--spacing)*0)}@media (hover:hover){.hover\:scale-\[1\.02\]:hover{scale:1.02}.hover\:border-amber-300:hover{border-color:var(--color-amber-300)}.hover\:border-blue-300:hover{border-color:var(--color-blue-300)}.hover\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\:bg-amber-50:hover{background-color:var(--color-amber-50)}.hover\:bg-amber-100:hover{background-color:var(--color-amber-100)}.hover\:bg-amber-200:hover{background-color:var(--color-amber-200)}.hover\:bg-amber-700:hover{background-color:var(--color-amber-700)}.hover\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\:bg-blue-100:hover{background-color:var(--color-blue-100)}.hover\:bg-blue-200:hover{background-color:var(--color-blue-200)}.hover\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-gray-300:hover{background-color:var(--color-gray-300)}.hover\:bg-gray-700:hover{background-color:var(--color-gray-700)}.hover\:bg-green-100:hover{background-color:var(--color-green-100)}.hover\:bg-green-200:hover{background-color:var(--color-green-200)}.hover\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\:text-amber-600:hover{color:var(--color-amber-600)}.hover\:text-amber-800:hover{color:var(--color-amber-800)}.hover\:text-blue-600:hover{color:var(--color-blue-600)}.hover\:text-blue-700:hover{color:var(--color-blue-700)}.hover\:text-blue-800:hover{color:var(--color-blue-800)}.hover\:text-gray-800:hover{color:var(--color-gray-800)}.hover\:text-green-800:hover{color:var(--color-green-800)}.hover\:text-slate-700:hover{color:var(--color-slate-700)}.hover\:text-slate-900:hover{color:var(--color-slate-900)}.hover\:decoration-slate-600:hover{-webkit-text-decoration-color:var(--color-slate-600);text-decoration-color:var(--color-slate-600)}}@media (width>=64rem){.lg\:sticky{position:sticky}.lg\:top-8{top:calc(var(--spacing)*8)}.lg\:top-12{top:calc(var(--spacing)*12)}.lg\:top-24{top:calc(var(--spacing)*24)}.lg\:h-12{height:calc(var(--spacing)*12)}.lg\:max-h-\[calc\(100vh-2rem\)\]{max-height:calc(100vh - 2rem)}.lg\:max-h-\[calc\(100vh-6rem\)\]{max-height:calc(100vh - 6rem)}.lg\:w-1\/4{width:25%}.lg\:w-3\/4{width:75%}.lg\:w-3\/5{width:60%}.lg\:w-16{width:calc(var(--spacing)*16)}.lg\:w-20{width:calc(var(--spacing)*20)}.lg\:columns-2{columns:2}.lg\:flex-row{flex-direction:row}.lg\:overflow-y-auto{overflow-y:auto}.lg\:px-6{padding-inline:calc(var(--spacing)*6)}.lg\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media (width>=80rem){.xl\:w-1\/5{width:20%}.xl\:w-3\/5{width:60%}.xl\:w-4\/5{width:80%}.xl\:w-24{width:calc(var(--spacing)*24)}.xl\:px-8{padding-inline:calc(var(--spacing)*8)}}.\[\&\>div\]\:bg-slate-100>div{background-color:var(--color-slate-100)}.\[\&\>div\]\:px-4>div{padding-inline:calc(var(--spacing)*4)}.\[\&\>div\]\:py-3>div{padding-block:calc(var(--spacing)*3)}}body:before{content:"";z-index:-1;opacity:.4;background-image:url(skyscraper.webp);background-position:50%;background-repeat:repeat;background-size:100px 100px;position:fixed;top:-50%;right:-50%;bottom:-50%;left:-50%;transform:rotate(15deg)skew(10deg)scale(3)}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false;initial-value:rotateX(0)}@property --tw-rotate-y{syntax:"*";inherits:false;initial-value:rotateY(0)}@property --tw-rotate-z{syntax:"*";inherits:false;initial-value:rotateZ(0)}@property --tw-skew-x{syntax:"*";inherits:false;initial-value:skewX(0)}@property --tw-skew-y{syntax:"*";inherits:false;initial-value:skewY(0)}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false} +/*! tailwindcss v4.0.0 | MIT License | https://tailwindcss.com */@layer theme{:root{--font-sans:"Source Sans 3","Merriweather Sans",ui-sans-serif;--font-serif:"Merriweather",ui-serif;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(.971 .013 17.38);--color-red-100:oklch(.936 .032 17.717);--color-red-200:oklch(.885 .062 18.334);--color-red-300:oklch(.808 .114 19.571);--color-red-400:oklch(.704 .191 22.216);--color-red-500:oklch(.637 .237 25.331);--color-red-600:oklch(.577 .245 27.325);--color-red-700:oklch(.505 .213 27.518);--color-red-800:oklch(.444 .177 26.899);--color-red-900:oklch(.396 .141 25.723);--color-red-950:oklch(.258 .092 26.042);--color-orange-50:oklch(.98 .016 73.684);--color-orange-100:oklch(.954 .038 75.164);--color-orange-200:oklch(.901 .076 70.697);--color-orange-300:oklch(.837 .128 66.29);--color-orange-400:oklch(.75 .183 55.934);--color-orange-500:oklch(.705 .213 47.604);--color-orange-600:oklch(.646 .222 41.116);--color-orange-700:oklch(.553 .195 38.402);--color-orange-800:oklch(.47 .157 37.304);--color-orange-900:oklch(.408 .123 38.172);--color-orange-950:oklch(.266 .079 36.259);--color-amber-50:oklch(.987 .022 95.277);--color-amber-100:oklch(.962 .059 95.617);--color-amber-200:oklch(.924 .12 95.746);--color-amber-300:oklch(.879 .169 91.605);--color-amber-400:oklch(.828 .189 84.429);--color-amber-500:oklch(.769 .188 70.08);--color-amber-600:oklch(.666 .179 58.318);--color-amber-700:oklch(.555 .163 48.998);--color-amber-800:oklch(.473 .137 46.201);--color-amber-900:oklch(.414 .112 45.904);--color-amber-950:oklch(.279 .077 45.635);--color-yellow-50:oklch(.987 .026 102.212);--color-yellow-100:oklch(.973 .071 103.193);--color-yellow-200:oklch(.945 .129 101.54);--color-yellow-300:oklch(.905 .182 98.111);--color-yellow-400:oklch(.852 .199 91.936);--color-yellow-500:oklch(.795 .184 86.047);--color-yellow-600:oklch(.681 .162 75.834);--color-yellow-700:oklch(.554 .135 66.442);--color-yellow-800:oklch(.476 .114 61.907);--color-yellow-900:oklch(.421 .095 57.708);--color-yellow-950:oklch(.286 .066 53.813);--color-lime-50:oklch(.986 .031 120.757);--color-lime-100:oklch(.967 .067 122.328);--color-lime-200:oklch(.938 .127 124.321);--color-lime-300:oklch(.897 .196 126.665);--color-lime-400:oklch(.841 .238 128.85);--color-lime-500:oklch(.768 .233 130.85);--color-lime-600:oklch(.648 .2 131.684);--color-lime-700:oklch(.532 .157 131.589);--color-lime-800:oklch(.453 .124 130.933);--color-lime-900:oklch(.405 .101 131.063);--color-lime-950:oklch(.274 .072 132.109);--color-green-50:oklch(.982 .018 155.826);--color-green-100:oklch(.962 .044 156.743);--color-green-200:oklch(.925 .084 155.995);--color-green-300:oklch(.871 .15 154.449);--color-green-400:oklch(.792 .209 151.711);--color-green-500:oklch(.723 .219 149.579);--color-green-600:oklch(.627 .194 149.214);--color-green-700:oklch(.527 .154 150.069);--color-green-800:oklch(.448 .119 151.328);--color-green-900:oklch(.393 .095 152.535);--color-green-950:oklch(.266 .065 152.934);--color-emerald-50:oklch(.979 .021 166.113);--color-emerald-100:oklch(.95 .052 163.051);--color-emerald-200:oklch(.905 .093 164.15);--color-emerald-300:oklch(.845 .143 164.978);--color-emerald-400:oklch(.765 .177 163.223);--color-emerald-500:oklch(.696 .17 162.48);--color-emerald-600:oklch(.596 .145 163.225);--color-emerald-700:oklch(.508 .118 165.612);--color-emerald-800:oklch(.432 .095 166.913);--color-emerald-900:oklch(.378 .077 168.94);--color-emerald-950:oklch(.262 .051 172.552);--color-teal-50:oklch(.984 .014 180.72);--color-teal-100:oklch(.953 .051 180.801);--color-teal-200:oklch(.91 .096 180.426);--color-teal-300:oklch(.855 .138 181.071);--color-teal-400:oklch(.777 .152 181.912);--color-teal-500:oklch(.704 .14 182.503);--color-teal-600:oklch(.6 .118 184.704);--color-teal-700:oklch(.511 .096 186.391);--color-teal-800:oklch(.437 .078 188.216);--color-teal-900:oklch(.386 .063 188.416);--color-teal-950:oklch(.277 .046 192.524);--color-cyan-50:oklch(.984 .019 200.873);--color-cyan-100:oklch(.956 .045 203.388);--color-cyan-200:oklch(.917 .08 205.041);--color-cyan-300:oklch(.865 .127 207.078);--color-cyan-400:oklch(.789 .154 211.53);--color-cyan-500:oklch(.715 .143 215.221);--color-cyan-600:oklch(.609 .126 221.723);--color-cyan-700:oklch(.52 .105 223.128);--color-cyan-800:oklch(.45 .085 224.283);--color-cyan-900:oklch(.398 .07 227.392);--color-cyan-950:oklch(.302 .056 229.695);--color-sky-50:oklch(.977 .013 236.62);--color-sky-100:oklch(.951 .026 236.824);--color-sky-200:oklch(.901 .058 230.902);--color-sky-300:oklch(.828 .111 230.318);--color-sky-400:oklch(.746 .16 232.661);--color-sky-500:oklch(.685 .169 237.323);--color-sky-600:oklch(.588 .158 241.966);--color-sky-700:oklch(.5 .134 242.749);--color-sky-800:oklch(.443 .11 240.79);--color-sky-900:oklch(.391 .09 240.876);--color-sky-950:oklch(.293 .066 243.157);--color-blue-50:oklch(.97 .014 254.604);--color-blue-100:oklch(.932 .032 255.585);--color-blue-200:oklch(.882 .059 254.128);--color-blue-300:oklch(.809 .105 251.813);--color-blue-400:oklch(.707 .165 254.624);--color-blue-500:oklch(.623 .214 259.815);--color-blue-600:oklch(.546 .245 262.881);--color-blue-700:oklch(.488 .243 264.376);--color-blue-800:oklch(.424 .199 265.638);--color-blue-900:oklch(.379 .146 265.522);--color-blue-950:oklch(.282 .091 267.935);--color-indigo-50:oklch(.962 .018 272.314);--color-indigo-100:oklch(.93 .034 272.788);--color-indigo-200:oklch(.87 .065 274.039);--color-indigo-300:oklch(.785 .115 274.713);--color-indigo-400:oklch(.673 .182 276.935);--color-indigo-500:oklch(.585 .233 277.117);--color-indigo-600:oklch(.511 .262 276.966);--color-indigo-700:oklch(.457 .24 277.023);--color-indigo-800:oklch(.398 .195 277.366);--color-indigo-900:oklch(.359 .144 278.697);--color-indigo-950:oklch(.257 .09 281.288);--color-violet-50:oklch(.969 .016 293.756);--color-violet-100:oklch(.943 .029 294.588);--color-violet-200:oklch(.894 .057 293.283);--color-violet-300:oklch(.811 .111 293.571);--color-violet-400:oklch(.702 .183 293.541);--color-violet-500:oklch(.606 .25 292.717);--color-violet-600:oklch(.541 .281 293.009);--color-violet-700:oklch(.491 .27 292.581);--color-violet-800:oklch(.432 .232 292.759);--color-violet-900:oklch(.38 .189 293.745);--color-violet-950:oklch(.283 .141 291.089);--color-purple-50:oklch(.977 .014 308.299);--color-purple-100:oklch(.946 .033 307.174);--color-purple-200:oklch(.902 .063 306.703);--color-purple-300:oklch(.827 .119 306.383);--color-purple-400:oklch(.714 .203 305.504);--color-purple-500:oklch(.627 .265 303.9);--color-purple-600:oklch(.558 .288 302.321);--color-purple-700:oklch(.496 .265 301.924);--color-purple-800:oklch(.438 .218 303.724);--color-purple-900:oklch(.381 .176 304.987);--color-purple-950:oklch(.291 .149 302.717);--color-fuchsia-50:oklch(.977 .017 320.058);--color-fuchsia-100:oklch(.952 .037 318.852);--color-fuchsia-200:oklch(.903 .076 319.62);--color-fuchsia-300:oklch(.833 .145 321.434);--color-fuchsia-400:oklch(.74 .238 322.16);--color-fuchsia-500:oklch(.667 .295 322.15);--color-fuchsia-600:oklch(.591 .293 322.896);--color-fuchsia-700:oklch(.518 .253 323.949);--color-fuchsia-800:oklch(.452 .211 324.591);--color-fuchsia-900:oklch(.401 .17 325.612);--color-fuchsia-950:oklch(.293 .136 325.661);--color-pink-50:oklch(.971 .014 343.198);--color-pink-100:oklch(.948 .028 342.258);--color-pink-200:oklch(.899 .061 343.231);--color-pink-300:oklch(.823 .12 346.018);--color-pink-400:oklch(.718 .202 349.761);--color-pink-500:oklch(.656 .241 354.308);--color-pink-600:oklch(.592 .249 .584);--color-pink-700:oklch(.525 .223 3.958);--color-pink-800:oklch(.459 .187 3.815);--color-pink-900:oklch(.408 .153 2.432);--color-pink-950:oklch(.284 .109 3.907);--color-rose-50:oklch(.969 .015 12.422);--color-rose-100:oklch(.941 .03 12.58);--color-rose-200:oklch(.892 .058 10.001);--color-rose-300:oklch(.81 .117 11.638);--color-rose-400:oklch(.712 .194 13.428);--color-rose-500:oklch(.645 .246 16.439);--color-rose-600:oklch(.586 .253 17.585);--color-rose-700:oklch(.514 .222 16.935);--color-rose-800:oklch(.455 .188 13.697);--color-rose-900:oklch(.41 .159 10.272);--color-rose-950:oklch(.271 .105 12.094);--color-slate-50:oklch(.984 .003 247.858);--color-slate-100:oklch(.968 .007 247.896);--color-slate-200:oklch(.929 .013 255.508);--color-slate-300:oklch(.869 .022 252.894);--color-slate-400:oklch(.704 .04 256.788);--color-slate-500:oklch(.554 .046 257.417);--color-slate-600:oklch(.446 .043 257.281);--color-slate-700:oklch(.372 .044 257.287);--color-slate-800:oklch(.279 .041 260.031);--color-slate-900:oklch(.208 .042 265.755);--color-slate-950:oklch(.129 .042 264.695);--color-gray-50:oklch(.985 .002 247.839);--color-gray-100:oklch(.967 .003 264.542);--color-gray-200:oklch(.928 .006 264.531);--color-gray-300:oklch(.872 .01 258.338);--color-gray-400:oklch(.707 .022 261.325);--color-gray-500:oklch(.551 .027 264.364);--color-gray-600:oklch(.446 .03 256.802);--color-gray-700:oklch(.373 .034 259.733);--color-gray-800:oklch(.278 .033 256.848);--color-gray-900:oklch(.21 .034 264.665);--color-gray-950:oklch(.13 .028 261.692);--color-zinc-50:oklch(.985 0 0);--color-zinc-100:oklch(.967 .001 286.375);--color-zinc-200:oklch(.92 .004 286.32);--color-zinc-300:oklch(.871 .006 286.286);--color-zinc-400:oklch(.705 .015 286.067);--color-zinc-500:oklch(.552 .016 285.938);--color-zinc-600:oklch(.442 .017 285.786);--color-zinc-700:oklch(.37 .013 285.805);--color-zinc-800:oklch(.274 .006 286.033);--color-zinc-900:oklch(.21 .006 285.885);--color-zinc-950:oklch(.141 .005 285.823);--color-neutral-50:oklch(.985 0 0);--color-neutral-100:oklch(.97 0 0);--color-neutral-200:oklch(.922 0 0);--color-neutral-300:oklch(.87 0 0);--color-neutral-400:oklch(.708 0 0);--color-neutral-500:oklch(.556 0 0);--color-neutral-600:oklch(.439 0 0);--color-neutral-700:oklch(.371 0 0);--color-neutral-800:oklch(.269 0 0);--color-neutral-900:oklch(.205 0 0);--color-neutral-950:oklch(.145 0 0);--color-stone-50:oklch(.985 .001 106.423);--color-stone-100:oklch(.97 .001 106.424);--color-stone-200:oklch(.923 .003 48.717);--color-stone-300:oklch(.869 .005 56.366);--color-stone-400:oklch(.709 .01 56.259);--color-stone-500:oklch(.553 .013 58.071);--color-stone-600:oklch(.444 .011 73.639);--color-stone-700:oklch(.374 .01 67.558);--color-stone-800:oklch(.268 .007 34.298);--color-stone-900:oklch(.216 .006 56.043);--color-stone-950:oklch(.147 .004 49.25);--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-sm:40rem;--breakpoint-md:48rem;--breakpoint-lg:64rem;--breakpoint-xl:80rem;--breakpoint-2xl:96rem;--container-3xs:16rem;--container-2xs:18rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--text-9xl:8rem;--text-9xl--line-height:1;--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--leading-loose:2;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--radius-4xl:2rem;--shadow-2xs:0 1px #0000000d;--shadow-xs:0 1px 2px 0 #0000000d;--shadow-sm:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--shadow-md:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--shadow-lg:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--shadow-xl:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--shadow-2xl:0 25px 50px -12px #00000040;--inset-shadow-2xs:inset 0 1px #0000000d;--inset-shadow-xs:inset 0 1px 1px #0000000d;--inset-shadow-sm:inset 0 2px 4px #0000000d;--drop-shadow-xs:0 1px 1px #0000000d;--drop-shadow-sm:0 1px 2px #00000026;--drop-shadow-md:0 3px 3px #0000001f;--drop-shadow-lg:0 4px 4px #00000026;--drop-shadow-xl:0 9px 7px #0000001a;--drop-shadow-2xl:0 25px 25px #00000026;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--animate-bounce:bounce 1s infinite;--blur-xs:4px;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--blur-2xl:40px;--blur-3xl:64px;--perspective-dramatic:100px;--perspective-near:300px;--perspective-normal:500px;--perspective-midrange:800px;--perspective-distant:1200px;--aspect-video:16/9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-font-feature-settings:var(--font-sans--font-feature-settings);--default-font-variation-settings:var(--font-sans--font-variation-settings);--default-mono-font-family:var(--font-mono);--default-mono-font-feature-settings:var(--font-mono--font-feature-settings);--default-mono-font-variation-settings:var(--font-mono--font-variation-settings);--font-script:Rancho,ui-serif;--color-abyss:#0b1215;--color-shadow:#0f171f;--color-eclipse:#0b0b0b;--color-storm:#020c1a;--color-deep:#011122;--color-obsidian:#161616}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}body{line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1;color:color-mix(in oklab,currentColor 50%,transparent)}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,:after,:before,::backdrop{border-color:var(--color-gray-200,currentColor)}::file-selector-button{border-color:var(--color-gray-200,currentColor)}}@layer components{html{font-size:15.5px}body{background-color:var(--color-slate-50)}h1,h2,h3,h4{font-family:var(--font-serif);--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}a{-webkit-hyphens:none;hyphens:none;color:var(--color-slate-700);text-decoration-line:underline;text-decoration-style:dotted}@media (hover:hover){a:hover{color:var(--color-slate-900);text-decoration-style:solid}}ul{margin-block:calc(var(--spacing)*2)}li{margin-left:calc(var(--spacing)*14);list-style-type:disc}a[aria-current=page]{color:var(--color-red-500)!important}main{flex-grow:1;flex-shrink:0}.newspaper-page-container{margin-bottom:2rem}.newspaper-page-container .absolute .page-indicator{pointer-events:auto;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}@media (width<=768px){.newspaper-page-container .absolute{transform:scale(.9)}}.single-page{justify-content:center;display:flex}.single-page .newspaper-page-image{width:100%;max-width:min(400px,100%);height:auto}@media (width>=1280px){.single-page .newspaper-page-image{max-width:min(600px,100%)}}@media (width>=1536px){.single-page .newspaper-page-image{max-width:min(700px,100%)}}@media (width<=640px){.single-page .newspaper-page-image{max-width:100%}}button#prevPageBtn:hover:not([style*="display: none"]),button#nextPageBtn:hover,button#beilageBtn:hover{color:#374151!important;background-color:#d1d5db!important}button#beilageBtn:hover{color:#92400e!important;background-color:#fed7aa!important}}@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.top-2{top:calc(var(--spacing)*2)}.right-2{right:calc(var(--spacing)*2)}.z-50{z-index:50}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.col-span-10{grid-column:span 10/span 10}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.\!m-0{margin:calc(var(--spacing)*0)!important}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.my-4{margin-block:calc(var(--spacing)*4)}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-12{margin-top:calc(var(--spacing)*12)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-2{margin-left:calc(var(--spacing)*2)}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1{height:calc(var(--spacing)*1)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-full{height:100%}.max-h-full{max-height:100%}.min-h-screen{min-height:100vh}.w-6{width:calc(var(--spacing)*6)}.w-6\/12{width:50%}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-14{width:calc(var(--spacing)*14)}.w-16{width:calc(var(--spacing)*16)}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.max-w-\(--breakpoint-2xl\){max-width:var(--breakpoint-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-full{max-width:100%}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.translate-2{--tw-translate-x:calc(var(--spacing)*2);--tw-translate-y:calc(var(--spacing)*2);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-x-\[-1\]{--tw-scale-x:-1;scale:var(--tw-scale-x)var(--tw-scale-y)}.transform{transform:var(--tw-rotate-x)var(--tw-rotate-y)var(--tw-rotate-z)var(--tw-skew-x)var(--tw-skew-y)}.cursor-pointer{cursor:pointer}.columns-1{columns:1}.break-inside-avoid{break-inside:avoid}.grid-flow-row-dense{grid-auto-flow:dense}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-11{grid-template-columns:repeat(11,minmax(0,1fr))}.grid-cols-subgrid{grid-template-columns:subgrid}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-8{gap:calc(var(--spacing)*8)}.gap-x-1{column-gap:calc(var(--spacing)*1)}.gap-x-2{column-gap:calc(var(--spacing)*2)}.gap-x-4{column-gap:calc(var(--spacing)*4)}.gap-x-8{column-gap:calc(var(--spacing)*8)}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*0)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*0)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.gap-y-2{row-gap:calc(var(--spacing)*2)}.gap-y-4{row-gap:calc(var(--spacing)*4)}.gap-y-10{row-gap:calc(var(--spacing)*10)}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-t-8{border-top-style:var(--tw-border-style);border-top-width:8px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-amber-200{border-color:var(--color-amber-200)}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-400{border-color:var(--color-amber-400)}.border-blue-300{border-color:var(--color-blue-300)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-300{border-color:var(--color-green-300)}.border-red-200{border-color:var(--color-red-200)}.border-red-500{border-color:var(--color-red-500)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-slate-600{border-color:var(--color-slate-600)}.border-stone-200{border-color:var(--color-stone-200)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-black{background-color:var(--color-black)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-stone-100{background-color:var(--color-stone-100)}.bg-white{background-color:var(--color-white)}.object-contain{object-fit:contain}.\!p-0{padding:calc(var(--spacing)*0)!important}.p-1{padding:calc(var(--spacing)*1)}.p-4{padding:calc(var(--spacing)*4)}.px-0{padding-inline:calc(var(--spacing)*0)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-8{padding-block:calc(var(--spacing)*8)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-6{padding-top:calc(var(--spacing)*6)}.pt-8{padding-top:calc(var(--spacing)*8)}.pr-1{padding-right:calc(var(--spacing)*1)}.pb-16{padding-bottom:calc(var(--spacing)*16)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-right{text-align:right}.align-bottom{vertical-align:bottom}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-wrap{text-wrap:wrap}.hyphens-auto{-webkit-hyphens:auto;hyphens:auto}.whitespace-nowrap{white-space:nowrap}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-black{color:var(--color-black)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-green-700{color:var(--color-green-700)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-white{color:var(--color-white)}.italic{font-style:italic}.no-underline{text-decoration-line:none}.no-underline\!{text-decoration-line:none!important}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.decoration-slate-400{-webkit-text-decoration-color:var(--color-slate-400);text-decoration-color:var(--color-slate-400)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.\[a-zA-Z\:\\-\\\.\]{a-zA-Z:\-\.}.font-variant-small-caps{font-variant-caps:small-caps}.first\:mb-0:first-child{margin-bottom:calc(var(--spacing)*0)}@media (hover:hover){.hover\:scale-\[1\.02\]:hover{scale:1.02}.hover\:border-amber-300:hover{border-color:var(--color-amber-300)}.hover\:border-blue-300:hover{border-color:var(--color-blue-300)}.hover\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\:bg-amber-50:hover{background-color:var(--color-amber-50)}.hover\:bg-amber-100:hover{background-color:var(--color-amber-100)}.hover\:bg-amber-200:hover{background-color:var(--color-amber-200)}.hover\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\:bg-blue-100:hover{background-color:var(--color-blue-100)}.hover\:bg-blue-200:hover{background-color:var(--color-blue-200)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-gray-300:hover{background-color:var(--color-gray-300)}.hover\:bg-green-100:hover{background-color:var(--color-green-100)}.hover\:bg-green-200:hover{background-color:var(--color-green-200)}.hover\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\:text-amber-600:hover{color:var(--color-amber-600)}.hover\:text-amber-800:hover{color:var(--color-amber-800)}.hover\:text-blue-600:hover{color:var(--color-blue-600)}.hover\:text-blue-700:hover{color:var(--color-blue-700)}.hover\:text-blue-800:hover{color:var(--color-blue-800)}.hover\:text-gray-800:hover{color:var(--color-gray-800)}.hover\:text-green-800:hover{color:var(--color-green-800)}.hover\:text-slate-700:hover{color:var(--color-slate-700)}.hover\:text-slate-900:hover{color:var(--color-slate-900)}.hover\:decoration-slate-600:hover{-webkit-text-decoration-color:var(--color-slate-600);text-decoration-color:var(--color-slate-600)}}@media (width>=64rem){.lg\:sticky{position:sticky}.lg\:top-8{top:calc(var(--spacing)*8)}.lg\:top-12{top:calc(var(--spacing)*12)}.lg\:h-12{height:calc(var(--spacing)*12)}.lg\:max-h-\[calc\(100vh-2rem\)\]{max-height:calc(100vh - 2rem)}.lg\:w-1\/4{width:25%}.lg\:w-3\/5{width:60%}.lg\:w-16{width:calc(var(--spacing)*16)}.lg\:w-20{width:calc(var(--spacing)*20)}.lg\:columns-2{columns:2}.lg\:flex-row{flex-direction:row}.lg\:overflow-y-auto{overflow-y:auto}.lg\:px-6{padding-inline:calc(var(--spacing)*6)}.lg\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media (width>=80rem){.xl\:w-1\/5{width:20%}.xl\:w-3\/5{width:60%}.xl\:w-24{width:calc(var(--spacing)*24)}.xl\:px-8{padding-inline:calc(var(--spacing)*8)}}.\[\&\>div\]\:bg-slate-100>div{background-color:var(--color-slate-100)}.\[\&\>div\]\:px-4>div{padding-inline:calc(var(--spacing)*4)}.\[\&\>div\]\:py-3>div{padding-block:calc(var(--spacing)*3)}}body:before{content:"";z-index:-1;opacity:.4;background-image:url(skyscraper.webp);background-position:50%;background-repeat:repeat;background-size:100px 100px;position:fixed;top:-50%;right:-50%;bottom:-50%;left:-50%;transform:rotate(15deg)skew(10deg)scale(3)}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false;initial-value:rotateX(0)}@property --tw-rotate-y{syntax:"*";inherits:false;initial-value:rotateY(0)}@property --tw-rotate-z{syntax:"*";inherits:false;initial-value:rotateZ(0)}@property --tw-skew-x{syntax:"*";inherits:false;initial-value:skewX(0)}@property --tw-skew-y{syntax:"*";inherits:false;initial-value:skewY(0)}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false} diff --git a/views/routes/ausgabe/components/_bilder.gohtml b/views/routes/ausgabe/components/_bilder.gohtml deleted file mode 100644 index a70abf7..0000000 --- a/views/routes/ausgabe/components/_bilder.gohtml +++ /dev/null @@ -1,41 +0,0 @@ -{{ $model := .model }} -{{ $images := $model.Images }} -{{ if $images.HasImages }} -
-

Seiten der Ausgabe

- - {{- if $images.MainPages }} -
-

Hauptausgabe

-
- {{- range $images.MainPages -}} - {{- if .Available -}} -
-
Seite {{ .PageNumber }}
- Seite {{ .PageNumber }} -
- {{- end -}} - {{- end -}} -
-
- {{- end }} - - {{- range $beilageNum, $pages := $images.AdditionalPages -}} - {{- if $pages }} -
-

Beilage {{ $beilageNum }}

-
- {{- range $pages -}} - {{- if .Available -}} -
-
Seite {{ .PageNumber }}
- Beilage {{ $beilageNum }}, Seite {{ .PageNumber }} -
- {{- end -}} - {{- end -}} -
-
- {{- end -}} - {{- end -}} -
-{{ end }} \ No newline at end of file diff --git a/views/routes/ausgabe/components/_fullwidth_layout.gohtml b/views/routes/ausgabe/components/_fullwidth_layout.gohtml deleted file mode 100644 index c293da3..0000000 --- a/views/routes/ausgabe/components/_fullwidth_layout.gohtml +++ /dev/null @@ -1,579 +0,0 @@ -{{ $model := .model }} - -
- -
-
-
-
- {{ template "_title_nav" . }} -
-
- - - - {{ if $model.Images.AdditionalPages }} - - {{ end }} - - - - Seitenleiste - -
-
-
-
- -
-
- -
-
- {{ template "_inhaltsverzeichnis" . }} -
-
- - -
- {{ template "_newspaper_layout" . }} -
-
-
-
- - \ No newline at end of file diff --git a/views/routes/ausgabe/components/_inhaltsverzeichnis.gohtml b/views/routes/ausgabe/components/_inhaltsverzeichnis.gohtml index 27f6fb5..05fc689 100644 --- a/views/routes/ausgabe/components/_inhaltsverzeichnis.gohtml +++ b/views/routes/ausgabe/components/_inhaltsverzeichnis.gohtml @@ -13,13 +13,20 @@ {{ $firstItem := "" }} {{ if $pageItems }}{{ $firstItem = index $pageItems 0 }}{{ end }} +
- {{ if $firstItem }}{{ PageIcon $firstItem.PageIcon }}{{ else }}{{ PageIcon "first" }}{{ end }} + {{ if $firstItem }} + {{ PageIcon $firstItem.PageIcon }} + {{ else }} + {{ PageIcon "first" }} + {{ end }} {{ if $pageItems }} {{ range $individualPiece := $pageItems }} -
- {{ template "_inhaltsverzeichnis_eintrag" $individualPiece.PieceByIssue }} +
+ {{ template "_inhaltsverzeichnis_eintrag" $individualPiece.PieceByIssue }} - - {{ if and (not $individualPiece.PieceByIssue.IsContinuation) (gt (len $individualPiece.IssueRefs) 1) }} - - {{ end }} + {{ end }} +
+ {{ end }} {{ else }}
@@ -113,10 +138,16 @@ {{ $allPages := $model.AdditionalPieces.Pages }} {{ $pageCount := len $allPages }} {{ $iconType := "first" }} - {{ if eq $pageIndex 0 }}{{ $iconType = "first" }} - {{ else if eq $pageIndex (sub $pageCount 1) }}{{ $iconType = "last" }} - {{ else if eq (mod $pageIndex 2) 1 }}{{ $iconType = "even" }} - {{ else }}{{ $iconType = "odd" }}{{ end }} + {{ if eq $pageIndex 0 }} + {{ $iconType = "first" }} + {{ else if eq $pageIndex (sub $pageCount 1) }} + {{ $iconType = "last" }} + {{ else if eq (mod $pageIndex 2) 1 }} + {{ $iconType = "even" }} + {{ else }} + {{ $iconType = "odd" }} + {{ end }} +
- {{ if $firstItem }}{{ PageIcon $firstItem.PageIcon }}{{ else }}{{ PageIcon $iconType }}{{ end }} + {{ if $firstItem }} + {{ PageIcon $firstItem.PageIcon }} + {{ else }} + {{ PageIcon $iconType }} + {{ end }} {{ if $pageItems }} {{ range $individualPiece := $pageItems }} -
- {{ template "_inhaltsverzeichnis_eintrag" $individualPiece.PieceByIssue }} +
+ {{ template "_inhaltsverzeichnis_eintrag" $individualPiece.PieceByIssue }} - - {{ if and (not $individualPiece.PieceByIssue.IsContinuation) (gt (len $individualPiece.IssueRefs) 1) }} - - {{ end }} + {{ end }} +
+ {{ end }} {{ else }}
diff --git a/views/routes/ausgabe/components/_newspaper_layout.gohtml b/views/routes/ausgabe/components/_newspaper_layout.gohtml index aafa334..0957a14 100644 --- a/views/routes/ausgabe/components/_newspaper_layout.gohtml +++ b/views/routes/ausgabe/components/_newspaper_layout.gohtml @@ -49,1008 +49,7 @@
- - - {{ define "_historical_layout" }} diff --git a/views/routes/kategorie/head.gohtml b/views/routes/kategorie/head.gohtml new file mode 100644 index 0000000..e69de29 diff --git a/views/routes/kontakt/body.gohtml b/views/routes/kontakt/body.gohtml new file mode 100644 index 0000000..e69de29 diff --git a/views/routes/ort/head.gohtml b/views/routes/ort/head.gohtml new file mode 100644 index 0000000..e69de29 diff --git a/views/routes/search/head.gohtml b/views/routes/search/head.gohtml new file mode 100644 index 0000000..e69de29 diff --git a/views/transform/main.js b/views/transform/main.js index 608a548..d3590fd 100644 --- a/views/transform/main.js +++ b/views/transform/main.js @@ -77,17 +77,958 @@ function setup_templates() { }); } -// INFO: This is intended to be callled once on website load +// =========================== +// NEWSPAPER LAYOUT FUNCTIONS +// =========================== + +// Global variables for state management +window.highlightObserver = window.highlightObserver || null; +window.currentPageContainers = window.currentPageContainers || []; +window.currentActiveIndex = window.currentActiveIndex || 0; +window.pageObserver = window.pageObserver || null; +window.scrollTimeout = window.scrollTimeout || null; + +// Page highlighting functionality +function initializePageHighlighting() { + // Clean up existing observer + if (window.highlightObserver) { + window.highlightObserver.disconnect(); + window.highlightObserver = null; + } + + // Get all page containers + const pageContainers = document.querySelectorAll(".newspaper-page-container"); + + // Set up intersection observer for active page tracking + window.highlightObserver = new IntersectionObserver( + (entries) => { + checkAndHighlightVisiblePages(); + }, + { + rootMargin: "-20% 0px -70% 0px", + }, + ); + + // Observe all page containers + pageContainers.forEach((container) => { + window.highlightObserver.observe(container); + }); +} + +function checkAndHighlightVisiblePages() { + const visiblePageNumbers = []; + const allPageContainers = document.querySelectorAll(".newspaper-page-container"); + + // Find visible page numbers + allPageContainers.forEach((container) => { + const containerRect = container.getBoundingClientRect(); + const viewportHeight = window.innerHeight; + + const visibleTop = Math.max(containerRect.top, 0); + const visibleBottom = Math.min(containerRect.bottom, viewportHeight); + const visibleHeight = Math.max(0, visibleBottom - visibleTop); + const containerHeight = containerRect.height; + + const visibilityRatio = visibleHeight / containerHeight; + const isVisible = visibilityRatio >= 0.5; + + const pageImg = container.querySelector("img[data-page]"); + const pageNumber = pageImg ? pageImg.getAttribute("data-page") : "unknown"; + + if (isVisible && pageImg && pageNumber && !visiblePageNumbers.includes(pageNumber)) { + visiblePageNumbers.push(pageNumber); + } + }); + + // Show continuations only for visible pages + showContinuationsForVisiblePages(visiblePageNumbers); + + // Highlight visible pages + if (visiblePageNumbers.length > 0) { + markCurrentPagesInInhaltsverzeichnis(visiblePageNumbers); + } +} + +function showContinuationsForVisiblePages(visiblePageNumbers) { + // Hide all continuation entries by default + document.querySelectorAll(".continuation-entry").forEach((entry) => { + entry.style.display = "none"; + }); + + // Show continuation entries only for visible pages + visiblePageNumbers.forEach((pageNumber) => { + const pageEntry = document.querySelector(`[data-page-container="${pageNumber}"]`); + if (pageEntry) { + const continuationEntries = pageEntry.querySelectorAll(".continuation-entry"); + continuationEntries.forEach((entry) => { + entry.style.display = ""; + }); + } + }); + + // Update work titles based on highlighted state + updateWorkTitles(visiblePageNumbers); + + // Update page entry visibility after showing/hiding continuations + updatePageEntryVisibility(); +} + +function updateWorkTitles(visiblePageNumbers) { + // Reset all work titles to short form + document.querySelectorAll(".work-title").forEach((titleElement) => { + const shortTitle = titleElement.getAttribute("data-short-title"); + if (shortTitle) { + titleElement.textContent = shortTitle; + } + }); + + // Update work titles to full form for highlighted pages + visiblePageNumbers.forEach((pageNumber) => { + const pageEntry = document.querySelector(`[data-page-container="${pageNumber}"]`); + if (pageEntry) { + const workTitles = pageEntry.querySelectorAll(".work-title"); + workTitles.forEach((titleElement) => { + const fullTitle = titleElement.getAttribute("data-full-title"); + if (fullTitle && fullTitle !== titleElement.getAttribute("data-short-title")) { + titleElement.textContent = fullTitle; + } + }); + } + }); +} + +function updatePageEntryVisibility() { + // Check each page entry to see if it has any visible content + document.querySelectorAll(".page-entry").forEach((pageEntry) => { + const allEntries = pageEntry.querySelectorAll(".inhalts-entry"); + let hasVisibleContent = false; + + // Check if any entry is visible + allEntries.forEach((entry) => { + const computedStyle = window.getComputedStyle(entry); + if (computedStyle.display !== "none") { + hasVisibleContent = true; + } + }); + + // Hide the entire page entry if it has no visible content + if (hasVisibleContent) { + pageEntry.style.display = ""; + } else { + pageEntry.style.display = "none"; + } + }); +} + +function markCurrentPageInInhaltsverzeichnis(pageNumber) { + markCurrentPagesInInhaltsverzeichnis([pageNumber]); +} + +function markCurrentPagesInInhaltsverzeichnis(pageNumbers) { + console.log("markCurrentPagesInInhaltsverzeichnis called with:", pageNumbers); + + // Reset all page container borders to default + document.querySelectorAll("[data-page-container]").forEach((container) => { + if (container.hasAttribute("data-beilage")) { + container.classList.remove("border-red-500"); + container.classList.add("border-amber-400"); + } else { + container.classList.remove("border-red-500"); + container.classList.add("border-slate-300"); + } + }); + + // Reset all page numbers in Inhaltsverzeichnis + document.querySelectorAll(".page-number-inhalts").forEach((pageNum) => { + pageNum.classList.remove("text-red-600", "font-bold"); + pageNum.classList.add("text-slate-700", "font-semibold"); + pageNum.style.textDecoration = ""; + pageNum.style.pointerEvents = ""; + // Restore hover effects + if (pageNum.classList.contains("bg-blue-50")) { + pageNum.classList.add("hover:bg-blue-100"); + } else if (pageNum.classList.contains("bg-amber-50")) { + pageNum.classList.add("hover:bg-amber-100"); + } + // Keep original background colors + if (!pageNum.classList.contains("bg-amber-50") && !pageNum.classList.contains("bg-blue-50")) { + pageNum.classList.add("bg-blue-50"); + } + }); + + // Reset all containers and links in Inhaltsverzeichnis + document.querySelectorAll(".inhalts-entry").forEach((container) => { + container.classList.add("hover:bg-slate-100"); + container.style.cursor = ""; + }); + + document.querySelectorAll('.inhalts-entry a[href*="/"]').forEach((link) => { + link.classList.remove("no-underline"); + if (link.classList.contains("bg-blue-50")) { + link.classList.add("hover:bg-blue-100"); + } + }); + + // Find and highlight the current page numbers + const highlightedElements = []; + + pageNumbers.forEach((pageNumber) => { + // Find the exact page entry for this page number + const pageNumElement = document.querySelector( + `.page-number-inhalts[data-page-number="${pageNumber}"]`, + ); + + if (pageNumElement) { + // Highlight the page number + pageNumElement.classList.remove( + "text-slate-700", + "hover:bg-blue-100", + "hover:bg-amber-100", + ); + pageNumElement.classList.add("text-red-600", "font-bold"); + pageNumElement.style.textDecoration = "none"; + pageNumElement.style.pointerEvents = "none"; + highlightedElements.push(pageNumElement); + + // Highlight the page container's left border + const pageContainer = document.querySelector(`[data-page-container="${pageNumber}"]`); + if (pageContainer) { + pageContainer.classList.remove("border-slate-300", "border-amber-400"); + pageContainer.classList.add("border-red-500"); + } + + // Make links in the current page non-clickable and remove hover effects + const parentEntry = pageNumElement.closest(".page-entry"); + if (parentEntry) { + // Remove hover effects from the container + const entryContainers = parentEntry.querySelectorAll(".inhalts-entry"); + entryContainers.forEach((container) => { + container.classList.remove("hover:bg-slate-100"); + container.style.cursor = "default"; + }); + + // Also handle issue reference links + parentEntry.querySelectorAll('a[href*="/"]').forEach((link) => { + if (link.getAttribute("aria-current") === "page") { + link.style.textDecoration = "none"; + link.style.pointerEvents = "none"; + link.classList.add("no-underline"); + link.classList.remove("hover:bg-blue-100"); + } + }); + } + } + }); + + // Auto-scroll to first highlighted element if it exists + if (highlightedElements.length > 0) { + scrollToHighlightedPage(highlightedElements[0]); + } + + // Also highlight page indicators + document.querySelectorAll(".page-indicator").forEach((indicator) => { + indicator.classList.remove("text-red-600", "font-bold"); + indicator.classList.add("text-slate-600", "font-semibold"); + // Keep original backgrounds + if (!indicator.classList.contains("bg-amber-50")) { + indicator.classList.add("bg-blue-50"); + } + }); + + // Highlight page indicators for all current pages + pageNumbers.forEach((pageNumber) => { + const pageIndicator = document.querySelector(`.page-indicator[data-page="${pageNumber}"]`); + if (pageIndicator) { + pageIndicator.classList.remove("text-slate-600"); + pageIndicator.classList.add("text-red-600", "font-bold"); + } + }); +} + +function scrollToHighlightedPage(element) { + // Check if the element is in a scrollable container + const inhaltsContainer = element.closest(".lg\\:overflow-y-auto"); + if (inhaltsContainer) { + // Calculate position + const containerRect = inhaltsContainer.getBoundingClientRect(); + const elementRect = element.getBoundingClientRect(); + + // Check if element is not fully visible + const isAboveContainer = elementRect.top < containerRect.top; + const isBelowContainer = elementRect.bottom > containerRect.bottom; + + if (isAboveContainer || isBelowContainer) { + // Scroll to make element visible with some padding + element.scrollIntoView({ + behavior: "smooth", + block: "center", + }); + } + } +} + +// Modal functions +function enlargePage(imgElement, pageNumber, isFromSpread) { + const modal = document.getElementById("pageModal"); + const modalImage = document.getElementById("modalImage"); + + modalImage.src = imgElement.src; + modalImage.alt = imgElement.alt; + + modal.classList.remove("hidden"); + + // Mark current page when enlarged + markCurrentPageInInhaltsverzeichnis(pageNumber); +} + +function closeModal() { + const modal = document.getElementById("pageModal"); + modal.classList.add("hidden"); +} + +// Page navigation functions +function initializePageTracking() { + // Clean up existing observer + if (window.pageObserver) { + window.pageObserver.disconnect(); + window.pageObserver = null; + } + + // Reset state + window.currentPageContainers = Array.from( + document.querySelectorAll(".newspaper-page-container"), + ); + window.currentActiveIndex = 0; + updateButtonStates(); + + // Set up new observer + const existingObserver = document.querySelector(".newspaper-page-container"); + if (existingObserver) { + let visibleContainers = new Set(); + + window.pageObserver = new IntersectionObserver( + (entries) => { + entries.forEach((entry) => { + const containerIndex = window.currentPageContainers.indexOf(entry.target); + if (containerIndex !== -1) { + if (entry.isIntersecting) { + visibleContainers.add(containerIndex); + } else { + visibleContainers.delete(containerIndex); + } + } + }); + + // Update currentActiveIndex to the first (topmost) visible container + if (visibleContainers.size > 0) { + const sortedVisible = Array.from(visibleContainers).sort((a, b) => a - b); + const newActiveIndex = sortedVisible[0]; + if (newActiveIndex !== window.currentActiveIndex) { + window.currentActiveIndex = newActiveIndex; + updateButtonStates(); + } + } + }, + { + rootMargin: "-20% 0px -70% 0px", + }, + ); + + window.currentPageContainers.forEach((container) => { + window.pageObserver.observe(container); + }); + } +} + +function scrollToPreviousPage() { + if (window.currentActiveIndex > 0) { + // Find the first page that's not currently visible + let targetIndex = -1; + + // Check which pages are currently visible + const visibleIndexes = []; + window.currentPageContainers.forEach((container, index) => { + const containerRect = container.getBoundingClientRect(); + const viewportHeight = window.innerHeight; + + const visibleTop = Math.max(containerRect.top, 0); + const visibleBottom = Math.min(containerRect.bottom, viewportHeight); + const visibleHeight = Math.max(0, visibleBottom - visibleTop); + const containerHeight = containerRect.height; + + const visibilityRatio = visibleHeight / containerHeight; + if (visibilityRatio >= 0.3) { // Consider visible if 30% or more is showing + visibleIndexes.push(index); + } + }); + + // Find the first non-visible page before the current visible range + const minVisibleIndex = Math.min(...visibleIndexes); + for (let i = minVisibleIndex - 1; i >= 0; i--) { + if (!visibleIndexes.includes(i)) { + targetIndex = i; + break; + } + } + + // If no non-visible page found, go to the page just before the visible range + if (targetIndex === -1 && minVisibleIndex > 0) { + targetIndex = minVisibleIndex - 1; + } + + if (targetIndex >= 0) { + window.currentActiveIndex = targetIndex; + window.currentPageContainers[window.currentActiveIndex].scrollIntoView({ + behavior: "smooth", + block: "start", + }); + + // Update button states after a brief delay to let intersection observer catch up + setTimeout(() => { + updateButtonStates(); + }, 100); + } + } +} + +function scrollToNextPage() { + if (window.currentActiveIndex < window.currentPageContainers.length - 1) { + // Find the first page that's not currently visible + let targetIndex = -1; + + // Check which pages are currently visible + const visibleIndexes = []; + window.currentPageContainers.forEach((container, index) => { + const containerRect = container.getBoundingClientRect(); + const viewportHeight = window.innerHeight; + + const visibleTop = Math.max(containerRect.top, 0); + const visibleBottom = Math.min(containerRect.bottom, viewportHeight); + const visibleHeight = Math.max(0, visibleBottom - visibleTop); + const containerHeight = containerRect.height; + + const visibilityRatio = visibleHeight / containerHeight; + if (visibilityRatio >= 0.3) { // Consider visible if 30% or more is showing + visibleIndexes.push(index); + } + }); + + // Find the first non-visible page after the current visible range + const maxVisibleIndex = Math.max(...visibleIndexes); + for (let i = maxVisibleIndex + 1; i < window.currentPageContainers.length; i++) { + if (!visibleIndexes.includes(i)) { + targetIndex = i; + break; + } + } + + // If no non-visible page found, go to the page just after the visible range + if (targetIndex === -1 && maxVisibleIndex < window.currentPageContainers.length - 1) { + targetIndex = maxVisibleIndex + 1; + } + + if (targetIndex >= 0 && targetIndex < window.currentPageContainers.length) { + window.currentActiveIndex = targetIndex; + window.currentPageContainers[window.currentActiveIndex].scrollIntoView({ + behavior: "smooth", + block: "start", + }); + + // Update button states after a brief delay to let intersection observer catch up + setTimeout(() => { + updateButtonStates(); + }, 100); + } + } +} + +function scrollToBeilage() { + // Check if we're currently viewing a Beilage section + const isViewingBeilage = isCurrentlyInBeilageSection(); + + if (isViewingBeilage) { + // Go back to main issue (first main page) + const firstMainPage = document.querySelector('#newspaper-content .newspaper-page-container'); + if (firstMainPage) { + firstMainPage.scrollIntoView({ + behavior: "smooth", + block: "start", + }); + } + } else { + // Go to first beilage container + const beilageContainer = document.querySelector('[class*="border-t-2 border-amber-200"]'); + if (beilageContainer) { + beilageContainer.scrollIntoView({ + behavior: "smooth", + block: "start", + }); + } + } +} + +function isCurrentlyInBeilageSection() { + // Check which pages are currently visible + const visibleIndexes = []; + window.currentPageContainers.forEach((container, index) => { + const containerRect = container.getBoundingClientRect(); + const viewportHeight = window.innerHeight; + + const visibleTop = Math.max(containerRect.top, 0); + const visibleBottom = Math.min(containerRect.bottom, viewportHeight); + const visibleHeight = Math.max(0, visibleBottom - visibleTop); + const containerHeight = containerRect.height; + + const visibilityRatio = visibleHeight / containerHeight; + if (visibilityRatio >= 0.3) { // Consider visible if 30% or more is showing + visibleIndexes.push(index); + } + }); + + // Check if any visible page is a Beilage page + for (const index of visibleIndexes) { + const container = window.currentPageContainers[index]; + if (container && container.id && container.id.includes('beilage-')) { + return true; + } + } + + return false; +} + +function updateButtonStates() { + const prevBtn = document.getElementById("prevPageBtn"); + const nextBtn = document.getElementById("nextPageBtn"); + const beilageBtn = document.getElementById("beilageBtn"); + + if (prevBtn) { + if (window.currentActiveIndex <= 0) { + prevBtn.style.display = "none"; + } else { + prevBtn.style.display = "flex"; + } + } + + if (nextBtn) { + if (window.currentActiveIndex >= window.currentPageContainers.length - 1) { + nextBtn.style.display = "none"; + } else { + nextBtn.style.display = "flex"; + } + } + + // Update Beilage button based on current location + if (beilageBtn) { + const isViewingBeilage = isCurrentlyInBeilageSection(); + const icon = beilageBtn.querySelector('i'); + + if (isViewingBeilage) { + // Show "Go to Main Issue" state - use gray styling + beilageBtn.title = "Zur Hauptausgabe"; + beilageBtn.className = "w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-gray-100 hover:bg-gray-200 text-gray-700 hover:text-gray-800 border border-gray-300 transition-colors duration-200 flex items-center justify-center cursor-pointer"; + if (icon) { + icon.className = "ri-file-text-line text-lg lg:text-xl"; + } + } else { + // Show "Go to Beilage" state - use amber styling + beilageBtn.title = "Zu Beilage"; + beilageBtn.className = "w-14 h-10 lg:w-16 lg:h-12 px-2 py-1 bg-amber-100 hover:bg-amber-200 text-amber-700 hover:text-amber-800 border border-amber-300 transition-colors duration-200 flex items-center justify-center cursor-pointer"; + if (icon) { + icon.className = "ri-attachment-line text-lg lg:text-xl"; + } + } + } +} + +// Share and citation functions +function shareCurrentPage() { + const button = document.getElementById("shareLinkBtn"); + + // Get current page information + let pageInfo = ""; + + // Try to get the currently visible page number from active containers + if ( + window.currentActiveIndex !== undefined && + window.currentPageContainers && + window.currentPageContainers[window.currentActiveIndex] + ) { + const activeContainer = window.currentPageContainers[window.currentActiveIndex]; + const pageElement = activeContainer.querySelector("[data-page]"); + if (pageElement) { + const pageNumber = pageElement.getAttribute("data-page"); + pageInfo = `#page-${pageNumber}`; + } + } + + // Construct the shareable URL + const currentUrl = window.location.origin + window.location.pathname + pageInfo; + + // Try to use Web Share API if available (mobile browsers) + if (navigator.share) { + navigator + .share({ + title: document.title, + url: currentUrl, + }) + .catch((err) => { + // Fallback to clipboard + copyToClipboard(currentUrl, button); + }); + } else { + // Fallback: copy to clipboard + copyToClipboard(currentUrl, button); + } +} + +function copyToClipboard(text, button) { + if (navigator.clipboard) { + navigator.clipboard + .writeText(text) + .then(() => { + showSimplePopup(button, "Link kopiert!"); + }) + .catch((err) => { + showSimplePopup(button, "Kopieren fehlgeschlagen"); + }); + } else { + // Fallback for older browsers + const textarea = document.createElement("textarea"); + textarea.value = text; + document.body.appendChild(textarea); + textarea.select(); + try { + const successful = document.execCommand("copy"); + showSimplePopup(button, successful ? "Link kopiert!" : "Kopieren fehlgeschlagen"); + } catch (err) { + showSimplePopup(button, "Kopieren fehlgeschlagen"); + } finally { + document.body.removeChild(textarea); + } + } +} + +function generateCitation() { + const button = document.getElementById("citationBtn"); + + // Get current page and issue information + const issueInfo = document.title || "KGPZ"; + const currentUrl = window.location.href; + + // Basic citation format (can be expanded later) + const currentDate = new Date().toLocaleDateString("de-DE"); + const citation = `Königsberger Gelehrte und Politische Zeitung (KGPZ). ${issueInfo}. Digital verfügbar unter: ${currentUrl} (Zugriff: ${currentDate}).`; + + // Copy to clipboard + if (navigator.clipboard) { + navigator.clipboard + .writeText(citation) + .then(() => { + showSimplePopup(button, "Zitation kopiert!"); + }) + .catch((err) => { + showSimplePopup(button, "Kopieren fehlgeschlagen"); + }); + } else { + // Fallback for older browsers + const textarea = document.createElement("textarea"); + textarea.value = citation; + document.body.appendChild(textarea); + textarea.select(); + try { + const successful = document.execCommand("copy"); + showSimplePopup(button, successful ? "Zitation kopiert!" : "Kopieren fehlgeschlagen"); + } catch (err) { + showSimplePopup(button, "Kopieren fehlgeschlagen"); + } finally { + document.body.removeChild(textarea); + } + } +} + +function showSimplePopup(button, message) { + // Remove any existing popup + const existingPopup = document.querySelector(".simple-popup"); + if (existingPopup) { + existingPopup.remove(); + } + + // Create popup element + const popup = document.createElement("div"); + popup.className = "simple-popup"; + popup.textContent = message; + + // Style the popup + popup.style.cssText = ` + position: fixed; + background: #374151; + color: white; + padding: 6px 12px; + border-radius: 6px; + font-size: 13px; + font-weight: 500; + z-index: 1000; + pointer-events: none; + opacity: 0; + transition: opacity 0.2s ease; + white-space: nowrap; + `; + + // Position popup next to button + const buttonRect = button.getBoundingClientRect(); + const viewportHeight = window.innerHeight; + const viewportWidth = window.innerWidth; + + // Calculate position relative to viewport (since we're using fixed positioning) + let left = buttonRect.left - 10; + let top = buttonRect.bottom + 8; + + // Ensure popup doesn't go off-screen + const popupWidth = 120; // Estimated popup width + const popupHeight = 32; // Estimated popup height + + // Adjust horizontal position if too far right + if (left + popupWidth > viewportWidth) { + left = buttonRect.right - popupWidth + 10; + } + + // Adjust vertical position if too far down (show above button instead) + if (top + popupHeight > viewportHeight) { + top = buttonRect.top - popupHeight - 8; + } + + popup.style.left = Math.max(5, left) + "px"; + popup.style.top = Math.max(5, top) + "px"; + + // Add to page + document.body.appendChild(popup); + + // Fade in + setTimeout(() => { + popup.style.opacity = "1"; + }, 10); + + // Auto-remove after 2 seconds + setTimeout(() => { + popup.style.opacity = "0"; + setTimeout(() => { + if (popup.parentNode) { + popup.remove(); + } + }, 200); + }, 2000); +} + +// Hash navigation functions +function scrollToPageFromHash() { + const hash = window.location.hash; + let pageNumber = ""; + let targetContainer = null; + + if (hash.startsWith("#page-")) { + pageNumber = hash.replace("#page-", ""); + + // Try to find exact page container first + targetContainer = document.getElementById(`page-${pageNumber}`); + + // If not found, try to find container that contains this page + if (!targetContainer) { + // Look for double-spread containers that contain this page + const containers = document.querySelectorAll(".newspaper-page-container[data-pages]"); + for (const container of containers) { + const pages = container.getAttribute("data-pages"); + if (pages && pages.split(",").includes(pageNumber)) { + targetContainer = container; + break; + } + } + } + + // If still not found, try beilage containers + if (!targetContainer) { + targetContainer = + document.getElementById(`beilage-1-page-${pageNumber}`) || + document.getElementById(`beilage-2-page-${pageNumber}`) || + document.querySelector(`[id*="beilage"][id*="page-${pageNumber}"]`); + } + } else if (hash.startsWith("#beilage-")) { + // Handle beilage-specific hashes like #beilage-1-page-101 + const match = hash.match(/#beilage-(\d+)-page-(\d+)/); + if (match) { + const beilageNum = match[1]; + pageNumber = match[2]; + targetContainer = document.getElementById(`beilage-${beilageNum}-page-${pageNumber}`); + } + } + + if (targetContainer && pageNumber) { + setTimeout(() => { + targetContainer.scrollIntoView({ + behavior: "smooth", + block: "start", + }); + + // Highlight the specific page in the table of contents + markCurrentPageInInhaltsverzeichnis(pageNumber); + }, 300); + } +} + +// Page-specific utilities +function copyPagePermalink(pageNumber, button, isBeilage = false) { + let pageFragment = ""; + if (isBeilage) { + pageFragment = `#beilage-1-page-${pageNumber}`; + } else { + pageFragment = `#page-${pageNumber}`; + } + + const currentUrl = window.location.origin + window.location.pathname + pageFragment; + + // Copy to clipboard + if (navigator.clipboard) { + navigator.clipboard + .writeText(currentUrl) + .then(() => { + showSimplePopup(button, "Link kopiert!"); + }) + .catch((err) => { + showSimplePopup(button, "Kopieren fehlgeschlagen"); + }); + } else { + // Fallback for older browsers + const textarea = document.createElement("textarea"); + textarea.value = currentUrl; + document.body.appendChild(textarea); + textarea.select(); + try { + const successful = document.execCommand("copy"); + showSimplePopup(button, successful ? "Link kopiert!" : "Kopieren fehlgeschlagen"); + } catch (err) { + showSimplePopup(button, "Kopieren fehlgeschlagen"); + } finally { + document.body.removeChild(textarea); + } + } +} + +function generatePageCitation(pageNumber, button) { + // Get current issue information + const issueInfo = document.title || "KGPZ"; + const currentUrl = `${window.location.origin}${window.location.pathname}#page-${pageNumber}`; + + // Basic citation format for specific page + const currentDate = new Date().toLocaleDateString("de-DE"); + const citation = `Königsberger Gelehrte und Politische Zeitung (KGPZ). ${issueInfo}, Seite ${pageNumber}. Digital verfügbar unter: ${currentUrl} (Zugriff: ${currentDate}).`; + + // Copy to clipboard + if (navigator.clipboard) { + navigator.clipboard + .writeText(citation) + .then(() => { + showSimplePopup(button, "Zitation kopiert!"); + }) + .catch((err) => { + showSimplePopup(button, "Kopieren fehlgeschlagen"); + }); + } else { + // Fallback for older browsers + const textarea = document.createElement("textarea"); + textarea.value = citation; + document.body.appendChild(textarea); + textarea.select(); + try { + const successful = document.execCommand("copy"); + showSimplePopup(button, successful ? "Zitation kopiert!" : "Kopieren fehlgeschlagen"); + } catch (err) { + showSimplePopup(button, "Kopieren fehlgeschlagen"); + } finally { + document.body.removeChild(textarea); + } + } +} + +// Initialize newspaper layout functionality +function initializeNewspaperLayout() { + // Initialize page highlighting + initializePageHighlighting(); + + // Initialize page tracking + initializePageTracking(); + + // Set up scroll handler + window.addEventListener("scroll", function () { + clearTimeout(window.scrollTimeout); + window.scrollTimeout = setTimeout(() => { + checkAndHighlightVisiblePages(); + updateButtonStates(); // Update button states including Beilage toggle + }, 50); + }); + + // Initialize hash handling + scrollToPageFromHash(); + window.addEventListener("hashchange", scrollToPageFromHash); + + // Set up keyboard shortcuts + document.addEventListener("keydown", function (e) { + if (e.key === "Escape") { + closeModal(); + } + }); +} + +// Export functions for global access +window.enlargePage = enlargePage; +window.closeModal = closeModal; +window.scrollToPreviousPage = scrollToPreviousPage; +window.scrollToNextPage = scrollToNextPage; +window.scrollToBeilage = scrollToBeilage; +window.shareCurrentPage = shareCurrentPage; +window.generateCitation = generateCitation; +window.copyPagePermalink = copyPagePermalink; +window.generatePageCitation = generatePageCitation; + +// INFO: This is intended to be called once on website load function setup() { setup_xslt(); + setup_templates(); + // Initialize newspaper layout if present + if (document.querySelector(".newspaper-page-container")) { + initializeNewspaperLayout(); + } + + // Set up HTMX event handlers htmx.on("htmx:load", function (_) { // INFO: We can instead use afterSettle; and also clear the map with // xslt_processors.clear(); setup_xslt(); }); - setup_templates(); + // HTMX event handling for newspaper layout + document.body.addEventListener("htmx:afterSwap", function (event) { + setTimeout(() => { + if (document.querySelector(".newspaper-page-container")) { + initializeNewspaperLayout(); + } + }, 100); + }); + + document.body.addEventListener("htmx:afterSettle", function (event) { + setTimeout(() => { + if (document.querySelector(".newspaper-page-container")) { + initializeNewspaperLayout(); + } + }, 200); + }); + + document.body.addEventListener("htmx:load", function (event) { + setTimeout(() => { + if (document.querySelector(".newspaper-page-container")) { + initializeNewspaperLayout(); + } + }, 100); + }); } export { setup }; diff --git a/views/transform/site.css b/views/transform/site.css index 84e2be5..cd32229 100644 --- a/views/transform/site.css +++ b/views/transform/site.css @@ -92,4 +92,72 @@ body::before { main { @apply grow shrink-0; } + + /* ============================= + NEWSPAPER LAYOUT STYLES + ============================= */ + + /* Essential styles that cannot be represented in Tailwind */ + .newspaper-page-container { + margin-bottom: 2rem; + } + + /* Page header backdrop blur */ + .newspaper-page-container .absolute .page-indicator { + pointer-events: auto; + backdrop-filter: blur(2px); + } + + /* Responsive header scaling */ + @media (max-width: 768px) { + .newspaper-page-container .absolute { + transform: scale(0.9); + } + } + + /* Image size constraints with Tailwind utilities */ + .single-page { + display: flex; + justify-content: center; + } + + .single-page .newspaper-page-image { + max-width: min(400px, 100%); + width: 100%; + height: auto; + } + + /* Larger screens */ + @media (min-width: 1280px) { + .single-page .newspaper-page-image { + max-width: min(600px, 100%); + } + } + + /* Very wide screens */ + @media (min-width: 1536px) { + .single-page .newspaper-page-image { + max-width: min(700px, 100%); + } + } + + /* Mobile constraints */ + @media (max-width: 640px) { + .single-page .newspaper-page-image { + max-width: 100%; + } + } + + /* Navigation button hover styles */ + button#prevPageBtn:hover:not([style*="display: none"]), + button#nextPageBtn:hover, + button#beilageBtn:hover { + background-color: rgb(209 213 219) !important; /* gray-300 */ + color: rgb(55 65 81) !important; /* gray-700 */ + } + + button#beilageBtn:hover { + background-color: rgb(254 215 170) !important; /* amber-200 */ + color: rgb(146 64 14) !important; /* amber-800 */ + } }