aktueller stand

This commit is contained in:
torbinus
2026-09-17 16:02:51 +02:00
parent 7e51514383
commit 065cb8b64f
295 changed files with 642342 additions and 1059 deletions
+6
View File
@@ -0,0 +1,6 @@
node_modules
dist
.astro
.env
.git
*.log
+39
View File
@@ -0,0 +1,39 @@
# Astro-Frontend als Image.
#
# Der Node-Adapter läuft im Modus "standalone", das Ergebnis ist also ein
# eigener Server unter dist/server/entry.mjs.
#
# Achtung bei der Backend-Adresse: Astro setzt PUBLIC_-Variablen schon beim
# Bauen fest ein, nicht erst beim Start. Ein Image gehört deshalb immer zu
# genau einer Umgebung — für Test und Produktion wird zweimal gebaut.
FROM node:22-bookworm-slim AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
ARG PUBLIC_MEDUSA_BACKEND_URL
ARG PUBLIC_MEDUSA_PUBLISHABLE_KEY
ENV PUBLIC_MEDUSA_BACKEND_URL=$PUBLIC_MEDUSA_BACKEND_URL
ENV PUBLIC_MEDUSA_PUBLISHABLE_KEY=$PUBLIC_MEDUSA_PUBLISHABLE_KEY
COPY . .
RUN npm run build
FROM node:22-bookworm-slim AS runtime
WORKDIR /app
ENV NODE_ENV=production
# Ohne HOST=0.0.0.0 lauscht der Server nur auf localhost und ist im Netz
# des Containers nicht erreichbar.
ENV HOST=0.0.0.0
ENV PORT=4321
COPY package.json package-lock.json ./
RUN npm ci --omit=dev --no-audit --no-fund
COPY --from=build /app/dist ./dist
EXPOSE 4321
CMD ["node", "./dist/server/entry.mjs"]

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 154 KiB

Before

Width:  |  Height:  |  Size: 320 KiB

After

Width:  |  Height:  |  Size: 320 KiB

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 108 KiB

Before

Width:  |  Height:  |  Size: 242 KiB

After

Width:  |  Height:  |  Size: 242 KiB

Before

Width:  |  Height:  |  Size: 212 KiB

After

Width:  |  Height:  |  Size: 212 KiB

+65 -8
View File
@@ -9,12 +9,19 @@
"version": "0.0.1",
"dependencies": {
"@astrojs/node": "^11.0.1",
"@fontsource-variable/open-sans": "^5.2.7",
"@fontsource/bebas-neue": "^5.2.7",
"@fontsource-variable/geist": "^5.3.0",
"@fontsource-variable/inter": "^5.2.8",
"@fontsource-variable/open-sans": "^5.3.0",
"@fontsource-variable/oswald": "^5.2.8",
"@fontsource/bebas-neue": "^5.3.0",
"@tailwindcss/vite": "^4.3.2",
"astro": "^7.0.5",
"leaflet": "^1.9.4",
"tailwindcss": "^4.3.2"
},
"devDependencies": {
"@types/leaflet": "^1.9.22"
},
"engines": {
"node": ">=22.12.0"
}
@@ -911,19 +918,46 @@
"node": ">=18"
}
},
"node_modules/@fontsource-variable/geist": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/@fontsource-variable/geist/-/geist-5.3.0.tgz",
"integrity": "sha512-j0m+vLQuG5XAYoHtGCVu0spvlGreR3EzpECUVzkFmI1mTVnAO38l/NEPDCFgZ177JxzYJCLSmTQibIiYPilGrA==",
"license": "OFL-1.1",
"funding": {
"url": "https://github.com/sponsors/ayuhito"
}
},
"node_modules/@fontsource-variable/inter": {
"version": "5.2.8",
"resolved": "https://registry.npmjs.org/@fontsource-variable/inter/-/inter-5.2.8.tgz",
"integrity": "sha512-kOfP2D+ykbcX/P3IFnokOhVRNoTozo5/JxhAIVYLpea/UBmCQ/YWPBfWIDuBImXX/15KH+eKh4xpEUyS2sQQGQ==",
"license": "OFL-1.1",
"funding": {
"url": "https://github.com/sponsors/ayuhito"
}
},
"node_modules/@fontsource-variable/open-sans": {
"version": "5.2.7",
"resolved": "https://registry.npmjs.org/@fontsource-variable/open-sans/-/open-sans-5.2.7.tgz",
"integrity": "sha512-wzCLm2STuekK9Fz58DiuBnk4GgJpvvVtAU85a4b06ACNG/UsVjQcCvkUd6R/ETlHfsaykCUZamLRvSXg4KtWuA==",
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/@fontsource-variable/open-sans/-/open-sans-5.3.0.tgz",
"integrity": "sha512-VOfhZfLIOBVa6K/dTEu7scqQXYdGa4jBX8quFpQ0S6574B+W2EOBJf9PkqyVtMEI7WWIWNEbpvPc3vY1mN2mmQ==",
"license": "OFL-1.1",
"funding": {
"url": "https://github.com/sponsors/ayuhito"
}
},
"node_modules/@fontsource-variable/oswald": {
"version": "5.2.8",
"resolved": "https://registry.npmjs.org/@fontsource-variable/oswald/-/oswald-5.2.8.tgz",
"integrity": "sha512-sIXwfKbyHOATgBWOlpR73VMQ8pA8XCToiyy6sL02ZfYEZPpW18TLtpxPBpYXId7xKbWCousOTzlJsa/9rTd8WQ==",
"license": "OFL-1.1",
"funding": {
"url": "https://github.com/sponsors/ayuhito"
}
},
"node_modules/@fontsource/bebas-neue": {
"version": "5.2.7",
"resolved": "https://registry.npmjs.org/@fontsource/bebas-neue/-/bebas-neue-5.2.7.tgz",
"integrity": "sha512-DsmBrmq55d9BCU0mt4DT4RZDdH8vhWRKEUOfbuNB1EEjMuwbtFvM8N+3gIlkYSFbsb10P8Q19BV5OdpMu2h0fA==",
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/@fontsource/bebas-neue/-/bebas-neue-5.3.0.tgz",
"integrity": "sha512-nCxMEb9Bg9sjNWm9TIOsvHKDMLRUfEZPWpLgYu6m9KavZZVSA/WoHzI5wROwqA+eNwEi/PNBAcB5Co7HA3S0Cw==",
"license": "OFL-1.1",
"funding": {
"url": "https://github.com/sponsors/ayuhito"
@@ -2160,6 +2194,13 @@
"@types/estree": "*"
}
},
"node_modules/@types/geojson": {
"version": "7946.0.16",
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz",
"integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/hast": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz",
@@ -2169,6 +2210,16 @@
"@types/unist": "*"
}
},
"node_modules/@types/leaflet": {
"version": "1.9.22",
"resolved": "https://registry.npmjs.org/@types/leaflet/-/leaflet-1.9.22.tgz",
"integrity": "sha512-h3lhECYEKDasG7LFHu+GiHqAvsgLuQvlJvVZzJDGONo3sEL+wUOqSFLnwkZlK0qVxnxbuGFW8iBlJNYs5wgndA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/geojson": "*"
}
},
"node_modules/@types/mdast": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz",
@@ -3170,6 +3221,12 @@
"integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==",
"license": "MIT"
},
"node_modules/leaflet": {
"version": "1.9.4",
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz",
"integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==",
"license": "BSD-2-Clause"
},
"node_modules/lightningcss": {
"version": "1.32.0",
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz",
+9 -2
View File
@@ -13,10 +13,17 @@
},
"dependencies": {
"@astrojs/node": "^11.0.1",
"@fontsource-variable/open-sans": "^5.2.7",
"@fontsource/bebas-neue": "^5.2.7",
"@fontsource-variable/geist": "^5.3.0",
"@fontsource-variable/inter": "^5.2.8",
"@fontsource-variable/open-sans": "^5.3.0",
"@fontsource-variable/oswald": "^5.2.8",
"@fontsource/bebas-neue": "^5.3.0",
"@tailwindcss/vite": "^4.3.2",
"astro": "^7.0.5",
"leaflet": "^1.9.4",
"tailwindcss": "^4.3.2"
},
"devDependencies": {
"@types/leaflet": "^1.9.22"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 94 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.
Binary file not shown.
+286 -48
View File
@@ -7,28 +7,59 @@ interface Variant {
interface Props {
variants: Variant[];
regionId: string;
/**
* Ob der Mengenwähler angezeigt wird. Beim Abo nicht: dort steht die Menge
* schon in der Sortenauswahl und steuert dort die Zahl der Gläser.
*/
showQuantity?: boolean;
/**
* Nur am Abo und nur, wenn jedes Paket seinen Versand trägt: die Variante,
* über die der Anteil für die weiteren Pakete mitverkauft wird.
*/
giftSurchargeVariantId?: string | null;
/** Ob die Angaben zur Bienenpatenschaft mitgesendet werden müssen. */
isSponsorship?: boolean;
/** Ob die Angaben zum Geschenkgutschein mitgesendet werden müssen. */
isGiftVoucher?: boolean;
}
const { variants, regionId } = Astro.props;
const {
variants,
regionId,
showQuantity = true,
giftSurchargeVariantId = null,
isSponsorship = false,
isGiftVoucher = false,
} = Astro.props;
---
<div>
{variants.length > 1 && (
<div id="variant-picker" class="mb-5 flex flex-wrap gap-2">
{variants.map((variant, index) => (
<label class="relative">
<input
type="radio"
name="variant"
value={variant.id}
checked={index === 0}
class="peer sr-only"
/>
<span class="block cursor-pointer rounded-full border border-brand-border px-4 py-2 text-sm font-medium text-brand-text transition-colors peer-checked:border-brand-primary peer-checked:bg-brand-primary peer-checked:text-white hover:border-brand-primary">
{variant.title}
</span>
</label>
))}
<fieldset id="variant-picker" class="mb-7" aria-labelledby="variant-picker-label">
<p id="variant-picker-label" class="field-label">Variante</p>
<div class="flex flex-wrap gap-2">
{variants.map((variant, index) => (
<label class="relative">
<input type="radio" name="variant" value={variant.id} checked={index === 0} class="peer sr-only" />
<span
class="block cursor-pointer rounded-[var(--radius-inner)] border border-brand-border bg-brand-surface-strong px-4 py-2.5 text-sm text-brand-text transition-[background-color,border-color,color] duration-200 ease-out hover:border-brand-ink peer-checked:border-brand-ink peer-checked:bg-brand-ink peer-checked:text-white peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-brand-primary"
>
{variant.title}
</span>
</label>
))}
</div>
</fieldset>
)}
{showQuantity && (
<div class="mb-7">
<p class="field-label" id="menge-label">Menge</p>
<div class="mengenwahl" role="group" aria-labelledby="menge-label">
<button type="button" data-menge="-1" aria-label="Menge verringern">–</button>
<input id="menge" type="number" inputmode="numeric" min="1" max="99" step="1" value="1" aria-label="Menge" />
<button type="button" data-menge="1" aria-label="Menge erhöhen">+</button>
</div>
</div>
)}
@@ -36,50 +67,257 @@ const { variants, regionId } = Astro.props;
id="add-to-cart"
data-variant-id={variants[0]?.id}
data-region-id={regionId}
class="rounded-full bg-brand-primary text-brand-ink px-6 py-3 text-sm font-semibold hover:bg-brand-primary-hover transition-colors disabled:opacity-50"
data-versandanteil-variante={giftSurchargeVariantId ?? ""}
data-patenschaft={isSponsorship ? "true" : ""}
data-gutschein={isGiftVoucher ? "true" : ""}
class="btn btn-primary w-full disabled:pointer-events-none disabled:opacity-55"
>
In den Warenkorb
</button>
<p id="add-to-cart-status" class="mt-3 text-sm text-brand-text-muted hidden"></p>
<p id="add-to-cart-status" role="status" class="mt-3.5 hidden text-sm text-brand-text"></p>
</div>
<script>
import { createCart, addLineItem } from "../lib/cart";
import { getCartIdClient, setCartIdClient } from "../lib/cartCookie";
const button = document.getElementById("add-to-cart") as HTMLButtonElement | null;
const status = document.getElementById("add-to-cart-status");
// astro:page-load feuert beim ersten Laden und nach jedem
// View-Transition-Wechsel.
/**
* Eine fehlende oder falsche Angabe des Kunden. Ihre Meldung wird
* angezeigt — anders als technische Fehler, die nichts erklären würden.
*/
class Eingabefehler extends Error {}
function selectedVariantId(): string | undefined {
const checked = document.querySelector<HTMLInputElement>('input[name="variant"]:checked');
return checked?.value || button?.dataset.variantId;
}
document.addEventListener("astro:page-load", () => {
button?.addEventListener("click", async () => {
const variantId = selectedVariantId();
if (!variantId) return;
const button = document.getElementById("add-to-cart") as HTMLButtonElement | null;
const status = document.getElementById("add-to-cart-status");
button.disabled = true;
try {
let cartId = getCartIdClient();
if (!cartId) {
const cart = await createCart(button.dataset.regionId!);
cartId = cart.id;
setCartIdClient(cartId);
}
await addLineItem(cartId, variantId, 1);
window.dispatchEvent(new CustomEvent("cart:updated"));
if (status) {
status.textContent = "Zum Warenkorb hinzugefügt.";
status.classList.remove("hidden");
}
} catch {
if (status) {
status.textContent = "Das hat leider nicht geklappt. Bitte erneut versuchen.";
status.classList.remove("hidden");
}
} finally {
button.disabled = false;
function selectedVariantId(): string | undefined {
const checked = document.querySelector<HTMLInputElement>('input[name="variant"]:checked');
return checked?.value || button?.dataset.variantId;
}
/**
* Die Menge. Beim Abo steuert sie die Gläser je Lieferung und steht in
* der Sortenauswahl; bei allen anderen Produkten steht sie hier.
*/
function quantityInput(): HTMLInputElement | null {
return (document.getElementById("subscription-quantity") ??
document.getElementById("menge")) as HTMLInputElement | null;
}
function selectedQuantity(): number {
const input = quantityInput();
if (!input) return 1;
const value = Math.trunc(Number(input.value));
if (!Number.isFinite(value)) return 1;
return Math.min(Number(input.max) || 99, Math.max(1, value));
}
// Die beiden Knöpfe am Mengenwähler.
document.querySelectorAll<HTMLButtonElement>("[data-menge]").forEach((button) => {
button.addEventListener("click", () => {
const input = document.getElementById("menge") as HTMLInputElement | null;
if (!input) return;
const schritt = Number(button.dataset.menge);
const wert = Math.trunc(Number(input.value)) || 1;
input.value = String(Math.min(99, Math.max(1, wert + schritt)));
});
});
/**
* Zusatzangaben am Posten. Steht die Abo-Sortenauswahl auf der Seite,
* reist die Wahl hier mit; bei allen anderen Produkten bleibt es leer.
*
* Bei fester Sorte ist es eine Angabe je Glas, in derselben Reihenfolge
* wie die Felder auf der Seite — die Liste ist damit genauso lang wie
* die Menge des Postens.
*/
function collectMetadata(): Record<string, unknown> | undefined {
if (!document.getElementById("subscription-options")) return undefined;
const mode =
document.querySelector<HTMLInputElement>('input[name="subscription_selection"]:checked')
?.value ?? "random";
if (mode !== "fixed") return { subscription_selection: "random" };
const selects = Array.from(
document.querySelectorAll<HTMLSelectElement>(
"#subscription-variety-list .subscription-variety"
)
);
const variantIds = selects.map((select) => select.value).filter(Boolean);
if (variantIds.length === 0) return { subscription_selection: "random" };
return {
subscription_selection: "fixed",
subscription_variant_ids: variantIds,
// Erster Eintrag zusätzlich einzeln: ältere Leser im Backend fallen
// darauf zurück, wenn sie die Liste nicht kennen.
subscription_variant_id: variantIds[0],
subscription_varieties: selects.map(
(select) => select.selectedOptions[0]?.textContent?.trim() ?? ""
),
};
}
/**
* Die Geschenkangaben, falls verschenkt wird.
*
* Beim Geschenk zahlt der Käufer alle Lieferungen auf einmal — die
* Menge im Warenkorb ist deshalb Gläser × Lieferungen. Das Backend
* rechnet daraus zurück, wie viele Gläser je Lieferung rausgehen.
*/
function collectGift() {
const verschenkt =
document.querySelector<HTMLInputElement>('input[name="subscription_for"]:checked')?.value ===
"gift";
if (!verschenkt) return null;
const deliveries = Number(
document.querySelector<HTMLInputElement>('input[name="gift_deliveries"]:checked')?.value ?? 0
);
const name = (document.getElementById("gift-recipient-name") as HTMLInputElement | null)?.value.trim() ?? "";
const email = (document.getElementById("gift-recipient-email") as HTMLInputElement | null)?.value.trim() ?? "";
const von = (document.getElementById("gift-sender-name") as HTMLInputElement | null)?.value.trim() ?? "";
if (!deliveries) throw new Eingabefehler("Bitte wählen Sie eine Laufzeit.");
if (name.length < 2) throw new Eingabefehler("Bitte geben Sie den Namen des Beschenkten an.");
if (!/^[^\s@]+@[^\s@]+\.[a-z]{2,}$/i.test(email)) {
throw new Eingabefehler("Bitte geben Sie eine gültige E-Mail-Adresse des Beschenkten an.");
}
return {
deliveries,
metadata: {
subscription_gift: true,
subscription_deliveries: deliveries,
gift_recipient_name: name,
gift_recipient_email: email,
...(von ? { gift_sender_name: von } : {}),
},
};
}
/**
* Die Angaben zur Bienenpatenschaft.
*
* Urkunde und Etikett tragen einen Namen; wird verschenkt, gehören die
* Bilder vom Volk an die Adresse des Beschenkten. Die Angaben reisen als
* Metadaten am Posten mit und stehen damit an der Bestellung.
*/
function collectSponsorship() {
if (button?.dataset.patenschaft !== "true") return null;
const name = (document.getElementById("pate-name") as HTMLInputElement | null)?.value.trim() ?? "";
const verschenkt =
document.querySelector<HTMLInputElement>('input[name="sponsorship_for"]:checked')?.value ===
"gift";
const email = (document.getElementById("pate-email") as HTMLInputElement | null)?.value.trim() ?? "";
const von = (document.getElementById("pate-von") as HTMLInputElement | null)?.value.trim() ?? "";
if (name.length < 2) {
throw new Eingabefehler("Bitte geben Sie den Namen für Urkunde und Etikett an.");
}
if (verschenkt && !/^[^\s@]+@[^\s@]+\.[a-z]{2,}$/i.test(email)) {
throw new Eingabefehler("Bitte geben Sie eine gültige E-Mail-Adresse des Beschenkten an.");
}
return {
sponsorship_name: name,
sponsorship_gift: verschenkt,
...(verschenkt ? { sponsorship_recipient_email: email } : {}),
...(verschenkt && von ? { sponsorship_sender_name: von } : {}),
};
}
/**
* Die Angaben zum Geschenkgutschein.
*
* Geht er direkt an den Beschenkten, reisen Adresse, Absender und
* Nachricht als Metadaten am Posten mit; das Backend verschickt den
* Gutschein nach Zahlungseingang dorthin.
*/
function collectVoucher() {
if (button?.dataset.gutschein !== "true") return null;
const verschenkt =
document.querySelector<HTMLInputElement>('input[name="voucher_for"]:checked')?.value === "gift";
if (!verschenkt) return { voucher_gift: false };
const feld = (id: string) =>
(document.getElementById(id) as HTMLInputElement | HTMLTextAreaElement | null)?.value.trim() ?? "";
const name = feld("gutschein-name");
const email = feld("gutschein-email");
const von = feld("gutschein-von");
const nachricht = feld("gutschein-nachricht").slice(0, 300);
if (name.length < 2) throw new Eingabefehler("Bitte geben Sie den Namen der beschenkten Person an.");
if (!/^[^\s@]+@[^\s@]+\.[a-z]{2,}$/i.test(email)) {
throw new Eingabefehler("Bitte geben Sie eine gültige E-Mail-Adresse der beschenkten Person an.");
}
return {
voucher_gift: true,
voucher_recipient_name: name,
voucher_recipient_email: email,
...(von ? { voucher_sender_name: von } : {}),
...(nachricht ? { voucher_message: nachricht } : {}),
};
}
function showStatus(message: string, tone: "ok" | "error") {
if (!status) return;
status.textContent = message;
status.classList.remove("hidden");
status.classList.toggle("text-brand-text", tone === "ok");
status.classList.toggle("text-[#b4453a]", tone === "error");
}
button?.addEventListener("click", async () => {
const variantId = selectedVariantId();
if (!variantId) return;
const label = button.textContent;
button.disabled = true;
button.textContent = "Wird hinzugefügt";
try {
let cartId = getCartIdClient();
if (!cartId) {
const cart = await createCart(button.dataset.regionId!);
cartId = cart.id;
setCartIdClient(cartId);
}
const geschenk = collectGift();
const patenschaft = collectSponsorship();
const gutschein = collectVoucher();
await addLineItem(
cartId,
variantId,
geschenk ? selectedQuantity() * geschenk.deliveries : selectedQuantity(),
{ ...collectMetadata(), ...(geschenk?.metadata ?? {}), ...(patenschaft ?? {}), ...(gutschein ?? {}) }
);
// Trägt jedes Paket seinen Versand, kommt der Anteil für die
// weiteren Pakete als eigener Posten dazu — eine Bestellung in
// Medusa kann nur einen Versandposten tragen.
const anteilVariante = button.dataset.versandanteilVariante;
if (geschenk && anteilVariante && geschenk.deliveries > 1) {
await addLineItem(cartId, anteilVariante, geschenk.deliveries - 1);
}
window.dispatchEvent(new CustomEvent("cart:updated"));
showStatus("Zum Warenkorb hinzugefügt.", "ok");
} catch (error) {
showStatus(
error instanceof Eingabefehler ? error.message : "Das hat nicht geklappt. Bitte erneut versuchen.",
"error"
);
} finally {
button.disabled = false;
button.textContent = label;
}
});
});
</script>
@@ -0,0 +1,43 @@
{/*
We only ever set strictly-necessary cookies (cart_id, customer_jwt — see
datenschutz.astro §4), which don't require opt-in consent under
§ 25 Abs. 2 Nr. 2 TTDSG. This is therefore an informational notice with
an acknowledge button, not a consent gate. If non-essential cookies
(analytics/marketing) are ever added, this needs to become a real
opt-in consent manager instead.
*/}
<div
id="cookie-notice"
class="fixed inset-x-0 bottom-0 hidden"
style="z-index: var(--z-overlay)"
>
<div class="mx-auto max-w-[84rem] p-3 sm:p-5">
<div class="flex flex-col items-start gap-4 rounded-[var(--radius-card)] bg-brand-ink p-5 text-white/75 shadow-lg sm:flex-row sm:items-center sm:gap-6 sm:p-6">
<p class="flex-1 text-sm leading-relaxed">
Wir verwenden ausschließlich technisch notwendige Cookies für Warenkorb und Login. Mehr dazu in unserer{" "}
<a href="/datenschutz" class="text-white underline underline-offset-2 transition-colors hover:text-brand-primary">Datenschutzerklärung</a>.
</p>
<button id="cookie-notice-dismiss" type="button" class="btn btn-primary shrink-0">
Verstanden
</button>
</div>
</div>
</div>
<script>
// astro:page-load feuert beim ersten Laden und nach jedem
// View-Transition-Wechsel.
document.addEventListener("astro:page-load", () => {
const STORAGE_KEY = "cookie_notice_dismissed";
const notice = document.getElementById("cookie-notice");
if (notice && !localStorage.getItem(STORAGE_KEY)) {
notice.classList.remove("hidden");
}
document.getElementById("cookie-notice-dismiss")?.addEventListener("click", () => {
localStorage.setItem(STORAGE_KEY, "1");
notice?.classList.add("hidden");
});
});
</script>
+12
View File
@@ -0,0 +1,12 @@
{/*
Shown at the top of every legal page (Impressum/Datenschutz/AGB/Widerruf).
These pages were drafted from the real company data we had on hand plus
standard German e-commerce legal patterns, but were never reviewed by a
lawyer — remove this notice only once that review has actually happened.
*/}
<div class="mt-8 rounded-[var(--radius-inner)] border-l-[3px] border-brand-primary bg-brand-honey-tint px-5 py-4 text-sm leading-relaxed text-[#6b4a06]">
<strong class="font-semibold">Entwurf, kein Rechtsrat.</strong> Dieser Text wurde auf Basis der uns bekannten
Firmendaten und gängiger Standardformulierungen erstellt und muss vor Live-Schaltung von einer Anwältin oder
einem Anwalt geprüft werden – insbesondere Registernummer, Kontaktdaten und die Sonderfälle bei Kursen,
Gutscheinen und Patenschaften.
</div>
+115 -16
View File
@@ -1,28 +1,127 @@
---
import { sections, COMPANY_NAME, type Section } from "../lib/sections";
import { layers, mainNav, COMPANY_NAME, BRAND_SUBLINE, CLAIM, type Layer } from "../lib/sections";
interface Props {
section: Section;
layer: Layer;
}
const { section } = Astro.props;
const config = sections[section];
const other = section === "private" ? sections.business : sections.private;
const { layer } = Astro.props;
const config = layers[layer];
// Der Verweis führt immer auf die andere Seite der Grenze: aus dem
// Hauptauftritt in den Shop, aus jeder Ebene zurück in den Hauptauftritt.
const other = layer === "site" ? layers.shop : layers.site;
const year = new Date().getFullYear();
const legal = [
{ label: "Impressum", href: "/impressum" },
{ label: "Datenschutz", href: "/datenschutz" },
{ label: "AGB", href: "/agb" },
{ label: "Widerrufsrecht", href: "/widerrufsrecht" },
// Keine Rechtsseite, steht aber dort, wo Kundinnen und Kunden danach
// suchen — direkt neben dem Widerruf.
{ label: "Versand", href: "/versand" },
// Wortlaut und dauerhafte Erreichbarkeit sind in § 312k BGB vorgeschrieben.
{ label: "Verträge hier kündigen", href: "/kuendigung" },
];
---
<footer class="mt-24 bg-white border-t border-brand-border">
<div class="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8 py-14 grid gap-8 sm:grid-cols-3">
<div>
<p class="font-display text-2xl text-brand-ink">{COMPANY_NAME}</p>
<p class="text-sm text-brand-text-muted mt-1 normal-case">{config.tagline}</p>
<!--
The footer is dark on purpose: it anchors the page and gives the dark
"Bienenbestand" chapter on the business home a partner, so neither reads
as a stray inverted block in an otherwise light layout.
-->
<!-- Haarlinie oben: die Partnerkarte ist ebenfalls dunkel, ohne Kante
liefen beide Blöcke ineinander. -->
<footer class="brand-section relative overflow-hidden border-t border-white/10 bg-brand-ink text-white/70">
<div class="absolute inset-0 honeycomb-bg-dark opacity-60" aria-hidden="true"></div>
<div class="relative mx-auto max-w-[84rem] px-[var(--gutter)] pt-20 pb-10">
<div class="grid gap-14 lg:grid-cols-[1.4fr_1fr_1fr]">
<div>
<p class="font-display text-4xl font-normal leading-none tracking-[0.01em] text-white">{COMPANY_NAME}</p>
<p class="mt-2 text-[0.625rem] uppercase tracking-[0.22em] text-white/45">{BRAND_SUBLINE}</p>
<p class="mt-4 max-w-xs text-[0.9375rem] leading-relaxed text-white/55">{config.tagline}</p>
<p class="eyebrow eyebrow-light mt-6">{CLAIM}</p>
<address class="mt-8 space-y-1.5 text-[0.9375rem] not-italic text-white/60">
<p class="font-medium text-white/85">place4bees GmbH</p>
<p>Isestr. 109, 20149 Hamburg</p>
<p>
<a href="mailto:kontakt@place4bees.com" class="transition-colors hover:text-brand-primary">
kontakt@place4bees.com
</a>
</p>
<p>
<a href="tel:+4916223502002" class="tabular-nums transition-colors hover:text-brand-primary">
+49 162-2 35 02 02
</a>
</p>
</address>
</div>
<nav aria-label="Seitenübersicht">
<p class="eyebrow eyebrow-light">place4bees</p>
<ul class="mt-5 space-y-2.5 text-[0.9375rem]">
{mainNav.map((item) => (
<li>
<a href={item.href} class="transition-colors hover:text-white">{item.label}</a>
</li>
))}
</ul>
{config.nav.length > 0 && (
<>
<p class="eyebrow eyebrow-light mt-8">{config.label}</p>
<ul class="mt-5 space-y-2.5 text-[0.9375rem]">
{config.nav.map((item) => (
<li>
<a href={item.href} class="transition-colors hover:text-white">{item.label}</a>
</li>
))}
</ul>
</>
)}
</nav>
<div>
<p class="eyebrow eyebrow-light">Auch interessant</p>
<a
href={other.homeHref}
class="group mt-5 block rounded-[var(--radius-card)] border border-white/10 bg-white/[0.04] p-6 transition-colors duration-200 hover:border-brand-primary/50 hover:bg-white/[0.07]"
>
<span class="font-display text-2xl font-normal tracking-[0.01em] text-white">{other.label}</span>
<span class="mt-2 flex items-center gap-2 text-sm text-white/55">
{other.tagline.split(".")[0]}
<svg
viewBox="0 0 20 20"
class="h-4 w-4 text-brand-primary transition-transform duration-200 ease-out group-hover:translate-x-1"
fill="none"
stroke="currentColor"
stroke-width="1.75"
aria-hidden="true"
>
<path d="M4 10h12M11 5l5 5-5 5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</span>
</a>
</div>
</div>
<div class="text-sm text-brand-text-muted">
<p class="font-medium text-brand-ink mb-2 normal-case">Auch interessant</p>
<a href={other.homeHref} class="hover:text-brand-primary transition-colors">{other.label}</a>
</div>
<div class="text-sm text-brand-text-muted">
<p class="normal-case">&copy; {year} {COMPANY_NAME}</p>
<div class="mt-16 flex flex-col gap-4 border-t border-white/10 pt-7 text-sm text-white/45 sm:flex-row sm:items-center sm:justify-between">
<p>&copy; {year} {COMPANY_NAME} GmbH</p>
<nav aria-label="Service und Rechtliches" class="flex flex-wrap gap-x-6 gap-y-2">
{legal.map((item) => (
<a
href={item.href}
class:list={[
"transition-colors hover:text-white",
item.href === "/kuendigung" && "text-white/70 underline underline-offset-4",
]}
>
{item.label}
</a>
))}
</nav>
</div>
</div>
</footer>
@@ -0,0 +1,90 @@
---
/**
* Angaben zum Geschenkgutschein.
*
* Der Gutschein kommt nach Zahlungseingang per E-Mail. Wahlweise an den
* Käufer — dann braucht es hier nichts — oder direkt an den Beschenkten,
* mit dessen Adresse, einem Absender und einer persönlichen Nachricht.
*
* Aufbau bewusst wie bei der Bienenpatenschaft, damit sich beides gleich
* anfühlt.
*/
---
<div id="voucher-options">
<fieldset class="mb-7">
<legend class="field-label">Wohin geht der Gutschein?</legend>
<div class="flex flex-col gap-2">
<label class="relative flex cursor-pointer items-start gap-3 rounded-[var(--radius-inner)] border border-brand-border bg-brand-surface-strong p-4 transition-colors duration-250 hover:border-brand-ink has-[:checked]:border-brand-ink has-[:checked]:bg-brand-surface">
<input type="radio" name="voucher_for" value="self" checked class="mt-0.5 h-4 w-4 shrink-0 accent-[var(--color-brand-primary)]" />
<span>
<span class="block font-medium text-brand-ink">An mich</span>
<span class="mt-0.5 block text-sm text-brand-text">
Sie bekommen den Code per E-Mail und geben ihn selbst weiter.
</span>
</span>
</label>
<label class="relative flex cursor-pointer items-start gap-3 rounded-[var(--radius-inner)] border border-brand-border bg-brand-surface-strong p-4 transition-colors duration-250 hover:border-brand-ink has-[:checked]:border-brand-ink has-[:checked]:bg-brand-surface">
<input type="radio" name="voucher_for" value="gift" class="mt-0.5 h-4 w-4 shrink-0 accent-[var(--color-brand-primary)]" />
<span>
<span class="block font-medium text-brand-ink">Direkt an die beschenkte Person</span>
<span class="mt-0.5 block text-sm text-brand-text">
Wir schicken den Gutschein mit Ihrer Nachricht an ihre E-Mail-Adresse, Sie bekommen eine Kopie des Codes.
</span>
</span>
</label>
</div>
</fieldset>
<div id="gutschein-geschenk" class="mb-7 hidden grid gap-4">
<div>
<label class="field-label" for="gutschein-name">Name der beschenkten Person</label>
<input id="gutschein-name" name="voucher_recipient_name" type="text" class="field" autocomplete="off" />
</div>
<div>
<label class="field-label" for="gutschein-email">E-Mail der beschenkten Person</label>
<input id="gutschein-email" name="voucher_recipient_email" type="email" class="field" autocomplete="off" />
<p class="mt-1.5 text-sm text-brand-text-muted">
Dorthin geht der Gutschein, sobald Ihre Zahlung eingegangen ist.
</p>
</div>
<div>
<label class="field-label" for="gutschein-von">Von wem? (optional)</label>
<input id="gutschein-von" name="voucher_sender_name" type="text" class="field" autocomplete="off" />
</div>
<div>
<label class="field-label" for="gutschein-nachricht">Persönliche Nachricht (optional)</label>
<textarea id="gutschein-nachricht" name="voucher_message" rows="3" maxlength="300" class="field"></textarea>
</div>
</div>
</div>
<script>
// astro:page-load feuert beim ersten Laden und nach jedem
// View-Transition-Wechsel.
document.addEventListener("astro:page-load", () => {
const root = document.getElementById("voucher-options");
if (!root) return;
const geschenkblock = document.getElementById("gutschein-geschenk")!;
const name = document.getElementById("gutschein-name") as HTMLInputElement;
const email = document.getElementById("gutschein-email") as HTMLInputElement;
function sync() {
const geschenk =
root!.querySelector<HTMLInputElement>('input[name="voucher_for"]:checked')?.value === "gift";
geschenkblock.classList.toggle("hidden", !geschenk);
// Pflicht nur, solange verschenkt wird — sonst blockierten die Felder
// den Kauf für alle anderen.
name.required = geschenk;
email.required = geschenk;
}
root
.querySelectorAll<HTMLInputElement>('input[name="voucher_for"]')
.forEach((radio) => radio.addEventListener("change", sync));
sync();
});
</script>
+151 -130
View File
@@ -1,163 +1,184 @@
---
import { sections, COMPANY_NAME, type Section } from "../lib/sections";
import { mainNav, layerTabs, layers, COMPANY_NAME, type Layer } from "../lib/sections";
interface Props {
section: Section;
layer: Layer;
}
const { section } = Astro.props;
const config = sections[section];
const { layer } = Astro.props;
const currentPath = Astro.url.pathname;
/** Ein Punkt der Hauptnavigation gilt als aktiv, auch auf seinen Unterseiten. */
const isCurrent = (href: string) =>
currentPath === href || (href !== "/business" && currentPath.startsWith(`${href}/`));
---
<header class="border-b border-brand-ink/10 bg-white/80 backdrop-blur sticky top-0 z-50">
<div class="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8">
<div class="flex h-16 items-center justify-between gap-4">
<a href={config.homeHref} class="flex items-center gap-2 shrink-0">
<img src="/images/place4bees-logo.png" alt="" class="h-10 w-10" />
<span class="font-display text-xl text-brand-ink">{COMPANY_NAME}</span>
<!--
Der Hauptheader. Aufbau wie auf place4bees.com: nur die Biene links, das
Menü rechts, kein Schriftzug — die Wortmarke steht dort erst als Band
unter dem Hero, bei uns im Fuß.
Er schwebt über dem Hero, wie im Original — deshalb `fixed` und nicht
`sticky`. Über dunklen Heros schaltet die Schrift auf Weiß; welche Seite
einen dunklen Hero hat, sagt sie dem Layout über `heroTone`.
Eine Abweichung mit Absicht: er bleibt stehen. Der Live-Header scrollt weg;
mit einem Shop im selben Haus wäre der Warenkorb dann beim Scrollen nicht
mehr erreichbar. Beim Scrollen legt sich deshalb die Glasfläche darunter.
Warenkorb und Konto stehen nicht hier, sondern in der zweiten Leiste der
Shop-Ebene — so bleibt diese Zeile so ruhig wie im Original.
-->
<header id="site-nav" class="fixed inset-x-0 top-0 z-50 py-4 transition-[background-color,box-shadow] duration-200 ease-out">
<div class="scroll-progress" aria-hidden="true"></div>
<div class="mx-auto max-w-[84rem] px-[var(--gutter)]">
<div class="flex h-14 items-center justify-between gap-6">
<a href={layers.site.homeHref} class="group shrink-0" aria-label={`${COMPANY_NAME} Startseite`}>
<img
src="/images/place4bees-biene.png"
alt=""
width="480"
height="480"
class="site-logo h-11 w-auto transition-transform duration-200 ease-out group-hover:-rotate-6 sm:h-12"
/>
</a>
<div class="hidden md:flex items-center gap-1 rounded-full bg-brand-surface p-1">
{Object.entries(sections).map(([key, s]) => (
<div class="hidden xl:flex items-center">
<nav aria-label="Hauptnavigation" class="flex items-center gap-7">
{mainNav.map((item) => {
const active = isCurrent(item.href);
return (
<a
href={item.href}
aria-current={active ? "page" : undefined}
class:list={[
"group relative py-1 text-[1.0625rem] transition-colors duration-200",
active
? "text-[var(--nav-ink-active)]"
: "text-[var(--nav-ink)] hover:text-[var(--nav-ink-active)]",
]}
>
{item.label}
<span
class:list={[
"absolute -bottom-0.5 left-0 h-[1.5px] w-full origin-left bg-[var(--section-accent)] transition-transform duration-200 ease-out",
active ? "scale-x-100" : "scale-x-0 group-hover:scale-x-100",
]}
></span>
</a>
);
})}
</nav>
</div>
{/* Die Reiter öffnen eine Ebene, sie führen nicht auf eine weitere
Seite derselben Art — deshalb sind sie abgesetzt und sehen anders
aus als die Hauptnavigation.
Sie stehen auch dann noch da, wenn die Hauptnavigation längst im
Burger steckt: der Wechsel zwischen Auftritt und Shop ist der eine
Weg, der nie zwei Klicks kosten soll. */}
<div class="ml-auto flex items-center gap-1.5 xl:ml-0 xl:border-l xl:border-[var(--nav-rule)] xl:pl-6">
{layerTabs.map((tab) => (
<a
href={s.homeHref}
class:list={[
"rounded-full px-4 py-1.5 text-sm font-semibold transition-colors",
key === section ? "bg-brand-primary text-brand-ink" : "text-brand-text hover:text-brand-primary",
]}
href={tab.href}
aria-current={layer === tab.layer ? "true" : undefined}
class:list={["layer-tab", layer === tab.layer && "is-active"]}
>
{s.label}
{tab.label}
</a>
))}
</div>
<nav class="hidden md:flex gap-6 items-center">
{config.nav.map((item) => (
<a
href={item.href}
class:list={[
"text-sm font-medium hover:text-brand-primary transition-colors",
currentPath === item.href ? "text-brand-primary" : "text-brand-text",
]}
>
{item.label}
</a>
))}
{section === "private" && (
<a href="/warenkorb" class="relative inline-flex items-center hover:opacity-80 transition-opacity" aria-label="Warenkorb">
<span class="sr-only">Warenkorb</span>
<svg viewBox="0 0 24 24" class="h-7 w-7" aria-hidden="true">
<ellipse cx="12" cy="5.4" rx="6.4" ry="2.1" fill="#8a5a2b" />
<circle cx="12" cy="3.2" r="1.05" fill="#8a5a2b" />
<path d="M5.6 7 C5.6 7 5.1 15 6.6 19 C7.4 21 16.6 21 17.4 19 C18.9 15 18.4 7 18.4 7 Z" fill="#e0a94a" stroke="#a9722a" stroke-width="0.5" />
<rect x="5.8" y="7" width="12.4" height="2.1" rx="1" fill="#c6922f" />
<path d="M12 21 C12 21 13 22.4 12 23.2 C11 22.4 12 21 12 21 Z" fill="#c6922f" />
</svg>
<span
id="cart-badge"
style="display:none"
class="absolute -top-2 -right-2 inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-brand-ink px-1 text-xs text-white ring-2 ring-white"
></span>
</a>
)}
</nav>
<button
id="menu-toggle"
class="md:hidden inline-flex items-center justify-center rounded-md p-2 text-brand-text"
class="xl:hidden inline-flex h-10 w-10 items-center justify-center rounded-full text-[var(--nav-ink)] transition-colors hover:bg-brand-surface-sunk"
aria-label="Menü öffnen"
aria-expanded="false"
aria-controls="mobile-menu"
>
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
<svg viewBox="0 0 24 24" class="h-5 w-5" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" aria-hidden="true">
<path id="menu-icon-top" d="M3.5 8h17" />
<path id="menu-icon-bottom" d="M3.5 16h17" />
</svg>
</button>
</div>
<nav id="mobile-menu" class="md:hidden hidden pb-4 flex flex-col gap-3">
<div class="flex gap-1 rounded-full bg-brand-surface p-1 mb-2">
{Object.entries(sections).map(([key, s]) => (
<a
href={s.homeHref}
class:list={[
"flex-1 text-center rounded-full px-4 py-1.5 text-sm font-semibold transition-colors",
key === section ? "bg-brand-primary text-brand-ink" : "text-brand-text",
]}
>
{s.label}
</a>
))}
<nav
id="mobile-menu"
aria-label="Hauptnavigation mobil"
class="xl:hidden grid grid-rows-[0fr] transition-[grid-template-rows] duration-400 ease-spring"
>
<div class="overflow-hidden">
<div class="flex flex-col gap-1 pt-5 pb-4">
{mainNav.map((item) => (
<a
href={item.href}
aria-current={isCurrent(item.href) ? "page" : undefined}
class:list={[
"rounded-[var(--radius-inner)] px-3 py-2.5 text-[1.0625rem] transition-colors",
isCurrent(item.href)
? "bg-brand-surface-sunk font-medium text-brand-honey-ink"
: "text-brand-ink hover:text-brand-honey-ink",
]}
>
{item.label}
</a>
))}
</div>
</div>
{config.nav.map((item) => (
<a href={item.href} class="text-sm font-medium text-brand-text hover:text-brand-primary">
{item.label}
</a>
))}
{section === "private" && (
<a href="/warenkorb" class="relative inline-flex items-center gap-2 text-sm font-medium text-brand-text hover:text-brand-primary">
<svg viewBox="0 0 24 24" class="h-6 w-6 shrink-0" aria-hidden="true">
<ellipse cx="12" cy="5.4" rx="6.4" ry="2.1" fill="#8a5a2b" />
<circle cx="12" cy="3.2" r="1.05" fill="#8a5a2b" />
<path d="M5.6 7 C5.6 7 5.1 15 6.6 19 C7.4 21 16.6 21 17.4 19 C18.9 15 18.4 7 18.4 7 Z" fill="#e0a94a" stroke="#a9722a" stroke-width="0.5" />
<rect x="5.8" y="7" width="12.4" height="2.1" rx="1" fill="#c6922f" />
<path d="M12 21 C12 21 13 22.4 12 23.2 C11 22.4 12 21 12 21 Z" fill="#c6922f" />
</svg>
Warenkorb
<span
id="cart-badge-mobile"
style="display:none"
class="inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-brand-ink px-1 text-xs text-white"
></span>
</a>
)}
</nav>
</div>
</header>
<script>
const toggle = document.getElementById("menu-toggle");
const menu = document.getElementById("mobile-menu");
toggle?.addEventListener("click", () => {
const isHidden = menu?.classList.contains("hidden");
menu?.classList.toggle("hidden");
toggle.setAttribute("aria-expanded", String(isHidden));
});
</script>
<script>
import { getCart } from "../lib/cart";
import { getCartIdClient } from "../lib/cartCookie";
async function refreshCartBadge() {
const badges = [
document.getElementById("cart-badge"),
document.getElementById("cart-badge-mobile"),
].filter((el): el is HTMLElement => el != null);
if (badges.length === 0) return;
const cartId = getCartIdClient();
if (!cartId) {
badges.forEach((badge) => (badge.style.display = "none"));
return;
}
try {
const cart = await getCart(cartId);
const count = (cart.items ?? []).reduce((sum, item) => sum + item.quantity, 0);
badges.forEach((badge) => {
if (count > 0) {
badge.textContent = String(count);
badge.style.display = "inline-flex";
} else {
badge.style.display = "none";
}
});
} catch {
badges.forEach((badge) => (badge.style.display = "none"));
}
<style>
/* Glassmorphism with an edge highlight: the 1px inset white line is what
* separates real frosted glass from a plain blurred rectangle. */
/* Glasfläche beim Scrollen — und ebenso, sobald das Mobilmenü offen ist:
* dessen Einträge lägen sonst frei auf dem Hero-Foto. */
#site-nav.is-scrolled,
#site-nav.is-menu-open {
background: rgb(250 248 243 / 0.72);
backdrop-filter: blur(16px) saturate(1.4);
-webkit-backdrop-filter: blur(16px) saturate(1.4);
box-shadow:
inset 0 1px 0 rgb(255 255 255 / 0.6),
0 1px 0 rgb(231 227 218 / 0.9),
0 12px 28px -18px rgb(26 24 20 / 0.3);
}
refreshCartBadge();
window.addEventListener("cart:updated", refreshCartBadge);
#mobile-menu.is-open {
grid-template-rows: 1fr;
}
</style>
<script>
document.addEventListener("astro:page-load", () => {
const nav = document.getElementById("site-nav");
const sentinel = document.getElementById("scroll-sentinel");
if (nav && sentinel) {
// IntersectionObserver statt scroll-Listener: der Browser meldet nur den
// Zustandswechsel, nicht jeden Frame.
// Kein rootMargin: die Schwelle steckt in der Höhe des Markers.
new IntersectionObserver(([entry]) =>
nav.classList.toggle("is-scrolled", !entry.isIntersecting)
).observe(sentinel);
}
const toggle = document.getElementById("menu-toggle");
const menu = document.getElementById("mobile-menu");
const iconTop = document.getElementById("menu-icon-top");
const iconBottom = document.getElementById("menu-icon-bottom");
toggle?.addEventListener("click", () => {
const open = menu?.classList.toggle("is-open") ?? false;
nav?.classList.toggle("is-menu-open", open);
toggle.setAttribute("aria-expanded", String(open));
toggle.setAttribute("aria-label", open ? "Menü schließen" : "Menü öffnen");
// Morph the two bars into an X rather than swapping icons.
iconTop?.setAttribute("d", open ? "M5.5 5.5l13 13" : "M3.5 8h17");
iconBottom?.setAttribute("d", open ? "M18.5 5.5l-13 13" : "M3.5 16h17");
});
});
</script>
+466
View File
@@ -0,0 +1,466 @@
---
/**
* Der Gruß für Besucher, die von hhonig.de kommen.
*
* Eine Biene mit dem alten Namen fliegt gegen die Scheibe — also gegen den
* Bildschirm — und hinterlässt die Wortmarke PLACE4BEES als Honigabdruck.
* Die Botschaft dahinter: anderer Name, dieselben Menschen.
*
* Läuft genau einmal je Besucher und nur dann, wenn er tatsächlich von dort
* kommt (Verweis oder Domain). Zum Vorführen und Verschicken lässt er sich
* mit `?hallo=hhonig` erzwingen.
*
* Als <dialog>, nicht als eigene Ebene: damit übernimmt der Browser den
* Top-Layer, das Einfangen des Tastaturfokus und Escape zum Schließen.
*/
---
<dialog id="hhonig-hallo" class="hallo" aria-labelledby="hallo-titel">
<div class="hallo-inhalt">
<!-- Der Aufprall. Alles darin ist Bild, keine Information. Biene und
Ring liegen im Abdruck, damit sie genau dort auftreffen, wo der
Honig hinkommt. -->
<div class="hallo-abdruck" aria-hidden="true">
<div class="hallo-klecks"></div>
<div class="hallo-logo"></div>
<div class="hallo-tropfen hallo-tropfen-1"></div>
<div class="hallo-tropfen hallo-tropfen-2"></div>
<div class="hallo-ring"></div>
<div class="hallo-biene">
<div class="hallo-biene-innen">
<img
class="hallo-altmarke"
src="/images/imkerei-bjoern-schumann-logo.png"
alt=""
width="320"
height="320"
/>
</div>
</div>
</div>
<div class="hallo-text">
<p class="hallo-kicker">Kennen wir uns?</p>
<h2 id="hallo-titel" class="hallo-titel">
Aus Imkerei Björn Schumann<br />wird place4bees
</h2>
<p class="hallo-lede">
Anderer Name, dieselben Menschen. Björn imkert weiter, der Honig
kommt aus denselben Völkern — er steht jetzt nur in einem anderen Glas.
</p>
{/* Ein echter Verweis, kein reiner Schließen-Knopf: wer den Gruß von
einer anderen Seite aus sieht, soll damit im Shop landen. */}
<a href="/shop" class="btn btn-primary hallo-weiter" data-hallo-close>Zum Honig</a>
</div>
</div>
</dialog>
<style>
/* Der ganze Ablauf hängt an dieser einen Dauer. Die Anteile unten sind
Prozente davon, damit nichts auseinanderläuft — wer den Gruß schneller
oder langsamer will, ändert genau diese eine Zahl.
Grobe Aufteilung bei 5400ms:
0 – 1400ms die Biene fliegt heran und wächst auf volle Größe
1400 – 2700ms sie steht still im Vordergrund — hier liest man die
alte Marke, das ist der Wiedererkennungsmoment
2700 – 2860ms Stoß und Aufprall
2860 – 4050ms der Honig läuft auseinander, die Wortmarke erscheint
ab 3900ms der Text blendet auf */
.hallo {
--hallo-dauer: 5400ms;
/* Honig, von hell nach dunkel — der Abdruck bekommt daraus seinen Glanz. */
--honig-hell: #ffe0a3;
--honig: #f8ac11;
--honig-tief: #c9820a;
}
.hallo[open] {
position: fixed;
inset: 0;
display: grid;
place-items: center;
max-width: 100vw;
max-height: 100dvh;
width: 100vw;
height: 100dvh;
margin: 0;
padding: var(--gutter);
border: 0;
background: transparent;
overflow: hidden;
}
/* Die Scheibe: die Seite bleibt dahinter sichtbar, nur leicht beschlagen.
Sonst wäre es eine Wand, gegen die man fliegt, kein Fenster.
Die Deckkraft ist nicht frei gewählt: der Gruß liegt seit dem Umbau
über der hellen Shopseite, und weißer Fließtext braucht darauf
mindestens 4,5:1. Bei 0,55 waren es 3,95:1, bei 0,7 sind es 6,3:1. */
.hallo::backdrop {
background: rgb(33 35 38 / 0.7);
backdrop-filter: blur(3px) saturate(1.1);
-webkit-backdrop-filter: blur(3px) saturate(1.1);
}
/* Abdruck oben, Text darunter — beides in einer Spalte. Vorher lagen sie
beide in der Mitte und der Text stand auf dem Honig. */
.hallo-inhalt {
display: grid;
justify-items: center;
gap: clamp(1.5rem, 4vh, 3rem);
max-height: 100%;
}
/* --- Die Biene ---------------------------------------------------------
Zwei Ebenen: außen der Weg, innen Größe und Drehung. Zusammen in einem
transform würden sie sich gegenseitig überschreiben. */
/* Mittig im Abdruck: der Flug endet genau dort, wo der Honig landet. */
.hallo-biene {
position: absolute;
top: 50%;
left: 50%;
margin: -3.5rem 0 0 -4.5rem;
animation: hallo-weg var(--hallo-dauer) forwards;
}
.hallo-biene-innen {
display: grid;
justify-items: center;
gap: 0.5rem;
animation: hallo-anflug var(--hallo-dauer) forwards;
}
/**
* Die alte Marke: das Logo der Imkerei Björn Schumann von hhonig.de.
*
* Die Plakette ist kreisrund auf durchsichtigem Grund. Der Schatten läuft
* deshalb über `drop-shadow` und nicht über `box-shadow` — letzterer
* folgte dem quadratischen Rahmen und legte eine Kante um den Kreis.
*
* Sie ist bewusst groß: wer von hhonig.de kommt, soll die Marke erkennen,
* die er kennt, bevor der Honig sie überdeckt.
*/
.hallo-altmarke {
/* Mitwachsend statt fester Wert mit Deckel: die Plakette trägt Schrift
am Rand, die auf schmalen Schirmen sonst zu klein wird. Dieselbe
Schreibweise wie beim Ring darunter, damit beide im Verhältnis
bleiben. */
width: min(15rem, 46vw);
height: auto;
filter: drop-shadow(0 10px 30px rgb(0 0 0 / 0.45));
}
@keyframes hallo-weg {
/* Von weit oben rechts, wie durch den Garten hereingeflogen. Ab 26% ist
sie da und bleibt stehen — nur ein leichtes Schweben, damit sie in der
Haltephase nicht eingefroren wirkt. */
0% { transform: translate(42vw, -36vh); }
12% { transform: translate(30vw, -20vh); animation-timing-function: cubic-bezier(0.45, 0.05, 0.75, 0.35); }
26% { transform: translate(0, 0); animation-timing-function: ease-in-out; }
34% { transform: translate(0, -1.1vh); animation-timing-function: ease-in-out; }
42% { transform: translate(0, 0.7vh); animation-timing-function: ease-in-out; }
50% { transform: translate(0, 0); }
100% { transform: translate(0, 0); }
}
@keyframes hallo-anflug {
/* Beschleunigend – hier ist ein Ease-in ausnahmsweise richtig: das ist
ein Körper, der auf die Scheibe zufliegt, kein Bedienelement. */
0% { transform: scale(0.07) rotate(-16deg); opacity: 0; animation-timing-function: cubic-bezier(0.55, 0.06, 0.68, 0.19); }
6% { opacity: 1; }
/* Angekommen: gerade gerückt und in voller Größe. */
26% { transform: scale(1.15) rotate(0deg); opacity: 1; animation-timing-function: ease-in-out; }
/* Haltephase — hier wird die alte Marke gelesen. */
50% { transform: scale(1.15) rotate(0deg); opacity: 1; animation-timing-function: cubic-bezier(0.55, 0.06, 0.68, 0.19); }
/* Der Stoß auf die Scheibe. */
52% { transform: scale(1.45) rotate(5deg); opacity: 1; }
/* Aufprall: weg ist sie. */
53% { transform: scale(1.9) rotate(11deg); opacity: 0; }
100% { transform: scale(1.9) rotate(11deg); opacity: 0; }
}
/* --- Der Aufprall ----------------------------------------------------- */
.hallo-ring {
position: absolute;
top: 50%;
left: 50%;
translate: -50% -50%;
width: min(46vw, 18rem);
aspect-ratio: 1;
border-radius: 50%;
border: 2px solid var(--honig-hell);
opacity: 0;
animation: hallo-ring var(--hallo-dauer) forwards;
}
@keyframes hallo-ring {
0%, 52% { transform: scale(0.15); opacity: 0; }
54% { transform: scale(0.2); opacity: 0.9; animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
70% { transform: scale(1.7); opacity: 0; }
100% { transform: scale(1.7); opacity: 0; }
}
/* --- Der Honigabdruck --------------------------------------------------
Der Klecks läuft auseinander, die Wortmarke wird darin sichtbar. */
.hallo-abdruck {
position: relative;
display: grid;
place-items: center;
width: min(70vw, 27rem);
}
.hallo-klecks {
grid-area: 1 / 1;
width: 100%;
aspect-ratio: 1.5;
background: radial-gradient(ellipse at 42% 38%, var(--honig-hell) 0%, var(--honig) 42%, var(--honig-tief) 78%, rgb(201 130 10 / 0) 100%);
/* Unrunde Ränder: ein Spritzer ist kein Kreis. */
border-radius: 54% 46% 38% 62% / 48% 58% 42% 52%;
opacity: 0;
animation: hallo-klecks var(--hallo-dauer) forwards;
}
@keyframes hallo-klecks {
0%, 52% { transform: scale(0.1); opacity: 0; }
54% { transform: scale(0.32); opacity: 0.95; animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
75%, 100% { transform: scale(1); opacity: 0.95; }
}
/**
* Die Wortmarke als Maske über einem Verlauf, nicht als Bild — so bekommt
* sie eine Tiefe, die ein flaches PNG nicht hat.
*
* Der Verlauf ist bewusst dunkel: golden auf dem Honigfleck war Gold auf
* Gold und praktisch nicht zu lesen. Dunkel liest sich zudem richtiger —
* ein Abdruck ist die Stelle, wo der Honig dichter steht. Der helle
* Schlagschatten hebt sie aus der Fläche.
*/
.hallo-logo {
grid-area: 1 / 1;
/* Breite und Verhältnis hängen am Klecks: der ist 1,5 : 1, das Logo
1,27 : 1. Bei den früheren 88 % liefe es oben und unten heraus —
64 % füllen rund drei Viertel der Kleckshöhe, wie vorher auch. */
width: 64%;
aspect-ratio: 1890 / 1486;
background: linear-gradient(152deg, #4a3a16 0%, #2a2109 38%, #171105 72%, #322611 100%);
-webkit-mask: url("/images/newLogo.png") center / contain no-repeat;
mask: url("/images/newLogo.png") center / contain no-repeat;
filter: drop-shadow(0 2px 3px rgb(255 240 205 / 0.65));
opacity: 0;
animation: hallo-logo var(--hallo-dauer) forwards;
}
@keyframes hallo-logo {
0%, 56% { transform: scale(0.86); opacity: 0; }
60% { opacity: 1; animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
80%, 100% { transform: scale(1); opacity: 1; }
}
/* Zwei Tropfen laufen nach unten weg. */
.hallo-tropfen {
grid-area: 1 / 1;
align-self: end;
width: 0.7rem;
height: 2.4rem;
border-radius: 40% 40% 50% 50% / 18% 18% 46% 46%;
background: linear-gradient(180deg, var(--honig) 0%, var(--honig-tief) 100%);
transform-origin: top center;
opacity: 0;
animation: hallo-tropfen var(--hallo-dauer) forwards;
}
.hallo-tropfen-1 { justify-self: center; margin-left: -18%; }
.hallo-tropfen-2 { justify-self: center; margin-left: 24%; height: 1.7rem; animation-delay: 180ms; }
@keyframes hallo-tropfen {
0%, 66% { transform: translateY(-40%) scaleY(0.1); opacity: 0; }
70% { opacity: 0.95; animation-timing-function: cubic-bezier(0.55, 0.06, 0.68, 0.19); }
94%, 100% { transform: translateY(75%) scaleY(1); opacity: 0.95; }
}
/* --- Der Text ---------------------------------------------------------- */
.hallo-text {
max-width: 34rem;
text-align: center;
color: #fff;
opacity: 0;
animation: hallo-text var(--hallo-dauer) forwards;
}
@keyframes hallo-text {
0%, 72% { transform: translateY(14px); opacity: 0; }
90%, 100% { transform: translateY(0); opacity: 1; animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
}
.hallo-kicker {
font-family: var(--font-sans);
font-size: var(--text-eyebrow);
font-weight: 500;
letter-spacing: 0.22em;
text-transform: uppercase;
color: var(--honig);
}
.hallo-titel {
margin-top: 0.75rem;
font-family: var(--font-display);
font-size: clamp(2rem, 1.2rem + 3.2vw, 3.25rem);
font-weight: 400;
line-height: 0.94;
letter-spacing: 0.01em;
color: #fff;
}
.hallo-lede {
margin: 1rem auto 0;
max-width: 40ch;
font-size: 1rem;
line-height: 1.6;
color: rgb(255 255 255 / 0.78);
}
.hallo-weiter {
margin-top: 1.75rem;
}
/* Beim Schließen tritt alles zusammen ab, statt zu verschwinden. */
.hallo.is-closing {
animation: hallo-schluss 380ms cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
@keyframes hallo-schluss {
to { opacity: 0; transform: scale(1.03); }
}
/* Weniger Bewegung heißt hier: kein Anflug, kein Aufprall. Die Botschaft
bleibt, sie blendet nur auf. */
@media (prefers-reduced-motion: reduce) {
.hallo-biene,
.hallo-ring,
.hallo-tropfen {
display: none;
}
.hallo-klecks,
.hallo-logo,
.hallo-text {
animation: hallo-aufblenden 240ms ease-out forwards;
}
@keyframes hallo-aufblenden {
from { opacity: 0; }
to { opacity: 1; }
}
}
@media (max-width: 640px) {
.hallo-titel { font-size: clamp(1.75rem, 1rem + 4vw, 2.5rem); }
}
/* Kurze Fenster: der Abdruck weicht, damit die Botschaft ganz dasteht. */
@media (max-height: 680px) {
.hallo-abdruck { width: min(50vw, 17rem); }
.hallo-lede { display: none; }
}
</style>
<script>
/**
* Wann der Gruß läuft.
*
* Genau einmal je Besucher, und nur wenn er wirklich von hhonig.de kommt:
* entweder über einen Verweis von dort, oder weil er die Seite unter
* dieser Domain aufgerufen hat. `?hallo=hhonig` erzwingt ihn zum
* Vorführen, `?hallo=aus` setzt die Merkung zurück.
*/
const MERKER = "p4b:hhonig-hallo";
const ALTE_DOMAIN = "hhonig.de";
function kommtVonHhonig() {
if (location.hostname.includes(ALTE_DOMAIN)) return true;
try {
return Boolean(document.referrer) && new URL(document.referrer).hostname.includes(ALTE_DOMAIN);
} catch {
return false;
}
}
function schonGesehen() {
// Privates Fenster oder gesperrter Speicher: dann lieber einmal zu oft
// zeigen als der Aufruf zu einem Fehler wird.
try {
return localStorage.getItem(MERKER) === "1";
} catch {
return false;
}
}
function merken() {
try {
localStorage.setItem(MERKER, "1");
} catch {
/* egal */
}
}
document.addEventListener("astro:page-load", () => {
const dialog = document.getElementById("hhonig-hallo") as HTMLDialogElement | null;
if (!dialog || typeof dialog.showModal !== "function") return;
if (dialog.open) return;
const wunsch = new URLSearchParams(location.search).get("hallo");
if (wunsch === "aus") {
try {
localStorage.removeItem(MERKER);
} catch {
/* egal */
}
return;
}
const erzwungen = wunsch === "hhonig";
if (!erzwungen && (schonGesehen() || !kommtVonHhonig())) return;
dialog.showModal();
merken();
let schliessend = false;
function schliessen() {
if (schliessend) return;
schliessend = true;
dialog!.classList.add("is-closing");
/**
* Schließen und aufräumen in einem Schritt.
*
* Das Aufräumen hing vorher am `close`-Ereignis des Dialogs — und das
* kommt nicht verlässlich an: in einem Hintergrund-Tab bleibt es aus,
* selbst mehrere Sekunden nach `close()`. Zurück blieben die Klasse
* `is-closing` und ein gesetztes `schliessend`, womit sich der Gruß
* innerhalb desselben Seitenaufbaus kein zweites Mal hätte schließen
* lassen. Jetzt passiert es dort, wo wir es selbst auslösen.
*/
const fertig = () => {
dialog!.close();
dialog!.classList.remove("is-closing");
schliessend = false;
};
// Nach dem Abtritt wirklich schließen. Der Timer ist der Notausgang,
// falls die Animation gar nicht erst läuft.
dialog!.addEventListener("animationend", fertig, { once: true });
setTimeout(fertig, 600);
}
// Klick irgendwohin, der Knopf, oder Escape (das kann <dialog> selbst).
dialog.addEventListener("click", schliessen);
dialog.querySelector("[data-hallo-close]")?.addEventListener("click", schliessen);
// Kein Zeitablauf: der Gruß bleibt stehen, bis der Besucher ihn wegklickt.
// Er läuft ohnehin nur ein einziges Mal je Besucher, und wer gerade
// liest, soll nicht mitten im Satz aus der Seite geworfen werden.
// Hinaus führen: Klick irgendwohin, Escape, oder „Zum Honig".
});
</script>
@@ -0,0 +1,69 @@
---
/**
* Schickt die Kontaktformulare ab.
*
* Ein Skript für alle drei Formulare: sie unterscheiden sich im Aussehen,
* nicht in dem, was sie tun. Jedes Formular trägt `data-kontakt="<quelle>"`
* und bekommt darüber sein Verhalten — Name, E-Mail und Nachricht heißen in
* den Vorlagen unterschiedlich, das gleicht die Zuordnung unten aus.
*/
---
<script>
import { sendContactRequest } from "../lib/contact";
// astro:page-load feuert beim ersten Laden und nach jedem
// View-Transition-Wechsel.
document.addEventListener("astro:page-load", () => {
document.querySelectorAll<HTMLFormElement>("form[data-kontakt]").forEach((form) => {
const status = form.querySelector<HTMLElement>("[data-kontakt-status]");
const knopf = form.querySelector<HTMLButtonElement>('button[type="submit"]');
form.addEventListener("submit", async (event) => {
event.preventDefault();
const daten = new FormData(form);
const melden = (text: string, art: "fehler" | "erfolg") => {
if (!status) return;
status.textContent = text;
status.classList.remove("hidden");
status.dataset.art = art;
};
status?.classList.add("hidden");
if (knopf) knopf.disabled = true;
const beschriftung = knopf?.textContent;
if (knopf) knopf.textContent = "Wird gesendet …";
try {
await sendContactRequest({
quelle: form.dataset.kontakt ?? "",
name: String(daten.get("name") ?? ""),
email: String(daten.get("email") ?? ""),
// Die Vorlagen benennen das Textfeld verschieden.
nachricht: String(daten.get("nachricht") ?? daten.get("message") ?? ""),
datenschutz: daten.get("datenschutz") === "on",
website: String(daten.get("website") ?? ""),
seite: location.pathname,
});
form.reset();
melden(
"Danke — Ihre Nachricht ist bei uns. Wir melden uns.",
"erfolg"
);
} catch (error) {
melden(
error instanceof Error ? error.message : "Es ist ein Fehler aufgetreten.",
"fehler"
);
} finally {
if (knopf) {
knopf.disabled = false;
if (beschriftung) knopf.textContent = beschriftung;
}
}
});
});
});
</script>
+60
View File
@@ -0,0 +1,60 @@
---
interface Props {
label: string;
title: string;
lede?: string;
/** Optional photo used as a full-bleed backdrop instead of the textured
* cream ground. */
image?: string;
imageAlt?: string;
}
const { label, title, lede, image, imageAlt = "" } = Astro.props;
const dark = Boolean(image);
---
<!--
Shared page header. Subpages previously opened directly on a section
heading, which made every one of them start at the same visual altitude as
its own body copy. This gives each page one clear entry point.
-->
<section
class:list={[
"brand-section relative overflow-hidden",
dark ? "bg-brand-ink" : "honeycomb-bg",
]}
>
{image ? (
<img
src={image}
alt={imageAlt}
class="absolute inset-0 h-full w-full object-cover opacity-45"
aria-hidden={imageAlt === "" ? "true" : undefined}
/>
) : null}
{image ? (
<div
class="absolute inset-0 bg-gradient-to-r from-brand-ink via-brand-ink/80 to-brand-ink/40"
aria-hidden="true"
>
</div>
) : null}
<div class="relative mx-auto max-w-[84rem] px-[var(--gutter)] pt-36 pb-16 sm:pt-44 sm:pb-24">
<span class:list={["reveal section-label", dark && "section-label-light"]}>{label}</span>
<h1
class:list={["reveal mt-6 max-w-[16ch]", dark ? "text-white" : "text-brand-ink"]}
style="--delay: 0.08s"
>
{title}
</h1>
{lede && (
<p
class:list={["reveal lede mt-7", dark ? "text-white/70" : "text-brand-text"]}
style="--delay: 0.16s"
>
{lede}
</p>
)}
</div>
</section>
+36 -13
View File
@@ -2,19 +2,42 @@
import { partners } from "../lib/partners";
---
<section class="bg-white">
<div class="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8 py-16 sm:py-20">
<p class="text-xs font-semibold uppercase tracking-[0.25em] text-brand-accent text-center">Vertrauen uns</p>
<h2 class="mt-2 text-3xl text-brand-ink text-center">Unsere Partner</h2>
<div class="mt-10 grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-6 gap-8 items-center">
{partners.map((partner) => (
<img
src={`/images/partners/${partner.file}`}
alt={partner.name}
title={partner.name}
class="h-12 w-auto mx-auto object-contain grayscale opacity-70 hover:opacity-100 hover:grayscale-0 transition"
/>
))}
<!--
Logo-Wand in Vollfarbe. Auf place4bees.com ist das der größte Trust-Block
der Seite — die Marken sind das Argument, und Graustufen nehmen ihnen
genau das. Jedes Logo sitzt auf einer eigenen weißen Kachel, damit die
sehr unterschiedlichen Formate und Hintergründe eine gemeinsame Grundlinie
bekommen.
-->
<section class="brand-section bg-brand-surface py-[calc(var(--section-y)*0.85)]">
<div class="mx-auto max-w-[84rem] px-[var(--gutter)]">
<div class="reveal flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between">
<div>
<span class="section-label section-label-green">Vertrauen</span>
<h2 class="mt-5">Unsere Partner</h2>
</div>
<p class="text-[0.9375rem] text-brand-text-muted sm:pb-2 sm:text-right">
<span class="font-medium tabular-nums text-brand-ink">{partners.length}</span> Unternehmen und Hotels
<br class="hidden sm:block" />mit Bienen vor Ort
</p>
</div>
<ul class="mt-14 grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5">
{partners.map((partner, index) => (
<li
class="reveal flex aspect-[3/2] items-center justify-center rounded-[var(--radius-inner)] bg-brand-surface-strong p-6 transition-transform duration-400 ease-spring hover:-translate-y-1"
style={`--delay: ${(index % 5) * 0.04}s`}
>
<img
src={`/images/partners/${partner.file}`}
alt={`Logo ${partner.name}`}
title={partner.name}
loading="lazy"
decoding="async"
class="max-h-full w-full object-contain"
/>
</li>
))}
</ul>
</div>
</section>
+598
View File
@@ -0,0 +1,598 @@
---
import { partners, locatedPartners } from "../lib/partners";
import {
STATES,
DETAIL_STATES,
VIEWS,
MAP_WIDTH,
MAP_HEIGHT,
HAMBURG,
RIVERS,
WATER,
REGION_LABELS,
project,
type MapView,
} from "../lib/germanyMap";
interface Props {
view?: MapView;
eyebrow?: string;
title?: string;
}
const { view = "hamburg", eyebrow = "Vertrauen", title = "Unsere Partner" } = Astro.props;
const [vx, vy, vw, vh] = VIEWS[view].split(" ").map(Number);
// Position jedes Standorts als Prozentwert im Kartenrahmen. Der Container
// bekommt exakt das aspect-ratio des viewBox, deshalb stimmen die Prozente
// unabhängig von der Rendergröße.
const pins = locatedPartners
.map((partner) => {
const { x, y } = project(partner.location.lat, partner.location.lng);
return {
id: partner.file.replace(/\.[a-z]+$/i, ""),
partner,
left: ((x - vx) / vw) * 100,
top: ((y - vy) / vh) * 100,
};
})
.filter((p) => p.left >= 0 && p.left <= 100 && p.top >= 0 && p.top <= 100);
// Westliche Standorte hängen links, östliche rechts — dadurch kreuzen sich
// die Verbindungslinien nicht. Innerhalb der Spalte nach Nord-Süd sortiert.
const sorted = [...pins].sort((a, b) => a.left - b.left);
const half = Math.ceil(sorted.length / 2);
const leftColumn = sorted.slice(0, half).sort((a, b) => a.top - b.top);
const rightColumn = sorted.slice(half).sort((a, b) => a.top - b.top);
// Alle Standorte liegen in Hamburg; das Bundesland wird deshalb als
// einziges hervorgehoben, die Nachbarn geben nur Kontext.
const highlighted = new Set(["Hamburg"]);
const withoutLocation = partners.filter((p) => !p.location);
---
<!--
Partnerkarte: echte Bundesland-Umrisse (siehe lib/germanyMap.ts), ein
Bienenstock je hinterlegtem Standort und eine Verbindungslinie zum Logo.
Alles kommt aus lib/partners.ts — ein neuer Eintrag mit `location` erzeugt
Nadel, Linie und Logo automatisch; ohne `location` erscheint der Partner
nur in der Logo-Wand darunter.
-->
<section class="brand-section relative overflow-hidden bg-brand-surface py-[calc(var(--section-y)*0.85)]">
<div class="absolute inset-0 honeycomb-bg opacity-35" aria-hidden="true"></div>
<div class="relative mx-auto max-w-[92rem] px-[var(--gutter)]">
<div class="reveal flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between">
<div>
<span class="section-label section-label-green">{eyebrow}</span>
<h2 class="mt-5">{title}</h2>
</div>
<p class="text-[0.9375rem] text-brand-text-muted sm:pb-2 sm:text-right">
<span class="font-medium tabular-nums text-brand-ink">{partners.length}</span> Unternehmen und Hotels
<br class="hidden sm:block" />mit Bienen vor Ort
</p>
</div>
<div id="partner-map" class="reveal relative mt-14" style="--delay: 0.08s">
<!-- Verbindungslinien: per JS gezeichnet, weil die Logo-Positionen erst
im Layout feststehen. Ohne JS fehlen nur die Linien. -->
<svg
id="partner-map-links"
class="pointer-events-none absolute inset-0 hidden h-full w-full lg:block"
aria-hidden="true"
>
</svg>
<div class="grid items-center gap-8 lg:grid-cols-[minmax(0,0.85fr)_minmax(0,3.2fr)_minmax(0,0.85fr)] lg:gap-8">
<ul class="hidden flex-col gap-2 lg:flex">
{leftColumn.map((pin) => (
<li>
<button type="button" class="map-logo map-logo-left" data-partner={pin.id}>
<img src={`/images/partners/${pin.partner.file}`} alt={`Logo ${pin.partner.name}`} loading="lazy" />
<span class="map-logo-place">{pin.partner.location.label}</span>
</button>
</li>
))}
</ul>
<div
class="map-panel relative overflow-hidden rounded-[var(--radius-card)] shadow-md ring-1 ring-brand-border"
style={`aspect-ratio: ${vw} / ${vh}`}
>
<svg
viewBox={VIEWS[view]}
class="h-full w-full"
role="img"
aria-label={`Karte mit ${pins.length} Bienenstandorten in und um Hamburg`}
>
<defs>
{DETAIL_STATES.map((state) => <path id={`st-${state.id}`} d={state.d} />)}
</defs>
<g class="map-backdrop" aria-hidden="true">
{DETAIL_STATES.map((state) => <use href={`#st-${state.id}`} />)}
</g>
{DETAIL_STATES.map((state) => (
<use
href={`#st-${state.id}`}
class:list={["map-state", highlighted.has(state.name) && "map-state-active"]}
/>
))}
<path d={RIVERS} class="map-river" />
<path d={WATER} class="map-water" />
{DETAIL_STATES.map((state) => (
<use
href={`#st-${state.id}`}
class:list={["map-border", highlighted.has(state.name) && "map-border-active"]}
/>
))}
{REGION_LABELS.map((label) => (
<text x={label.x} y={label.y} class="map-label">{label.name}</text>
))}
</svg>
<svg
class="map-inset"
viewBox={`0 0 ${MAP_WIDTH} ${MAP_HEIGHT}`}
role="img"
aria-label="Übersicht: Lage des Kartenausschnitts in Deutschland"
>
{STATES.map((state) => (
<path d={state.d} class:list={["inset-state", state.name === "Hamburg" && "inset-state-active"]} />
))}
<circle cx={HAMBURG.x} cy={HAMBURG.y} r="34" class="inset-halo" />
<circle cx={HAMBURG.x} cy={HAMBURG.y} r="15" class="inset-dot" />
</svg>
{pins.map((pin) => (
<button
type="button"
class="map-pin"
data-partner={pin.id}
style={`left: ${pin.left.toFixed(2)}%; top: ${pin.top.toFixed(2)}%`}
>
<span class="sr-only">{pin.partner.name}, {pin.partner.location.label}</span>
<span class="map-glow" aria-hidden="true"></span>
<svg viewBox="0 0 24 26" aria-hidden="true" class="map-hive">
<ellipse cx="12" cy="23.4" rx="7.2" ry="1.5" class="map-hive-shadow" />
<rect x="7.6" y="4" width="8.8" height="3.9" rx="1.95" />
<rect x="5.6" y="7.9" width="12.8" height="3.9" rx="1.95" />
<rect x="4" y="11.8" width="16" height="3.9" rx="1.95" />
<rect x="3.2" y="15.7" width="17.6" height="4.1" rx="2.05" />
<path d="M10.4 19.8a1.6 1.6 0 0 1 3.2 0z" class="map-hive-entrance" />
</svg>
</button>
))}
</div>
<ul class="hidden flex-col gap-2 lg:flex">
{rightColumn.map((pin) => (
<li>
<button type="button" class="map-logo map-logo-right" data-partner={pin.id}>
<img src={`/images/partners/${pin.partner.file}`} alt={`Logo ${pin.partner.name}`} loading="lazy" />
<span class="map-logo-place">{pin.partner.location.label}</span>
</button>
</li>
))}
</ul>
</div>
</div>
<!-- Unter lg gibt es keine Spalten neben der Karte; dort stehen alle
verorteten Partner als Liste unter der Karte. -->
<ul class="mt-10 grid grid-cols-2 gap-3 sm:grid-cols-3 lg:hidden">
{pins.map((pin) => (
<li class="flex flex-col items-center gap-2 rounded-[var(--radius-inner)] bg-brand-surface-strong p-4 ring-1 ring-brand-border">
<img
src={`/images/partners/${pin.partner.file}`}
alt={`Logo ${pin.partner.name}`}
loading="lazy"
class="h-10 w-full object-contain"
/>
<span class="text-center text-xs text-brand-text-muted">{pin.partner.location.label}</span>
</li>
))}
</ul>
{withoutLocation.length > 0 && (
<div class="mt-16 border-t border-brand-border pt-10">
<p class="reveal text-sm text-brand-text-muted">
Weitere Partner
<span class="tabular-nums"> ({withoutLocation.length})</span>
</p>
<ul class="reveal mt-6 grid grid-cols-2 gap-3 sm:grid-cols-4 lg:grid-cols-8">
{withoutLocation.map((partner) => (
<li class="flex aspect-[3/2] items-center justify-center rounded-[var(--radius-inner)] bg-brand-surface-strong p-4 ring-1 ring-brand-border">
<img
src={`/images/partners/${partner.file}`}
alt={`Logo ${partner.name}`}
title={partner.name}
loading="lazy"
class="max-h-full w-full object-contain"
/>
</li>
))}
</ul>
</div>
)}
</div>
</section>
<style>
/* Die vereinfachten Länderumrisse liegen nicht exakt aufeinander. Diese
* Grundebene zeichnet alle Flächen einmal mit fettem Strich vor, damit
* durch die Lücken nicht der Seitenhintergrund scheint. */
.map-backdrop use {
fill: #e4dccb;
stroke: #e4dccb;
stroke-width: 0.45;
stroke-linejoin: round;
}
.map-state {
fill: #e4dccb;
stroke: none;
}
.map-state-active {
fill: #f7e5bd;
stroke: none;
}
/* Elbe, Hafenbecken und Alster — ohne sie ist der Umriss nicht als
* Hamburg lesbar. */
/* Der Fluss ist ein Strich: eine durchgehende Linie statt einer Kette
* von Uferflächen mit Lücken dazwischen. */
.map-river {
fill: none;
stroke: #a7c6d6;
stroke-width: 2.4;
stroke-linecap: round;
stroke-linejoin: round;
}
.map-water {
fill: #a7c6d6;
stroke: none;
}
/* Grenzen liegen über dem Wasser, damit die Stadtgrenze auch dort
* durchläuft, wo die Elbe sie schneidet. */
/* Benachbarte Bundesländer teilen sich ihre Grenzlinien — bei kräftigem
* Strich legen sich die Linien übereinander und bilden ein breites Band.
* Deshalb dünn und in einem dunkleren Ton statt in Weiß. */
.map-border {
fill: none;
stroke: #cfc5b0;
stroke-width: 0.35;
stroke-linejoin: round;
}
/* Die Stadtgrenze trägt die Aussage und muss sich deshalb klar von den
* Nachbargrenzen abheben. */
.map-border-active {
stroke: #a8781f;
stroke-width: 0.5;
stroke-opacity: 0.95;
}
.map-label {
fill: #9b8f77;
font-family: var(--font-sans);
font-size: 3.4px;
font-weight: 500;
letter-spacing: 0.16px;
text-anchor: middle;
text-transform: uppercase;
paint-order: stroke;
stroke: #efe9dd;
stroke-width: 1.1px;
stroke-linejoin: round;
}
.map-panel {
background:
radial-gradient(120% 100% at 50% 0%, #f3eee3 0%, #e9e2d3 65%, #e2dacb 100%);
box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.7);
}
/* --- Übersichtskarte Deutschland --- */
.map-inset {
position: absolute;
right: 0;
bottom: 0;
width: clamp(3.5rem, 7%, 5rem);
height: auto;
padding: 0.5rem;
border-radius: var(--radius-inner);
background: rgb(250 248 243 / 0.92);
outline: 1px solid var(--color-brand-border);
outline-offset: -1px;
backdrop-filter: blur(4px);
}
.inset-state {
fill: #b3a68a;
stroke: #faf8f3;
stroke-width: 4;
stroke-linejoin: round;
}
.inset-state-active {
fill: var(--color-brand-ink);
}
.inset-halo {
fill: var(--color-brand-primary);
opacity: 0.4;
}
.inset-dot {
fill: var(--color-brand-primary);
stroke: #faf8f3;
stroke-width: 5;
}
/* --- Bienenstock --- */
.map-pin {
position: absolute;
translate: -50% -100%;
display: grid;
justify-items: center;
cursor: pointer;
transition: translate 0.35s var(--ease-spring);
}
.map-hive {
position: relative;
width: clamp(1.15rem, 1.7vw, 1.6rem);
height: auto;
fill: var(--color-brand-primary);
filter: drop-shadow(0 1px 1.5px rgb(90 60 0 / 0.45));
transition: scale 0.35s var(--ease-spring);
}
.map-hive-entrance {
fill: #1f1a13;
}
.map-hive-shadow {
fill: #6b4a05;
opacity: 0.22;
}
/* Weicher Schein, damit dicht beieinander liegende Stöcke als Gruppe
* lesbar bleiben statt als Klumpen. */
.map-glow {
position: absolute;
left: 50%;
top: 45%;
width: 2.6rem;
height: 2.6rem;
translate: -50% -50%;
border-radius: 999px;
background: radial-gradient(circle, rgb(248 172 17 / 0.3), transparent 68%);
opacity: 0;
transition: opacity 0.3s var(--ease-spring);
}
.map-pin:hover .map-glow,
.map-pin:focus-visible .map-glow,
.map-pin.is-active .map-glow {
opacity: 1;
}
.map-pin:focus-visible,
.map-pin.is-active {
translate: -50% calc(-100% - 4px);
z-index: 3;
}
.map-pin:focus-visible .map-hive,
.map-pin.is-active .map-hive {
scale: 1.18;
}
/* --- Logos neben der Karte --- */
.map-logo {
display: flex;
width: 100%;
flex-direction: column;
gap: 0.35rem;
border-radius: var(--radius-inner);
background: var(--color-brand-surface-strong);
padding: 0.7rem 0.85rem;
text-align: left;
box-shadow: var(--shadow-2xs);
outline: 1px solid var(--color-brand-border);
outline-offset: -1px;
transition:
box-shadow 0.35s var(--ease-spring),
transform 0.35s var(--ease-spring);
}
.map-logo-right {
text-align: right;
}
.map-logo img {
height: 1.9rem;
width: 100%;
object-fit: contain;
}
.map-logo-left img {
object-position: left center;
}
.map-logo-right img {
object-position: right center;
}
.map-logo-place {
font-size: 0.6875rem;
letter-spacing: 0.04em;
color: var(--color-brand-text-muted);
}
.map-logo:hover,
.map-logo:focus-visible,
.map-logo.is-active {
outline-color: var(--color-brand-primary);
box-shadow: var(--shadow-md);
}
.map-logo-left.is-active {
transform: translateX(4px);
}
.map-logo-right.is-active {
transform: translateX(-4px);
}
/* Auf Touch feuert :hover beim Antippen und bleibt kleben. */
@media (hover: hover) and (pointer: fine) {
.map-pin:hover {
translate: -50% calc(-100% - 4px);
z-index: 3;
}
.map-pin:hover .map-hive {
scale: 1.18;
}
.map-logo-left:hover {
transform: translateX(4px);
}
.map-logo-right:hover {
transform: translateX(-4px);
}
}
@media (prefers-reduced-motion: reduce) {
.map-pin,
.map-hive,
.map-logo {
transition: none;
}
/* Zuordnung bleibt über Ring, Schein und Linienfarbe lesbar — nur die
* Verschiebungen entfallen. */
.map-pin:hover,
.map-pin:focus-visible,
.map-pin.is-active {
translate: -50% -100%;
}
.map-logo-left:hover,
.map-logo-left.is-active,
.map-logo-right:hover,
.map-logo-right.is-active {
transform: none;
}
.map-pin:hover .map-hive,
.map-pin:focus-visible .map-hive,
.map-pin.is-active .map-hive {
scale: 1;
}
}
</style>
<style is:global>
/* Die Verbindungslinien entstehen zur Laufzeit per JS und tragen daher
* kein Scope-Attribut — diese Regeln müssen global gelten. */
#partner-map-links path {
transition:
stroke 0.3s cubic-bezier(0.22, 1, 0.36, 1),
stroke-opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
stroke-width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
#partner-map-links path.is-active {
stroke: var(--color-brand-primary);
stroke-width: 2;
stroke-opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
#partner-map-links path {
transition: none;
}
}
</style>
<script>
document.addEventListener("astro:page-load", () => {
const root = document.getElementById("partner-map");
const svg = document.getElementById("partner-map-links");
if (!root || !svg) return;
const pins = [...root.querySelectorAll<HTMLElement>(".map-pin")];
const logos = [...root.querySelectorAll<HTMLElement>(".map-logo")];
if (pins.length === 0) return;
function draw() {
const box = root!.getBoundingClientRect();
svg!.setAttribute("viewBox", `0 0 ${box.width} ${box.height}`);
svg!.replaceChildren();
for (const logo of logos) {
const id = logo.dataset.partner;
const pin = pins.find((p) => p.dataset.partner === id);
if (!pin) continue;
const l = logo.getBoundingClientRect();
const p = pin.getBoundingClientRect();
const rechts = logo.classList.contains("map-logo-right");
// Start an der Innenkante des Logos, Ziel am Fuß des Bienenstocks.
const x1 = (rechts ? l.left : l.right) - box.left;
const y1 = l.top + l.height / 2 - box.top;
const x2 = p.left + p.width / 2 - box.left;
const y2 = p.bottom - box.top;
// Kurzes waagerechtes Stück am Logo, dann eine weiche Kurve — so
// bleibt die Zuordnung ablesbar, auch wenn Linien nah beieinander
// liegen.
const stub = rechts ? -14 : 14;
const path = document.createElementNS("http://www.w3.org/2000/svg", "path");
path.setAttribute(
"d",
`M${x1} ${y1}H${x1 + stub}C${(x1 + x2) / 2} ${y1} ${(x1 + x2) / 2} ${y2} ${x2} ${y2}`
);
path.setAttribute("fill", "none");
path.setAttribute("stroke", "#8a5e05");
path.setAttribute("stroke-width", "1");
path.setAttribute("stroke-opacity", "0.35");
path.dataset.partner = id ?? "";
svg!.append(path);
}
}
function setActive(id: string | null) {
for (const el of [...pins, ...logos, ...svg!.querySelectorAll<SVGElement>("path")]) {
el.classList.toggle("is-active", id != null && el.dataset.partner === id);
}
}
for (const el of [...pins, ...logos]) {
const id = el.dataset.partner ?? null;
el.addEventListener("mouseenter", () => setActive(id));
el.addEventListener("focus", () => setActive(id));
el.addEventListener("mouseleave", () => setActive(null));
el.addEventListener("blur", () => setActive(null));
}
draw();
// Bilder laden asynchron und verändern die Logo-Höhen — danach neu zeichnen.
new ResizeObserver(draw).observe(root);
window.addEventListener("resize", draw, { passive: true });
});
</script>
+125
View File
@@ -0,0 +1,125 @@
---
import { layers, type Layer } from "../lib/sections";
interface Props {
layer: Exclude<Layer, "site">;
loggedIn: boolean;
}
const { layer, loggedIn } = Astro.props;
const config = layers[layer];
const currentPath = Astro.url.pathname;
---
<!--
Die zweite Leiste.
Sie erscheint nur, wenn eine Ebene offen ist — Shop oder Automaten — und
ist das sichtbare Zeichen dafür: dunkel, direkt unter dem Hauptheader, mit
der Navigation dieser Ebene. Der Hauptheader darüber bleibt unverändert
stehen, ein Klick dort führt ohne Umweg zurück in den Hauptauftritt.
Warenkorb und Konto stehen hier statt oben, damit der Hauptheader so ruhig
bleibt wie auf place4bees.com.
-->
<div id="second-header" class="sticky top-[var(--header-h)] z-40 bg-brand-ink text-white/75">
<div class="honeycomb-bg-dark absolute inset-0 opacity-50" aria-hidden="true"></div>
<div class="relative mx-auto max-w-[84rem] px-[var(--gutter)]">
<div class="flex min-h-[3.25rem] flex-wrap items-center gap-x-6 gap-y-2 py-2">
<a href={config.homeHref} class="flex items-baseline gap-3 shrink-0">
<span class="font-display text-[1.35rem] leading-none tracking-[0.02em] text-white">
{config.label}
</span>
<span class="hidden text-[0.8125rem] text-white/50 sm:inline">{config.tagline}</span>
</a>
<nav aria-label={`${config.label} Navigation`} class="flex items-center gap-5 text-[0.9375rem]">
{config.nav.map((item) => {
const active = currentPath === item.href;
return (
<a
href={item.href}
aria-current={active ? "page" : undefined}
class:list={[
"transition-colors duration-200",
active ? "text-brand-primary" : "text-white/70 hover:text-white",
]}
>
{item.label}
</a>
);
})}
</nav>
{layer === "shop" && (
<div class="ml-auto flex items-center gap-4">
<a
href={loggedIn ? "/konto" : "/konto/anmelden"}
class="text-[0.9375rem] text-white/70 transition-colors hover:text-white"
>
{loggedIn ? "Mein Konto" : "Anmelden"}
</a>
<a
href="/warenkorb"
class="relative inline-flex items-center transition-transform duration-200 ease-out hover:-translate-y-0.5"
aria-label="Warenkorb"
>
<svg viewBox="0 0 24 24" class="h-7 w-7" aria-hidden="true">
<ellipse cx="12" cy="5.4" rx="6.4" ry="2.1" fill="#8a5a2b" />
<circle cx="12" cy="3.2" r="1.05" fill="#8a5a2b" />
<path d="M5.6 7 C5.6 7 5.1 15 6.6 19 C7.4 21 16.6 21 17.4 19 C18.9 15 18.4 7 18.4 7 Z" fill="#e0a94a" stroke="#a9722a" stroke-width="0.5" />
<rect x="5.8" y="7" width="12.4" height="2.1" rx="1" fill="#c6922f" />
<path d="M12 21 C12 21 13 22.4 12 23.2 C11 22.4 12 21 12 21 Z" fill="#c6922f" />
</svg>
<span
id="cart-badge"
style="display:none"
class="absolute -top-1.5 -right-2.5 inline-flex h-[1.15rem] min-w-[1.15rem] items-center justify-center rounded-full bg-brand-primary px-1 text-[0.6875rem] font-medium tabular-nums text-brand-ink ring-2 ring-brand-ink"
></span>
</a>
</div>
)}
</div>
</div>
</div>
<script>
import { getCart } from "../lib/cart";
import { getCartIdClient } from "../lib/cartCookie";
async function refreshCartBadge(animate = false) {
const badge = document.getElementById("cart-badge");
if (!badge) return;
const cartId = getCartIdClient();
if (!cartId) {
badge.style.display = "none";
return;
}
try {
const cart = await getCart(cartId);
const count = (cart.items ?? []).reduce((sum, item) => sum + item.quantity, 0);
if (count > 0) {
const changed = animate && badge.textContent !== String(count);
badge.textContent = String(count);
badge.style.display = "inline-flex";
if (changed) {
badge.classList.remove("badge-pop");
void badge.offsetWidth; // Reflow erzwingen, sonst startet die Animation nicht neu
badge.classList.add("badge-pop");
}
} else {
badge.style.display = "none";
}
} catch {
badge.style.display = "none";
}
}
// Beim Seitenaufbau still setzen, sonst poppt der Zähler bei jeder
// Navigation. Nur eine echte Warenkorbänderung darf ihn anspringen lassen.
document.addEventListener("astro:page-load", () => refreshCartBadge(false));
window.addEventListener("cart:updated", () => refreshCartBadge(true));
</script>
@@ -0,0 +1,252 @@
---
/**
* Der Weltenwechsel zwischen Privatkunden und Business.
*
* Beim Sprung von einem Bereich in den anderen laufen zwei Bahnen über den
* Schirm: voraus ein schmales Band in der Akzentfarbe, dahinter die Fläche
* der Zielwelt, die sie beim Namen nennt. Beide ziehen in derselben
* Richtung weiter, in die man gewechselt ist — so wie im Umschalter oben
* rechts: Privatkunden liegt links, Business rechts.
*
* Die Bahnen hängen an `transition:persist` mit festem Namen, überleben den
* Swap also als dieselben Knoten mitsamt laufender Animation. Der Name muss
* gesetzt sein: ohne ihn vergibt Astro einen Schlüssel mit laufender Nummer,
* die von der Anzahl der Elemente der Seite abhängt — zwischen zwei
* verschieden großen Seiten passt er dann nicht mehr, der Knoten wird
* ersetzt und die Bahn läuft ins Leere.
*
* Der Seitenwechsel passiert hinter ihnen, während sie decken.
*
* Nur bei diesem einen Wechsel. Alles andere bleibt bei der leisen
* View Transition. Aussehen: siehe #section-curtain in global.css.
*/
---
<div id="section-curtain" transition:persist="section-curtain" aria-hidden="true">
<div class="curtain-panel curtain-lead"></div>
<div class="curtain-panel curtain-main">
<div class="curtain-inner">
<p class="curtain-eyebrow">Sie wechseln zu</p>
<p class="curtain-title" data-curtain-title></p>
<p class="curtain-tagline" data-curtain-tagline></p>
</div>
</div>
</div>
<script>
import { layers, resolveLayer, crossesLayer, type Layer } from "../lib/sections";
const root = document.documentElement;
/**
* Die Knoten werden bei jedem Zugriff frisch geholt, nicht einmal beim
* Laden gemerkt. Sollte `transition:persist` einmal nicht greifen, räumt
* das Aufziehen dann wenigstens die Bahn ab, die tatsächlich im Dokument
* steht, statt eine abgehängte zu animieren und den Schirm zu belegen.
*/
function parts() {
const curtain = document.getElementById("section-curtain");
return {
curtain,
lead: curtain?.querySelector<HTMLElement>(".curtain-lead") ?? null,
main: curtain?.querySelector<HTMLElement>(".curtain-main") ?? null,
inner: curtain?.querySelector<HTMLElement>(".curtain-inner") ?? null,
titleEl: curtain?.querySelector<HTMLElement>("[data-curtain-title]") ?? null,
taglineEl: curtain?.querySelector<HTMLElement>("[data-curtain-tagline]") ?? null,
};
}
// Kräftiges Ease-in-out: die Bahnen bewegen sich über den Schirm, sie
// treten nicht auf und nicht ab. Ein Ease-out würde am Ende kleben.
const EASE = "cubic-bezier(0.77, 0, 0.175, 1)";
const COVER = 460;
// Kurzes Halten, damit der Name der Welt tatsächlich zu lesen ist.
const HOLD = 160;
const REVEAL = 540;
// Alle Wege in vw. Die Bahnen sind 140vw breit und sitzen bei -20vw, sind
// also ab |120vw| vollständig aus dem Bild.
/** Startposition beim Decken. */
const IN = 120;
/** Zielposition beim Aufziehen — 7vw Reserve für das nachlaufende Band. */
const OUT = 134;
/** Breite des Akzentbands an der Kante. */
const BAND = 7;
/**
* Anteil, um den die Schrift gegen die Bahn zurückgeschoben wird. 1 hieße:
* sie steht bombenfest in der Bildmitte und die Kante deckt sie auf. 0,8
* lässt ihr einen Rest Nachlauf, damit die Bewegung nicht tot wirkt.
*/
const LAG = 0.8;
/** 1 = nach rechts (zu Business), -1 = nach links (zu Privatkunden). */
let direction = 1;
let crossing = false;
const prefersReduced = () =>
window.matchMedia("(prefers-reduced-motion: reduce)").matches;
const shift = (vw: number) => `translateX(${vw * direction}vw)`;
/**
* Wartet auf Animationen, aber nie unbegrenzt.
*
* In einem Hintergrund-Tab pausiert der Browser WAAPI: `finished` löst
* dann nie aus. Weil die Navigation hinter den Bahnen wartet, hinge sie
* damit für immer. Der Timeout ist der Notausgang.
*/
function settle(animations: Animation[], duration: number) {
return Promise.race([
Promise.all(animations.map((animation) => animation.finished.catch(() => {}))),
new Promise((resolve) => setTimeout(resolve, duration + 200)),
]);
}
/** Deckungsstellung ohne Animation — für Hintergrund-Tab und Fade. */
function snap() {
const { lead, main, inner } = parts();
if (!lead || !main || !inner) return;
lead.style.transform = shift(-BAND);
main.style.transform = "translateX(0)";
inner.style.transform = "none";
}
async function cover(target: Layer) {
const { curtain, lead, main, inner, titleEl, taglineEl } = parts();
if (!curtain || !lead || !main || !inner || !titleEl || !taglineEl) return;
// Der Hauptauftritt ist dunkel, jede aufgelegte Ebene honiggelb.
const dark = target === "site";
curtain.dataset.ground = dark ? "dark" : "honey";
curtain.dataset.dir = String(direction);
// Die Wabenstruktur der Zielwelt: Honiglinien auf Dunkel, Tintenlinien
// auf Honig.
main.className = `curtain-panel curtain-main ${dark ? "honeycomb-bg-dark" : "honeycomb-bg"}`;
titleEl.textContent = layers[target].label;
taglineEl.textContent = layers[target].tagline;
curtain.style.visibility = "visible";
inner.style.opacity = "1";
// Liegt der Tab im Hintergrund, sieht ohnehin niemand zu — und der
// Browser hätte die Animation angehalten. Also ohne Umweg decken.
if (document.hidden) {
curtain.style.opacity = "1";
snap();
return;
}
// Weniger Bewegung, nicht keine: die Welt wechselt weiterhin sichtbar,
// sie fährt nur nicht mehr quer über den Schirm.
if (prefersReduced()) {
snap();
await settle(
[curtain.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 160, easing: "ease-out" })],
160
);
curtain.style.opacity = "1";
return;
}
const timing = { duration: COVER, easing: EASE };
// Das Band startet gleichauf mit der Fläche und wird von ihr überholt —
// so öffnet es sich im Lauf, statt als Streifen hereinzuspringen.
const bandAnim = lead.animate([{ transform: shift(IN) }, { transform: shift(-BAND) }], timing);
const groundAnim = main.animate([{ transform: shift(IN) }, { transform: "translateX(0)" }], timing);
// Gegenbewegung: die Schrift steht fast still in der Bildmitte, während
// die Fläche über sie hinwegläuft und sie aufdeckt.
const labelAnim = inner.animate(
[{ transform: shift(-IN * LAG) }, { transform: "translateX(0)" }],
timing
);
await settle([bandAnim, groundAnim, labelAnim], COVER);
snap();
}
async function reveal() {
const { curtain, lead, main, inner } = parts();
if (!curtain || !lead || !main || !inner) return;
if (document.hidden) {
// nichts abzuwarten, siehe cover()
} else if (prefersReduced()) {
await settle(
[curtain.animate([{ opacity: 1 }, { opacity: 0 }], { duration: 160, easing: "ease-out" })],
160
);
} else {
const timing = { duration: REVEAL, easing: EASE };
// Auf dem Rückweg überholt die Fläche das Band wieder: es taucht
// hinter ihr auf und verlässt den Schirm als Letztes.
const bandAnim = lead.animate(
[{ transform: shift(-BAND) }, { transform: shift(-(OUT - BAND)) }],
timing
);
const groundAnim = main.animate(
[{ transform: "translateX(0)" }, { transform: shift(-OUT) }],
timing
);
// Die Schrift geht früher als die Bahn — sonst liest man sie noch,
// während die neue Seite schon zur Hälfte dasteht.
const labelAnim = inner.animate(
[
{ transform: "translateX(0)", opacity: 1 },
{ transform: shift(OUT * LAG * 0.6), opacity: 0, offset: 0.6 },
{ transform: shift(OUT * LAG), opacity: 0 },
],
timing
);
await settle([bandAnim, groundAnim, labelAnim], REVEAL);
}
curtain.style.visibility = "hidden";
curtain.style.opacity = "";
lead.style.transform = "";
main.style.transform = "";
inner.style.transform = "";
inner.style.opacity = "";
delete root.dataset.crossing;
crossing = false;
}
document.addEventListener("astro:before-preparation", (event) => {
const nav = event as typeof event & {
to: URL;
loader: () => Promise<void>;
};
const { curtain } = parts();
if (!curtain || typeof curtain.animate !== "function" || crossing) return;
const from = root.dataset.layer as Layer | undefined;
const to = resolveLayer(nav.to.pathname, nav.to.hostname);
// Nur beim Sprung über die Grenze zwischen Hauptauftritt und Ebene.
// Innerhalb einer Ebene wäre die Bahn nur Wartezeit.
if (!from || !crossesLayer(from, to)) return;
crossing = true;
root.dataset.crossing = "";
// Die Reiter stehen rechts neben der Hauptnavigation: eine Ebene öffnet
// sich von rechts, der Rückweg läuft nach links.
direction = to === "site" ? -1 : 1;
// Decken und Laden laufen nebeneinander: die neue Seite ist in aller
// Regel da, bevor die Bahnen stehen.
const load = nav.loader;
nav.loader = async () => {
await Promise.all([cover(to), load()]);
await new Promise((resolve) => setTimeout(resolve, HOLD));
};
});
document.addEventListener("astro:after-swap", () => {
// Astro ersetzt beim Swap die Attribute am <html> durch die der neuen
// Seite — data-crossing wäre damit genau in dem Moment weg, in dem
// Astros eigene Überblendung anläuft. Sie liefe dann im Top-Layer über
// die Bahnen hinweg, und das ist das Zucken. Also hier erneut setzen.
if (crossing) root.dataset.crossing = "";
// Die neue Ebene greift genau jetzt — verdeckt von den Bahnen.
root.dataset.layer = resolveLayer(location.pathname, location.hostname);
if (crossing) void reveal();
});
</script>
@@ -0,0 +1,37 @@
---
interface Props {
label: string;
title: string;
subtitle?: string;
/** Left-aligned by default — centered headers are the exception now, not
* the rule, so sections don't all read as the same symmetrical block. */
center?: boolean;
light?: boolean;
}
const { label, title, subtitle, center = false, light = false } = Astro.props;
---
<div class:list={["reveal", center && "text-center"]}>
<span class:list={["section-label", light && "section-label-light", center && "justify-center"]}>{label}</span>
<h2
class:list={[
"mt-5 max-w-[18ch]",
center && "mx-auto max-w-[22ch]",
light ? "text-white" : "text-brand-ink",
]}
>
{title}
</h2>
{subtitle && (
<p
class:list={[
"mt-5 lede",
center && "mx-auto",
light ? "text-white/65" : "text-brand-text",
]}
>
{subtitle}
</p>
)}
</div>
+105
View File
@@ -0,0 +1,105 @@
---
interface Props {
eyebrow?: string;
title: string;
/** Optional; sonst füllt der Default-Slot die Textseite. */
text?: string;
cta?: { label: string; href: string };
image: string;
imageAlt: string;
/** Bild links statt rechts — Bänder werden abwechselnd gespiegelt. */
reverse?: boolean;
tone?: "cream" | "green" | "white" | "ink";
/** Blendet die Zahl links neben der Überschrift ein. */
index?: string;
/** object-position für Motive, die nicht mittig sitzen. */
imagePosition?: string;
eager?: boolean;
}
const {
eyebrow,
title,
text,
cta,
image,
imageAlt,
reverse = false,
tone = "cream",
index,
imagePosition = "center",
eager = false,
} = Astro.props;
const surfaces = {
cream: "bg-brand-surface",
green: "bg-[var(--color-brand-green-tint)]",
white: "bg-brand-surface-strong",
ink: "bg-brand-ink",
};
const dark = tone === "ink";
---
<!--
Randloses 50/50-Band: Textseite auf getönter Fläche, Foto füllt die andere
Hälfte bis zur Viewport-Kante. Abwechselnd gespiegelt — das ist der
Grundrhythmus von place4bees.com, den die zentrierten Container hier
vorher nicht abgebildet haben.
-->
<section class:list={["brand-section relative", surfaces[tone]]}>
<div class="grid lg:min-h-[34rem] lg:grid-cols-2">
<div
class:list={[
"flex items-center px-[var(--gutter)] py-[calc(var(--section-y)*0.8)]",
reverse ? "lg:order-2 lg:pl-[max(var(--gutter),4vw)] lg:pr-[8vw]" : "lg:pl-[8vw] lg:pr-[max(var(--gutter),4vw)]",
]}
>
<div class="reveal w-full max-w-[34rem]">
{index && (
<span
class="mb-6 block font-display text-[2.75rem] font-normal leading-none tabular-nums text-brand-primary"
aria-hidden="true"
>
{index}
</span>
)}
{eyebrow && (
<span class:list={["section-label", dark && "section-label-light"]}>{eyebrow}</span>
)}
<h2 class:list={["mt-5 max-w-[16ch]", dark && "text-white"]}>{title}</h2>
{text && (
<p class:list={["mt-6 max-w-[52ch] leading-relaxed", dark ? "text-white/65" : "text-brand-text"]}>
{text}
</p>
)}
<slot />
{cta && (
<a href={cta.href} class:list={["link-underline mt-8", dark && "text-white"]}>
{cta.label}
<svg viewBox="0 0 20 20" class="h-4 w-4 text-brand-primary" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true">
<path d="M4 10h12M11 5l5 5-5 5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</a>
)}
</div>
</div>
<div class:list={["band-media relative overflow-hidden min-h-[16rem] sm:min-h-[22rem]", reverse && "lg:order-1"]}>
<img
src={image}
alt={imageAlt}
loading={eager ? "eager" : "lazy"}
class="reveal reveal-clip scroll-zoom absolute inset-0 h-full w-full object-cover"
style={`--delay: 0.08s; object-position: ${imagePosition};`}
/>
</div>
</div>
</section>
<style>
/* Die Spalte hat overflow:hidden und wäre damit selbst Scroll-Container.
* Die benannte Timeline liegt deshalb hier und wird vom Bild referenziert. */
.band-media {
view-timeline-name: --media-view;
}
</style>
@@ -0,0 +1,104 @@
---
/**
* Angaben zur Bienenpatenschaft.
*
* Die Leistungen der Patenschaft brauchen Eingaben, die keine Bestellung
* von sich aus mitbringt: die Urkunde und das Etikett auf den Gläsern
* tragen einen Namen, und die Bilder vom Volk gehen dreimal im Jahr an eine
* Adresse. Wird die Patenschaft verschenkt, sind das die Angaben des
* Beschenkten — bisher stand dazu nur ein Satz in der Beschreibung, der auf
* ein Hinweisfeld verwies, das es hier nicht gibt.
*
* Aufbau bewusst wie beim Geschenk-Abo, damit beides sich gleich anfühlt.
*/
---
<div id="sponsorship-options">
<fieldset class="mb-7">
<legend class="field-label">Für wen?</legend>
<div class="flex flex-col gap-2">
<label class="relative flex cursor-pointer items-start gap-3 rounded-[var(--radius-inner)] border border-brand-border bg-brand-surface-strong p-4 transition-colors duration-250 hover:border-brand-ink has-[:checked]:border-brand-ink has-[:checked]:bg-brand-surface">
<input type="radio" name="sponsorship_for" value="self" checked class="mt-0.5 h-4 w-4 shrink-0 accent-[var(--color-brand-primary)]" />
<span>
<span class="block font-medium text-brand-ink">Für mich</span>
<span class="mt-0.5 block text-sm text-brand-text">
Urkunde, Etikett und die Bilder vom Volk laufen auf Ihren Namen.
</span>
</span>
</label>
<label class="relative flex cursor-pointer items-start gap-3 rounded-[var(--radius-inner)] border border-brand-border bg-brand-surface-strong p-4 transition-colors duration-250 hover:border-brand-ink has-[:checked]:border-brand-ink has-[:checked]:bg-brand-surface">
<input type="radio" name="sponsorship_for" value="gift" class="mt-0.5 h-4 w-4 shrink-0 accent-[var(--color-brand-primary)]" />
<span>
<span class="block font-medium text-brand-ink">Verschenken</span>
<span class="mt-0.5 block text-sm text-brand-text">
Urkunde und Etikett laufen auf den Beschenkten, die Bilder gehen an ihn.
</span>
</span>
</label>
</div>
</fieldset>
<div class="mb-7 grid gap-4">
<div>
<label class="field-label" for="pate-name">
<span id="pate-name-text">Name für Urkunde und Etikett</span>
</label>
<input id="pate-name" name="sponsorship_name" type="text" class="field" autocomplete="off" required />
<p class="mt-1.5 text-sm text-brand-text-muted">
So steht es auf der Urkunde und auf dem Etikett der vier Gläser.
</p>
</div>
<div id="pate-geschenk" class="hidden grid gap-4">
<div>
<label class="field-label" for="pate-email">E-Mail des Beschenkten</label>
<input id="pate-email" name="sponsorship_recipient_email" type="email" class="field" autocomplete="off" />
<p class="mt-1.5 text-sm text-brand-text-muted">
Dorthin gehen dreimal im Jahr die Bilder und Nachrichten vom Bienenvolk.
</p>
</div>
<div>
<label class="field-label" for="pate-von">Von wem? (optional)</label>
<input id="pate-von" name="sponsorship_sender_name" type="text" class="field" autocomplete="off" />
</div>
</div>
</div>
</div>
<script>
// astro:page-load feuert beim ersten Laden und nach jedem
// View-Transition-Wechsel.
document.addEventListener("astro:page-load", () => {
const root = document.getElementById("sponsorship-options");
if (!root) return;
const geschenkblock = document.getElementById("pate-geschenk")!;
const email = document.getElementById("pate-email") as HTMLInputElement;
const namensText = document.getElementById("pate-name-text")!;
function istGeschenk() {
return (
root!.querySelector<HTMLInputElement>('input[name="sponsorship_for"]:checked')?.value ===
"gift"
);
}
function sync() {
const geschenk = istGeschenk();
geschenkblock.classList.toggle("hidden", !geschenk);
// Pflicht nur, solange verschenkt wird — sonst blockierte das Feld
// den Kauf für alle anderen.
email.required = geschenk;
namensText.textContent = geschenk
? "Name des Beschenkten für Urkunde und Etikett"
: "Name für Urkunde und Etikett";
}
root
.querySelectorAll<HTMLInputElement>('input[name="sponsorship_for"]')
.forEach((radio) => radio.addEventListener("change", sync));
sync();
});
</script>
@@ -0,0 +1,360 @@
---
import type { HoneyVariety, MedusaVariant } from "../lib/medusa";
interface Props {
varieties: HoneyVariety[];
/** Varianten des Abo-Produkts, für die Zuordnung Variante -> Glasgröße. */
variants: MedusaVariant[];
/**
* Gesetzt, wenn am Abo-Produkt `gift_shipping = "per_delivery"` steht:
* dann trägt jedes Paket seinen Versand, und der Anteil für die weiteren
* Pakete wird beim Kauf mitberechnet.
*/
giftSurcharge?: { variantId: string; amount: number } | null;
}
const { varieties, variants, giftSurcharge = null } = Astro.props;
// Variante -> Größe, damit die Sortenliste beim Größenwechsel mitzieht.
const sizeByVariant = Object.fromEntries(
variants.map((variant) => [variant.id, variant.metadata?.subscription_size ?? ""])
);
const sizes = [...new Set(varieties.map((variety) => variety.size))];
const countBySize = Object.fromEntries(
sizes.map((size) => [size, varieties.filter((variety) => variety.size === size).length])
);
/**
* Obergrenze für Gläser je Lieferung. Derselbe Wert steht in der
* Änderungsroute des Backends (api/store/customers/me/subscriptions/[id]);
* wird er hier größer, lehnt das Konto die Änderung später ab.
*/
const MAX_GLASSES = 12;
/** Laufzeiten eines verschenkten Abos, in Lieferungen. Muss zu
* lib/gift-subscription.ts im Backend passen. */
const GIFT_TERMS = [3, 6, 12];
---
<!--
Abo-Auswahl: Menge und Sorte.
Die Sortenwahl ist bewusst keine Produktoption: mit 12 Sorten mal zwei
Größen mal drei Intervallen wären es 78 Varianten. Sie reist als Metadatum
am Warenkorb-Posten mit, die Menge als dessen Menge.
-->
<div
id="subscription-options"
data-sizes={JSON.stringify(sizeByVariant)}
data-counts={JSON.stringify(countBySize)}
data-max={MAX_GLASSES}
data-versandanteil={giftSurcharge ? String(giftSurcharge.amount) : ""}
>
<div class="mb-7">
<label class="field-label" for="subscription-quantity">Gläser je Lieferung</label>
<input
id="subscription-quantity"
class="field w-28"
type="number"
min="1"
max={MAX_GLASSES}
step="1"
value="1"
inputmode="numeric"
/>
<p class="mt-2 text-sm text-brand-text-muted">Der angezeigte Preis gilt je Glas.</p>
</div>
<fieldset class="mb-7">
<legend class="field-label">Sorte</legend>
<div class="flex flex-col gap-2">
<label class="relative flex cursor-pointer items-start gap-3 rounded-[var(--radius-inner)] border border-brand-border bg-brand-surface-strong p-4 transition-colors duration-250 hover:border-brand-ink has-[:checked]:border-brand-ink has-[:checked]:bg-brand-surface">
<input
type="radio"
name="subscription_selection"
value="random"
checked
class="mt-0.5 h-4 w-4 shrink-0 accent-[var(--color-brand-primary)]"
/>
<span>
<span class="block font-medium text-brand-ink">Überraschungshonig</span>
<span class="mt-0.5 block text-sm text-brand-text">
Jede Lieferung eine andere Sorte, nie zweimal dieselbe hintereinander.
</span>
</span>
</label>
<label class="relative flex cursor-pointer items-start gap-3 rounded-[var(--radius-inner)] border border-brand-border bg-brand-surface-strong p-4 transition-colors duration-250 hover:border-brand-ink has-[:checked]:border-brand-ink has-[:checked]:bg-brand-surface">
<input
type="radio"
name="subscription_selection"
value="fixed"
class="mt-0.5 h-4 w-4 shrink-0 accent-[var(--color-brand-primary)]"
/>
<span class="min-w-0 flex-1">
<span class="block font-medium text-brand-ink">Selbst zusammenstellen</span>
<span class="mt-0.5 block text-sm text-brand-text">
Für jedes Glas eine Sorte festlegen. <span id="subscription-variety-count"></span>
</span>
</span>
</label>
</div>
</fieldset>
{/* Für mich oder verschenken. Beim Geschenk steht die Laufzeit fest und
alles wird auf einmal bezahlt — es wird nie etwas abgebucht. */}
<fieldset class="mb-7">
<legend class="field-label">Für wen?</legend>
<div class="flex flex-col gap-2">
<label class="relative flex cursor-pointer items-start gap-3 rounded-[var(--radius-inner)] border border-brand-border bg-brand-surface-strong p-4 transition-colors duration-250 hover:border-brand-ink has-[:checked]:border-brand-ink has-[:checked]:bg-brand-surface">
<input type="radio" name="subscription_for" value="self" checked class="mt-0.5 h-4 w-4 shrink-0 accent-[var(--color-brand-primary)]" />
<span>
<span class="block font-medium text-brand-ink">Für mich</span>
<span class="mt-0.5 block text-sm text-brand-text">
Läuft weiter, bis Sie es beenden. Jede Lieferung wird einzeln abgebucht.
</span>
</span>
</label>
<label class="relative flex cursor-pointer items-start gap-3 rounded-[var(--radius-inner)] border border-brand-border bg-brand-surface-strong p-4 transition-colors duration-250 hover:border-brand-ink has-[:checked]:border-brand-ink has-[:checked]:bg-brand-surface">
<input type="radio" name="subscription_for" value="gift" class="mt-0.5 h-4 w-4 shrink-0 accent-[var(--color-brand-primary)]" />
<span>
<span class="block font-medium text-brand-ink">Verschenken</span>
<span class="mt-0.5 block text-sm text-brand-text">
Feste Laufzeit, jetzt vollständig bezahlt. Danach endet es von selbst.
</span>
</span>
</label>
</div>
</fieldset>
<div id="subscription-gift" class="mb-7 hidden">
<div class="mb-5">
<p class="field-label" id="laufzeit-label">Laufzeit</p>
<div class="flex flex-wrap gap-2" role="group" aria-labelledby="laufzeit-label">
{GIFT_TERMS.map((anzahl, index) => (
<label class="relative">
<input type="radio" name="gift_deliveries" value={anzahl} checked={index === 1} class="peer sr-only" />
<span class="block cursor-pointer rounded-[var(--radius-inner)] border border-brand-border bg-brand-surface-strong px-4 py-2.5 text-sm text-brand-text transition-[background-color,border-color,color] duration-200 ease-out hover:border-brand-ink peer-checked:border-brand-ink peer-checked:bg-brand-ink peer-checked:text-white peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-brand-primary">
{anzahl} Lieferungen
</span>
</label>
))}
</div>
<p id="gift-summe" class="mt-2 text-sm text-brand-text-muted"></p>
</div>
<div class="grid gap-4">
<div>
<label class="field-label" for="gift-recipient-name">Name des Beschenkten</label>
<input id="gift-recipient-name" name="gift_recipient_name" type="text" class="field" autocomplete="off" />
</div>
<div>
<label class="field-label" for="gift-recipient-email">E-Mail des Beschenkten</label>
<input id="gift-recipient-email" name="gift_recipient_email" type="email" class="field" autocomplete="off" />
<p class="mt-1.5 text-sm text-brand-text-muted">
Dorthin geht die Ankündigung und zu jeder Lieferung die Sendungsnummer — ohne Preise.
</p>
</div>
<div>
<label class="field-label" for="gift-sender-name">Von wem? (optional)</label>
<input id="gift-sender-name" name="gift_sender_name" type="text" class="field" autocomplete="off" />
</div>
</div>
</div>
<div id="subscription-variety-wrap" class="mb-7 hidden">
<p class="field-label">Sorte je Glas</p>
<div id="subscription-variety-list" class="flex flex-col gap-2"></div>
<p id="subscription-variety-empty" class="field-error" style="display:none">
In dieser Größe ist derzeit keine Sorte fest wählbar.
</p>
</div>
</div>
<!-- Ein Feld je Glas wird hieraus geklont, statt zwölf Felder vorzuhalten,
von denen fast immer elf verborgen wären. -->
<template id="subscription-variety-template">
<label class="flex items-center gap-3">
<span class="w-16 shrink-0 text-sm tabular-nums text-brand-text-muted" data-glass-label></span>
<select class="field subscription-variety">
{varieties.map((variety) => (
<option value={variety.variantId} data-size={variety.size}>
{variety.name}
</option>
))}
</select>
</label>
</template>
<script>
document.addEventListener("astro:page-load", () => {
const root = document.getElementById("subscription-options");
if (!root) return;
const sizeByVariant: Record<string, string> = JSON.parse(root.dataset.sizes ?? "{}");
const countBySize: Record<string, number> = JSON.parse(root.dataset.counts ?? "{}");
const maxGlasses = Number(root.dataset.max ?? 12);
const quantityInput = document.getElementById("subscription-quantity") as HTMLInputElement;
const wrap = document.getElementById("subscription-variety-wrap")!;
const list = document.getElementById("subscription-variety-list")!;
const template = document.getElementById("subscription-variety-template") as HTMLTemplateElement;
const empty = document.getElementById("subscription-variety-empty")!;
const countLabel = document.getElementById("subscription-variety-count")!;
const currentSize = () => {
const checked = document.querySelector<HTMLInputElement>('input[name="variant"]:checked');
return checked ? (sizeByVariant[checked.value] ?? "") : "";
};
/** Die Menge, auf 1 bis maxGlasses eingefangen. */
function quantity() {
const value = Math.trunc(Number(quantityInput.value));
if (!Number.isFinite(value)) return 1;
return Math.min(maxGlasses, Math.max(1, value));
}
/**
* Ein Sortenfeld je Glas. Es wird nur hinten angehängt oder abgeschnitten,
* damit eine bereits getroffene Auswahl beim Ändern der Menge stehen
* bleibt.
*/
function syncGlasses() {
const wanted = quantity();
while (list.children.length > wanted) list.lastElementChild!.remove();
while (list.children.length < wanted) list.append(template.content.cloneNode(true));
Array.from(list.children).forEach((row, index) => {
const label = row.querySelector("[data-glass-label]");
if (label) label.textContent = `Glas ${index + 1}`;
});
}
/** Die Sortenliste hängt an der Glasgröße: 250 g gibt es öfter als 500 g. */
function applySize(select: HTMLSelectElement, size: string) {
let visible = 0;
for (const option of Array.from(select.options)) {
const matches = !size || option.dataset.size === size;
option.hidden = !matches;
option.disabled = !matches;
if (matches) visible++;
}
const selected = select.selectedOptions[0];
if (!selected || selected.hidden) {
const first = Array.from(select.options).find((option) => !option.hidden);
if (first) select.value = first.value;
}
select.hidden = visible === 0;
return visible;
}
function syncVarieties() {
const size = currentSize();
const selects = Array.from(
list.querySelectorAll<HTMLSelectElement>(".subscription-variety")
);
// Alle Felder tragen dieselben Optionen, die Zahl ist also für alle
// gleich — einmal merken reicht.
let visible = 0;
for (const select of selects) visible = applySize(select, size);
countLabel.textContent = size ? `${countBySize[size] ?? 0} Sorten in ${size}.` : "";
empty.style.display = selects.length > 0 && visible === 0 ? "block" : "none";
}
const giftWrap = document.getElementById("subscription-gift")!;
const giftSumme = document.getElementById("gift-summe")!;
/** Ob gerade verschenkt wird. */
function istGeschenk() {
return (
document.querySelector<HTMLInputElement>('input[name="subscription_for"]:checked')?.value ===
"gift"
);
}
function lieferungen() {
return Number(
document.querySelector<HTMLInputElement>('input[name="gift_deliveries"]:checked')?.value ?? 0
);
}
/**
* Beim Geschenk wandern die Gläser aller Lieferungen in einen Posten —
* bezahlt wird alles auf einmal. Der Satz macht sichtbar, was das heißt.
*/
function syncGeschenk() {
const geschenk = istGeschenk();
giftWrap.classList.toggle("hidden", !geschenk);
// Pflichtfelder nur, solange verschenkt wird — sonst blockierten sie
// das Formular für alle anderen.
giftWrap.querySelectorAll<HTMLInputElement>("#gift-recipient-name, #gift-recipient-email")
.forEach((feld) => (feld.required = geschenk));
if (!geschenk) {
giftSumme.textContent = "";
return;
}
const anzahl = lieferungen();
const glaeser = quantity();
const anteil = Number(root.dataset.versandanteil || 0);
const euro = (betrag: number) =>
new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }).format(betrag);
// Steht ein Versandanteil bereit, trägt jedes Paket seinen Versand —
// für die weiteren Pakete wird er hier mitverkauft.
const versandsatz = anteil
? ` Der Versand der ${anzahl - 1} weiteren Pakete kommt mit ${euro(
anteil * (anzahl - 1)
)} hinzu.`
: " Der Versand wird einmalig berechnet.";
giftSumme.textContent =
`${anzahl} Lieferungen × ${glaeser} Glas${glaeser === 1 ? "" : "er"} = ` +
`${anzahl * glaeser} Gläser, jetzt vollständig bezahlt.` +
versandsatz;
}
function syncMode() {
const fixed =
document.querySelector<HTMLInputElement>('input[name="subscription_selection"]:checked')
?.value === "fixed";
wrap.classList.toggle("hidden", !fixed);
if (fixed) {
syncGlasses();
syncVarieties();
}
}
quantityInput.addEventListener("input", () => {
syncGlasses();
syncVarieties();
syncGeschenk();
});
// Erst beim Verlassen des Feldes zurechtrücken: währenddessen soll eine
// halb getippte Zahl nicht unter der Hand springen.
quantityInput.addEventListener("change", () => {
quantityInput.value = String(quantity());
syncGlasses();
syncVarieties();
});
root
.querySelectorAll<HTMLInputElement>('input[name="subscription_selection"]')
.forEach((radio) => radio.addEventListener("change", syncMode));
root
.querySelectorAll<HTMLInputElement>('input[name="subscription_for"], input[name="gift_deliveries"]')
.forEach((radio) => radio.addEventListener("change", syncGeschenk));
// Größenwechsel passiert außerhalb dieses Feldes, am Variantenwähler.
document
.querySelectorAll('input[name="variant"]')
.forEach((input) => input.addEventListener("change", syncVarieties));
syncMode();
syncGeschenk();
});
</script>
+37
View File
@@ -0,0 +1,37 @@
---
interface Step {
title: string;
text: string;
}
interface Props {
steps: Step[];
}
const { steps } = Astro.props;
---
<!--
Numbered steps as an editorial list: the index sits in the margin as large
honey type instead of inside a filled circle, and each row is separated by
a hairline rather than a connector line + bullet.
-->
<ol class="max-w-3xl">
{steps.map((step, index) => (
<li
class="reveal group grid grid-cols-[3rem_1fr] gap-x-6 gap-y-2 border-t border-brand-border py-8 sm:grid-cols-[5rem_1fr] sm:gap-x-10"
style={`--delay: ${index * 0.08}s`}
>
<span
class="font-display text-2xl font-normal tabular-nums leading-none text-brand-primary sm:text-4xl"
aria-hidden="true"
>
{String(index + 1).padStart(2, "0")}
</span>
<div>
<h3 class="text-brand-ink">{step.title}</h3>
<p class="mt-2.5 max-w-[58ch] leading-relaxed text-brand-text">{step.text}</p>
</div>
</li>
))}
</ol>
@@ -0,0 +1,45 @@
---
import { getShopSettings } from "../lib/medusa";
import { formatEURKurz } from "../lib/format";
/**
* Die Vertrauensleiste unter der Shop-Leiste.
*
* Vorbild ist die Ankündigungsleiste, die Shop-Systeme ganz oben führen:
* die Dinge, die vor dem Kauf zählen, noch vor dem ersten Produkt.
* Bewusst ohne Diashow — die Leiste steht auf jeder Shop-Seite, und
* Bewegung auf etwas so oft Gesehenem lenkt nur ab.
*
* Die Versandschwelle kommt aus den Shop-Einstellungen im Admin, damit hier
* nichts steht, was an der Kasse nicht auch gilt. Ist keine eingestellt,
* fällt der Punkt ersatzlos weg.
*/
const { freeShippingThreshold } = await getShopSettings();
const punkte = [
freeShippingThreshold != null
? `Versandkostenfrei ab ${formatEURKurz(freeShippingThreshold)}`
: null,
"Direkt vom Imker",
"Lieferung in 2–3 Werktagen",
"Handabgefüllt in Hamburg",
].filter((punkt): punkt is string => punkt !== null);
// Auf schmalen Schirmen passen die Punkte nur in zwei Zeilen. Statt die
// Leiste doppelt so hoch zu machen, bleibt dort nur der Punkt stehen, der
// vor dem Kauf am meisten zählt — die Schwelle, sonst die Lieferzeit.
const AUF_KLEIN = freeShippingThreshold != null ? 0 : 1;
---
<div class="vertrauensleiste">
<div class="mx-auto flex max-w-[84rem] items-center justify-center gap-x-3 px-[var(--gutter)] py-2">
{punkte.map((punkt, index) => (
<>
{index > 0 && (
<span class="vertrauensleiste-trenner hidden sm:inline" aria-hidden="true">·</span>
)}
<span class:list={[index !== AUF_KLEIN && "hidden sm:inline"]}>{punkt}</span>
</>
))}
</div>
</div>
@@ -0,0 +1,45 @@
---
/**
* Der Abschluss „Interesse?" mit Kontaktformular.
*
* Steht wortgleich auf der Startseite und auf „Ihr Projekt". Karte mit dem
* Schatten der Vorlage, Felder 1,5px schwarz ohne Radius, Knopf honiggelb.
*
* Das Skript reist mit, weil das Bauteil auf mehreren Seiten steht — sonst
* müsste jede von ihnen daran denken.
*/
import KontaktVersand from "../KontaktVersand.astro";
---
<section class="mb-10">
<div class="p4b-breite">
<div class="p4b-karte px-10 pt-8 pb-10">
<h2 class="p4b-h2">Interesse?</h2>
<p class="mt-2">
Wir setzen auf eine partnerschaftliche und vertrauensvolle Zusammenarbeit, bei der die Tiere
stets im Mittelpunkt stehen.<br />Schreiben Sie uns gerne!
</p>
<form class="mt-8 grid gap-5" data-kontakt="interesse">
<div class="grid gap-5 sm:grid-cols-2">
<input type="text" name="name" required placeholder="Name*" class="p4b-feld" />
<input type="email" name="email" required placeholder="E-Mail-Adresse*" class="p4b-feld" />
</div>
<textarea name="nachricht" required rows="4" placeholder="Ihre Nachricht*" class="p4b-feld"></textarea>
<label class="flex items-center gap-2.5">
<input type="checkbox" name="datenschutz" required class="h-4 w-4 accent-[#f8ac11]" />
<span>Ich stimme der <a href="/datenschutz" class="underline underline-offset-2">Datenschutzerklärung</a> zu*</span>
</label>
<div>
<div class="hidden" aria-hidden="true">
<label for="ip-website">Bitte frei lassen</label>
<input id="ip-website" type="text" name="website" tabindex="-1" autocomplete="off" />
</div>
<button type="submit" class="p4b-knopf">Senden</button>
</div>
<p data-kontakt-status role="status" class="kontakt-status hidden"></p>
</form>
</div>
</div>
<KontaktVersand />
</section>
@@ -0,0 +1,40 @@
---
/**
* Die Projektstrecke „Vor Projektstart".
*
* Steht so auf der Startseite und auf „Ihr Projekt" — dort trägt der zweite
* Punkt einen längeren Titel. Fünf Punkte auf einer durchgehenden Linie,
* Maße am Original gemessen: Kreis 52px in --awb-color5, Linie 2px schwarz,
* Titel in Bebas 22px.
*/
interface Props {
schritte: { titel: string; icon: "leute" | "haus" | "blatt" | "kiste" | "tuer" }[];
}
const { schritte } = Astro.props;
---
<ol class="p4b-strecke">
{schritte.map((schritt) => (
<li class="p4b-schritt">
<span class="p4b-punkt" aria-hidden="true">
{schritt.icon === "leute" && (
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M8 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm8 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM2 18c0-2.5 2.7-4 6-4s6 1.5 6 4v1H2v-1Zm12.5-3.6c2.1.5 3.5 1.7 3.5 3.6v1h4v-1c0-2.2-2.1-3.5-5-3.8-.8-.1-1.7 0-2.5.2Z"/></svg>
)}
{schritt.icon === "haus" && (
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M4 21V5a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v4h4a1 1 0 0 1 1 1v11h-6v-4h-4v4H4Zm3-13h2V6H7v2Zm4 0h2V6h-2v2ZM7 12h2v-2H7v2Zm4 0h2v-2h-2v2Zm-4 4h2v-2H7v2Zm10 0h2v-2h-2v2Z"/></svg>
)}
{schritt.icon === "blatt" && (
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M6 2h7l5 5v15H6V2Zm7 1.5V8h4.5L13 3.5ZM8.5 12h7v1.5h-7V12Zm0 3.5h7V17h-7v-1.5Z"/></svg>
)}
{schritt.icon === "kiste" && (
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M2 7h10v10H2V7Zm11 3h4l4 4v3h-2a2 2 0 1 1-4 0h-2V10ZM6 19a2 2 0 1 1 0-4 2 2 0 0 1 0 4Zm11 0a2 2 0 1 1 0-4 2 2 0 0 1 0 4Z"/></svg>
)}
{schritt.icon === "tuer" && (
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M10 4h8a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-8v-2h8V6h-8V4Zm2 7H4.8l2.6-2.6L6 7 1 12l5 5 1.4-1.4L4.8 13H12v-2Z"/></svg>
)}
</span>
<span class="p4b-schritt-titel" set:html={schritt.titel} />
</li>
))}
</ol>
@@ -1,70 +1,287 @@
---
import PartnerGrid from "../PartnerGrid.astro";
import { partners } from "../../lib/partners";
import Projektstrecke from "../p4b/Projektstrecke.astro";
import Interesse from "../p4b/Interesse.astro";
/**
* Die Startseite „Unternehmensbienen", 1:1 nach place4bees.com.
*
* Alle Maße stammen aus dem Avada-Stylesheet der Live-Seite und aus
* Messungen im Browser, nicht aus Augenmaß:
*
* Inhaltsbreite 1200px (--site_width)
* Zwischentitel h4, Bebas Neue 30px/36px, #9fc7aa (--awb-color5)
* Überschriften h2, Bebas Neue 48px/57.6px, #000
* Fließtext Open Sans 18px/27px, #000
* Knöpfe #f8ac11, 13px 29px, 16px, ohne Radius
* Karten Schatten 0 0 20px -4px rgba(0,0,0,.2)
*
* Abschnitte in der Reihenfolge der Vorlage:
* 1 Hero (70vh) 2 Logoband 3 Zuhause 4 Bienenschutz 5 Mittendrin
* 6 Was uns antreibt 7 Vor Projektstart 8 Partner 9 Interesse
*
* Bewusst NICHT übernommen wäre Interpretation — die Vorlage hat im Hero
* weder Schaltflächen noch einen Verlauf über dem Video, also haben wir hier
* auch keine.
*/
const schritte = [
{ titel: "Kennenlernen &amp;<br />Beratungsgespräch", icon: "leute" as const },
{ titel: "Standortauswahl", icon: "haus" as const },
{ titel: "Individuelles Angebot", icon: "blatt" as const },
{ titel: "Vorbereitung der<br />Bienenvölker", icon: "kiste" as const },
{ titel: "Die Bienen ziehen ein!", icon: "tuer" as const },
];
---
<section
class="relative bg-cover bg-center"
style="background-image: linear-gradient(rgba(0,0,0,0.15), rgba(0,0,0,0.55)), url('/images/business-hero.jpg');"
>
<div class="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8 py-24 sm:py-36">
<p class="text-xs font-semibold uppercase tracking-[0.25em] text-brand-accent">Nachhaltig · Professionell · Hamburg</p>
<h1 class="mt-4 text-4xl sm:text-6xl text-white max-w-2xl">
Eigene Bienen vor Ort.
</h1>
<p class="mt-5 text-lg text-white/85 max-w-md normal-case">
Professionell betreut. Nachhaltig erlebbar. Corporate Beekeeping für Unternehmen und Hotels – von place4bees.
<!-- 1 · Hero. min-height 70vh, Claim als h2 rechtsbündig. -->
<section class="p4b-hero hero-video relative flex min-h-[70vh] items-end overflow-hidden pb-5">
<img
src="/images/p4b/hero-video-poster.jpg"
alt=""
class="pointer-events-none absolute inset-0 h-full w-full object-cover"
fetchpriority="high"
/>
<video
class="hero-video-el pointer-events-none absolute inset-0 h-full w-full object-cover"
autoplay
muted
loop
playsinline
preload="auto"
poster="/images/p4b/hero-video-poster.jpg"
aria-hidden="true"
tabindex="-1"
>
<source src="/video/hero.mp4" type="video/mp4" />
<source src="/video/hero.webm" type="video/webm" />
</video>
<div class="p4b-breite relative w-full">
<h2 class="p4b-h2 text-right">
Eigene Bienen vor&nbsp;Ort.<br />Professionell betreut.<br />Nachhaltig&nbsp;erlebbar.
</h2>
</div>
</section>
<!-- 2 · Logoband. Weiß, 15px oben und unten. -->
<section class="bg-white py-[15px]">
<div class="p4b-breite flex justify-center">
<img src="/images/newLogo.png" alt="place4bees – Hamburger Stadtimkerei" width="1890" height="1486" class="h-auto w-[220px]" />
</div>
</section>
<!-- 3 · Geben Sie Bienen ein Zuhause. Text links, Foto als Spaltenhintergrund rechts. -->
<section class="grid min-h-[40vh] md:grid-cols-2">
<div class="p4b-spalte-text">
<h4 class="p4b-eyebrow">Support your local bees</h4>
<h2 class="p4b-h2 mt-2">Geben Sie Bienen ein zuhause</h2>
<p class="mt-6">
Zusammen mit PLACE4BEES können Unternehmen und Hotels heimischen Honigbienen jetzt einen
geeigneten Lebensraum geben und so einen wertvollen Beitrag zur lokalen Naturvielfalt leisten
– sogar direkt am eigenen Standort.
</p>
<div class="mt-10 flex flex-wrap gap-4">
<a href="/business/anfrage" class="rounded bg-brand-primary text-brand-ink px-7 py-3 text-sm font-semibold hover:bg-brand-primary-hover transition-colors">
Interesse? Jetzt anfragen
</a>
<a href="/business/ihr-projekt" class="rounded border border-white/50 text-white px-7 py-3 text-sm font-semibold hover:bg-white/10 transition-colors">
Ihr Projekt
</a>
<p class="mt-6">Die Möglichkeiten sind individuell und vielfältig, aber eines haben sie gemeinsam:</p>
<p>
Ein Nachhaltigkeitserlebnis vor Ort – zusammen mit PLACE4BEES professionell betreut &amp;
spannend aufbereitet.
</p>
<p class="mt-6 font-semibold">Starten Sie jetzt Ihr Unternehmensbienen-Projekt mit PLACE4BEES!</p>
</div>
<div
class="p4b-spalte-bild min-h-[40vh]"
style="background-image: url('/images/p4b/unternehmensbienen-18.jpg')"
role="img"
aria-label="Bienenstöcke auf einem Dach"
>
</div>
</section>
<!-- 4 · Aktiver Bienenschutz. Foto links, Text rechts. -->
<section class="grid min-h-[40vh] md:grid-cols-2">
<div
class="p4b-spalte-bild order-2 min-h-[40vh] md:order-1"
style="background-image: url('/images/p4b/unternehmensbienen-02-02-22-2.jpg')"
role="img"
aria-label="Biene auf einer Blüte"
>
</div>
<div class="p4b-spalte-text order-1 md:order-2">
<h4 class="p4b-eyebrow">Zum Hintergrund</h4>
<h2 class="p4b-h2 mt-2">Aktiver Bienenschutz</h2>
<p class="mt-6">
Bienen nehmen eine Schlüsselrolle in unserem globalen Ökosystem ein. Mit ihrer
Bestäubungsleistung sind sie elementar für die Biodiversität.
</p>
<p>Aber: Die Bienen brauchen unsere Hilfe. Allein in Europa sterben jedes Jahr ca. 20% der Bienenvölker.</p>
<p class="mt-6">
Während es im Jahr 1950 noch rund 2,5 Millionen Bienenvölker in Deutschland gab, sind es heute
nur noch etwa 950.000 – dies bedeutet einen Rückgang um fast zwei Drittel, deren Gründe
vielfältig sind.
</p>
<p class="mt-6">
Ein Unternehmensbienen-Projekt bedeutet erlebbare Nachhaltigkeit vor Ort und aktive
Unterstützung der lokalen Biodiversität.
</p>
</div>
</section>
<!-- 5 · Mittendrin statt nur dabei. Hintergrundfoto, Text mittig. -->
<section
class="p4b-mittendrin flex min-h-[50vh] items-center py-10"
style="background-image: url('/images/p4b/unternehmensbienen-20-scaled.jpg')"
>
<div class="p4b-breite text-center">
<h4 class="p4b-eyebrow">Mittendrin statt nur dabei!</h4>
<h2 class="p4b-h2 mt-2">Erlebbares Nachhaltigkeitsengagement</h2>
<p class="mt-4">Umweltschutz und Nachhaltigkeit sind Zeitgeist.</p>
<p class="mt-6">
Um so schöner und besonders spürbar ist Ihr Nachhaltigkeitsengagement, wenn Sie es direkt vor
Ort erleben<br />und aktiv mitgestalten können.
</p>
<p class="mt-6">
Mit einem Unternehmensbienen-Projekt ermöglichen Sie Ihrem Team naturnahe und spannende
Erlebnisse –<br />und das jeden Tag und direkt vor Ort.
</p>
</div>
</section>
<!-- 6 · Was uns antreibt. Karte mit Schatten, 60px Außenabstand. -->
<section class="my-[60px]">
<div class="p4b-breite">
<div class="p4b-karte grid md:grid-cols-2">
<div class="flex flex-col items-center justify-center px-10 py-12 text-center">
<img src="/images/bee-single.png" alt="" width="200" height="138" class="h-auto w-[100px]" />
<h2 class="p4b-h3 mt-6">Was uns antreibt</h2>
<p class="mt-3">
„Wir haben es uns zur Aufgabe gemacht, mithilfe von zukunftsorientierten Unternehmen und
Hotels den heimischen Honigbienen artgerechte Lebensräume zu schaffen<br />und sie so stark
für die Zukunft zu machen.“
</p>
</div>
<div
class="p4b-spalte-bild min-h-[300px]"
style="background-image: url('/images/p4b/philosophie-was-uns-antreibt-scaled.jpg')"
role="img"
aria-label="Zwei Imker an einer Wabe"
>
</div>
</div>
</div>
</section>
<section class="bg-white py-10 flex justify-center">
<img src="/images/logo-badge.png" alt="place4bees – Modern Beekeeping, est. 2021" class="h-40 w-auto" />
</section>
<!-- 7 · Vor Projektstart. Zeitleiste auf #f7f7f7. -->
<section class="bg-[#f7f7f7] pt-10 pb-5">
<div class="p4b-breite text-center">
<h4 class="p4b-eyebrow">Bevor es los geht</h4>
<h2 class="p4b-h2 mt-2">Vor Projektstart</h2>
<section class="bg-brand-surface">
<div class="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8 py-16 sm:py-20 grid gap-10 sm:grid-cols-2 items-center">
<div>
<h2 class="text-3xl text-brand-ink">Geben Sie Bienen ein Zuhause</h2>
<p class="mt-4 text-brand-text normal-case">
Zusammen mit place4bees können Unternehmen und Hotels heimischen Honigbienen jetzt einen
geeigneten Lebensraum geben und so einen wertvollen Beitrag zur lokalen Naturvielfalt
leisten. Die Möglichkeiten sind individuell und vielfältig, aber eines haben sie
gemeinsam: ein Nachhaltigkeitserlebnis vor Ort – zusammen mit place4bees professionell
betreut und spannend aufbereitet.
</p>
<a href="/business/anfrage" class="mt-6 inline-block rounded bg-brand-primary text-brand-ink px-7 py-3 text-sm font-semibold hover:bg-brand-primary-hover transition-colors">
Starten Sie jetzt Ihr Unternehmensbienen-Projekt
</a>
</div>
<img src="/images/business-hero-2.jpg" alt="Bienenstöcke vor Ort" class="rounded-2xl w-full h-80 object-cover" />
<div class="mt-12"><Projektstrecke schritte={schritte} /></div>
<a href="/business/ihr-projekt" class="p4b-knopf mt-10 inline-block">Weiterlesen</a>
</div>
</section>
<section class="bg-white">
<div class="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8 py-16 sm:py-20 grid gap-10 sm:grid-cols-2 items-center">
<img src="/images/bee-on-flower.jpg" alt="Biene auf einer Blüte" class="rounded-2xl w-full h-80 object-cover" />
<div>
<p class="text-xs font-semibold uppercase tracking-[0.2em] text-brand-accent">Zum Hintergrund</p>
<h2 class="mt-2 text-3xl text-brand-ink">Aktiver Bienenschutz</h2>
<p class="mt-4 text-brand-text normal-case">
Bienen nehmen eine Schlüsselrolle in unserem globalen Ökosystem ein. Mit ihrer
Bestäubungsleistung sind sie elementar für die Artenvielfalt. Doch: Die Bienen brauchen
unsere Hilfe. Allein in Europa sterben jedes Jahr zwei Millionen Bienenvölker.
</p>
<p class="mt-4 text-brand-text normal-case">
Ein Unternehmensbienen-Projekt bedeutet erlebbare Nachhaltigkeit vor Ort und aktive
Unterstützung der lokalen Biodiversität.
</p>
</div>
<!-- 8 · Unsere Partner. -->
<section class="bg-white pt-[60px] pb-[30px]">
<div class="p4b-breite">
<h2 class="p4b-h2 text-center">Unsere Partner</h2>
{/* Feste Zellenhöhe plus fester Abstand: die Vorlage setzt die Logoreihen
auf gleichmäßige 185px Abstand, unabhängig davon, wie hoch das einzelne
Logo tatsächlich ist. 70 + 115 = 185. */}
<ul class="mt-12 grid grid-cols-2 items-center gap-x-8 gap-y-[115px] sm:grid-cols-3 lg:grid-cols-5">
{partners.map((partner) => (
<li class="flex h-[70px] items-center justify-center">
<img
src={`/images/partners/${partner.file}`}
alt={partner.name}
loading="lazy"
class="h-auto max-h-[70px] w-auto max-w-full"
/>
</li>
))}
</ul>
</div>
</section>
<PartnerGrid />
<!-- 9 · Interesse? Karte mit Kontaktformular. -->
<Interesse />
<script>
/**
* Der Hero-Film.
*
* `autoplay` allein reicht nicht: Safari verweigert es je nach
* Einstellung, mobile Browser im Sparmodus ebenso, und im
* Hintergrund-Tab lädt der Browser das Video gar nicht erst zu Ende.
* Verweigert er, bleibt das Video unsichtbar und das Standbild darunter
* steht — statt eines Play-Knopfs, den niemand drücken kann.
*/
const GESTURES = ["pointerdown", "keydown", "touchstart"] as const;
const heroVideo = () => document.querySelector<HTMLVideoElement>(".hero-video-el");
const reduced = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches;
/**
* Ein Startversuch. `NotAllowedError` heißt: der Browser verweigert
* Autoplay, daran ändert kein weiterer Versuch etwas — dafür ist die Geste
* da. Jede andere Ablehnung (typischerweise `AbortError`, weil der
* Ladevorgang dazwischenkam) wird wiederholt.
*/
async function start(): Promise<"playing" | "blocked" | "retry" | "none"> {
const video = heroVideo();
if (!video || reduced()) return "none";
// Als Eigenschaft, nicht nur als Attribut: manche Engines gewähren die
// Autoplay-Ausnahme nur, wenn sie beim Aufruf gesetzt ist.
video.muted = true;
try {
await video.play();
return "playing";
} catch (error) {
return (error as DOMException)?.name === "NotAllowedError" ? "blocked" : "retry";
}
}
async function retryAfterGesture() {
if ((await start()) === "playing") {
for (const type of GESTURES) document.removeEventListener(type, retryAfterGesture);
}
}
function waitForGesture() {
for (const type of GESTURES) {
document.addEventListener(type, retryAfterGesture, { passive: true });
}
}
document.addEventListener("astro:page-load", () => {
const video = heroVideo();
if (!video) return;
video.addEventListener("playing", () => video.classList.add("is-playing"));
for (const event of ["pause", "error", "emptied"]) {
video.addEventListener(event, () => video.classList.remove("is-playing"));
}
// Der erste Versuch fällt oft in den Moment, in dem noch kein einziger
// Frame da ist. Sobald welche da sind, wird er wiederholt.
for (const event of ["loadeddata", "canplay"]) {
video.addEventListener(event, () => {
if (video.paused) void start().then((r) => r === "blocked" && waitForGesture());
});
}
void start().then((result) => {
if (result === "blocked") waitForGesture();
});
});
document.addEventListener("visibilitychange", () => {
const video = heroVideo();
if (!video) return;
if (document.hidden) video.pause();
else void start();
});
</script>
@@ -1,42 +1,201 @@
---
import SplitBand from "../SplitBand.astro";
import { listProducts, getDefaultRegion } from "../../lib/medusa";
import { formatEUR } from "../../lib/format";
import { CLAIM } from "../../lib/sections";
let teaserProducts: Awaited<ReturnType<typeof listProducts>> = [];
try {
const region = await getDefaultRegion();
teaserProducts = (await listProducts(region.id)).slice(0, 3);
} catch {
teaserProducts = [];
}
function priceLabel(product: (typeof teaserProducts)[number]) {
const amount = product.variants[0]?.calculated_price?.calculated_amount;
return amount != null ? formatEUR(amount) : null;
}
const ranges = [
{
title: "Regionale Honigsorten",
text: "Rapshonig, Frühlingsblüte, Akazie, Wald- und Heidehonig – cremig oder flüssig.",
href: "/shop",
},
{
title: "Bienenprodukte",
text: "Bienenwachskerzen, reines Bienenwachs und Honigseifen aus eigener Herstellung.",
href: "/shop",
},
{
title: "Erlebnis & Patenschaft",
text: "Bienen-Schnupperkurse und Bienenpatenschaften für Privatpersonen.",
href: "/shop",
},
];
---
<section
class="relative bg-cover bg-center"
style="background-image: linear-gradient(rgba(0,0,0,0.15), rgba(0,0,0,0.55)), url('/images/private-hero.jpg');"
>
<div class="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8 py-24 sm:py-36">
<p class="text-xs font-semibold uppercase tracking-[0.25em] text-brand-accent">Regional · Nachhaltig · Hamburg</p>
<h1 class="mt-4 text-4xl sm:text-6xl text-white max-w-2xl">
<section class="parallax-wrap brand-section relative flex min-h-[86dvh] items-end">
<div
class="parallax-layer"
style="background-image: linear-gradient(to top, rgba(24,22,18,0.92) 0%, rgba(24,22,18,0.7) 32%, rgba(24,22,18,0.3) 58%, rgba(24,22,18,0.05) 80%, rgba(24,22,18,0.2) 100%), linear-gradient(100deg, rgba(24,22,18,0.78) 0%, rgba(24,22,18,0.42) 36%, rgba(24,22,18,0) 74%), url('/images/p4b/philosophie-16.jpg');"
>
</div>
<div class="scroll-settle relative w-full mx-auto max-w-[84rem] px-[var(--gutter)] pt-40 pb-20">
<p class="reveal eyebrow eyebrow-light on-photo">{CLAIM}</p>
<h1 class="reveal display-xl on-photo mt-6 max-w-[17ch] text-white" style="--delay: 0.08s">
Unsere fleißigen Bienen erzeugen regionalen Honig
</h1>
<p class="mt-5 text-lg text-white/85 max-w-md normal-case">
Einige davon mitten in Hamburg. Frisch aus der Region, direkt von place4bees.
</p>
<div class="mt-10 flex flex-wrap gap-4">
<a href="/shop" class="rounded bg-brand-primary text-brand-ink px-7 py-3 text-sm font-semibold hover:bg-brand-primary-hover transition-colors">
Zum Shop
</a>
<a href="/ueber-uns" class="rounded border border-white/50 text-white px-7 py-3 text-sm font-semibold hover:bg-white/10 transition-colors">
Über uns
</a>
<div class="mt-10 grid gap-10 lg:grid-cols-[minmax(0,32rem)_auto] lg:items-end lg:justify-between">
<p class="reveal lede on-photo text-white/80" style="--delay: 0.16s">
Einige davon mitten in Hamburg. Frisch aus der Region, direkt von
place4bees.
</p>
<div class="reveal flex flex-wrap items-center gap-3" style="--delay: 0.24s">
<a href="/shop" class="btn btn-primary">Zum Shop</a>
<a href="/ueber-uns" class="btn btn-on-dark">Über uns</a>
</div>
</div>
</div>
</section>
<section class="bg-brand-surface">
<div class="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8 py-16 sm:py-20 grid gap-10 sm:grid-cols-3">
<div>
<h2 class="text-2xl text-brand-ink">Regionale Honigsorten</h2>
<p class="mt-2 text-sm text-brand-text normal-case">Rapshonig, Frühlingsblüte, Akazie, Wald- und Heidehonig – cremig oder flüssig.</p>
<!--
Sortiment: three items on a shared baseline grid, but each column starts a
step lower than the last. The stagger is what keeps this from being the
standard three-equal-boxes feature row.
-->
<section class="brand-section bg-brand-surface py-[var(--section-y)]">
<div class="mx-auto max-w-[84rem] px-[var(--gutter)]">
<div class="reveal max-w-[32rem]">
<h2 class="mt-5">Was bei uns im Glas landet</h2>
</div>
<div>
<h2 class="text-2xl text-brand-ink">Bienenprodukte</h2>
<p class="mt-2 text-sm text-brand-text normal-case">Bienenwachskerzen, reines Bienenwachs und Honigseifen aus eigener Herstellung.</p>
</div>
<div>
<h2 class="text-2xl text-brand-ink">Erlebnis &amp; Patenschaft</h2>
<p class="mt-2 text-sm text-brand-text normal-case">Bienen-Schnupperkurse und Bienenpatenschaften für Privatpersonen.</p>
<div class="mt-14 grid gap-x-10 gap-y-12 sm:grid-cols-3 lg:mt-20">
{ranges.map((item, index) => (
<a
href={item.href}
class:list={[
"reveal group block",
index === 1 && "sm:mt-12",
index === 2 && "sm:mt-24",
]}
style={`--delay: ${index * 0.09}s`}
>
<div class="rule"></div>
<h3 class="mt-6 transition-colors duration-200 group-hover:text-brand-honey-ink">{item.title}</h3>
<p class="mt-3 max-w-[38ch] leading-relaxed text-brand-text">{item.text}</p>
<span class="mt-5 inline-flex items-center gap-2 text-sm font-medium text-brand-ink">
Ansehen
<svg
viewBox="0 0 20 20"
class="h-4 w-4 text-brand-primary transition-transform duration-200 ease-out group-hover:translate-x-1"
fill="none"
stroke="currentColor"
stroke-width="1.75"
aria-hidden="true"
>
<path d="M4 10h12M11 5l5 5-5 5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</span>
</a>
))}
</div>
</div>
</section>
{teaserProducts.length > 0 && (
<section class="brand-section bg-brand-surface-strong py-[var(--section-y)]">
<div class="mx-auto max-w-[84rem] px-[var(--gutter)]">
<div class="reveal flex flex-col gap-5 sm:flex-row sm:items-end sm:justify-between">
<div>
<h2 class="mt-5">Beliebte Sorten</h2>
</div>
<a href="/shop" class="link-underline shrink-0 sm:pb-2">
Gesamtes Sortiment
<svg viewBox="0 0 20 20" class="h-4 w-4 text-brand-primary" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true">
<path d="M4 10h12M11 5l5 5-5 5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</a>
</div>
<div class="mt-14 grid gap-7 sm:grid-cols-3">
{teaserProducts.map((product, index) => (
<a
href={`/shop/${product.handle}`}
class="reveal card-interactive group flex flex-col overflow-hidden"
style={`--delay: ${index * 0.09}s`}
>
<div class="honeycomb-edge aspect-[4/5] overflow-hidden bg-brand-surface-sunk">
{product.thumbnail ? (
<img
src={product.thumbnail}
alt={product.title}
loading="lazy"
class="h-full w-full object-cover transition-transform duration-[700ms] ease-spring group-hover:scale-[1.05]"
/>
) : (
<div class="honeycomb-bg flex h-full w-full items-center justify-center">
<img src="/images/bee-single.png" alt="" class="h-12 w-auto opacity-30" />
</div>
)}
</div>
<div class="flex flex-1 flex-col p-6">
<h3 class="line-clamp-2 min-h-[2.6rem] text-[1.0625rem] leading-snug">{product.title}</h3>
{priceLabel(product) && (
<p class="mt-auto pt-4 font-medium tabular-nums text-brand-honey-ink">{priceLabel(product)}</p>
)}
</div>
</a>
))}
</div>
</div>
</section>
)}
<SplitBand
title="Von der Blüte bis zur Ernte"
text="Jedes Glas Honig erzählt die Geschichte einer Region – sorgfältig begleitet von unseren Imker:innen, von Hand geerntet und abgefüllt."
image="/images/p4b/projekt-8.jpg"
imageAlt="Frisch geschleuderter Honig läuft in ein Glas"
tone="green"
cta={{ label: "Sorten ansehen", href: "/shop" }}
/>
<section class="brand-section bg-brand-surface-strong py-[var(--section-y)]">
<div class="mx-auto grid max-w-[84rem] gap-14 px-[var(--gutter)] lg:grid-cols-12 lg:gap-16">
<div class="reveal lg:col-span-5 lg:sticky lg:top-28 lg:self-start">
<span class="section-label">Warum place4bees</span>
<h2 class="mt-5 max-w-[15ch]">Direkt aus Hamburg, direkt vom Imker</h2>
<p class="mt-6 max-w-[54ch] leading-relaxed text-brand-text">
Unsere Bienenvölker stehen mitten in Hamburg und der Region – kurze Wege
bedeuten frischen, unverfälschten Honig ohne lange Lager- oder
Transportzeiten. Jede Sorte wird von Hand geerntet und abgefüllt, mit
voller Rückverfolgbarkeit bis zum eigenen Bienenvolk.
</p>
<a href="/shop" class="btn btn-primary mt-9">Honig entdecken</a>
</div>
<dl class="lg:col-span-6 lg:col-start-7">
{[
{ value: 23, label: "Produkte im Sortiment", suffix: "" },
{ value: 6, label: "Kategorien – von Honig bis Bienenpatenschaft", suffix: "" },
{ value: 100, label: "regional aus Hamburg und Umgebung", suffix: "\u00a0%" },
].map((stat, index) => (
<div
class="reveal reveal-right flex items-baseline justify-between gap-6 border-b border-brand-border py-8 first:border-t"
style={`--delay: ${index * 0.09}s`}
>
<dt class="max-w-[26ch] text-brand-text">{stat.label}</dt>
<dd class="count-up stat-figure shrink-0 text-brand-ink" data-count-to={stat.value}>
{stat.value}{stat.suffix}
</dd>
</div>
))}
</dl>
</div>
</section>
+170 -9
View File
@@ -1,31 +1,47 @@
---
import { ClientRouter } from "astro:transitions";
import "../styles/global.css";
import Header from "../components/Header.astro";
import Footer from "../components/Footer.astro";
import { COMPANY_NAME, PRIMARY_DOMAIN, sections, resolveSection } from "../lib/sections";
import CookieNotice from "../components/CookieNotice.astro";
import SectionCurtain from "../components/SectionCurtain.astro";
import HhonigWelcome from "../components/HhonigWelcome.astro";
import SecondHeader from "../components/SecondHeader.astro";
import Vertrauensleiste from "../components/Vertrauensleiste.astro";
import { COMPANY_NAME, PRIMARY_DOMAIN, layers, resolveLayer } from "../lib/sections";
interface Props {
title: string;
description: string;
image?: string;
/**
* Wie hell der obere Rand der Seite ist. Der Header schwebt darüber —
* über einem dunklen Foto muss seine Schrift weiß werden, sonst liegt sie
* unlesbar darauf. Standard ist hell, weil die meisten Seiten oben eine
* helle Fläche haben.
*/
heroTone?: "light" | "dark";
}
const { title, description, image } = Astro.props;
const { title, description, image, heroTone = "light" } = Astro.props;
const pathname = Astro.url.pathname;
// Host only matters to resolve the bare "/" root; every other path is
// resolved from the pathname alone, so skip touching request headers there
// (they aren't available on statically prerendered pages).
const hostname = pathname === "/" ? Astro.request.headers.get("host") ?? Astro.url.hostname : "";
const section = resolveSection(pathname, hostname);
const layer = resolveLayer(pathname, hostname);
// Nur die Shop-Ebene braucht ihn, aber gelesen wird er hier: Cookies stehen
// im Layout zur Verfügung, in der Leiste darunter nicht mehr zuverlässig.
const isLoggedIn = Boolean(Astro.cookies.get("customer_jwt")?.value);
// "/" mirrors different content per host; canonicalize it to the matching
// stable section path so both domains consolidate onto one indexable URL.
const canonicalPath = pathname === "/" ? sections[section].homeHref : pathname;
const canonicalPath = pathname === "/" ? layers[layer].homeHref : pathname;
const canonicalUrl = new URL(canonicalPath, PRIMARY_DOMAIN).toString();
---
<html lang="de" data-section={section}>
<html lang="de" data-layer={layer} data-hero={heroTone}>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
@@ -40,12 +56,157 @@ const canonicalUrl = new URL(canonicalPath, PRIMARY_DOMAIN).toString();
<meta property="og:url" content={canonicalUrl} />
{image && <meta property="og:image" content={image} />}
<meta name="twitter:card" content="summary_large_image" />
<!-- Seitenwechsel als View Transition statt hartem Neuaufbau. -->
<ClientRouter />
</head>
<body class="min-h-screen flex flex-col bg-white text-brand-body antialiased">
<Header section={section} />
<main class="flex-1">
<body class="min-h-screen flex flex-col text-brand-body antialiased">
<a href="#inhalt" class="skip-link">Zum Inhalt springen</a>
<!-- Nullhoher Marker: verlässt er den Viewport, ist die Seite gescrollt.
Der Header beobachtet ihn, statt auf jedes Scroll-Event zu horchen. -->
<div id="scroll-sentinel" aria-hidden="true"></div>
<div class="grain" aria-hidden="true"></div>
<div class="floating-bees" aria-hidden="true">
<div class="bee bee-1"><img src="/images/bee-single.png" alt="" width="40" /></div>
<div class="bee bee-2"><img src="/images/bee-single.png" alt="" width="32" /></div>
<div class="bee bee-3"><img src="/images/bee-single.png" alt="" width="36" /></div>
</div>
<Header layer={layer} />
{layer !== "site" && <SecondHeader layer={layer} loggedIn={isLoggedIn} />}
{layer === "shop" && <Vertrauensleiste />}
<main id="inhalt" class="flex-1">
<slot />
</main>
<Footer section={section} />
<Footer layer={layer} />
<CookieNotice />
<SectionCurtain />
<HhonigWelcome />
<script>
// astro:page-load feuert beim ersten Laden UND nach jedem
// View-Transition-Wechsel — sonst blieben Reveals nach einer
// Navigation dauerhaft unsichtbar.
document.addEventListener("astro:page-load", () => {
const revealObserver = new IntersectionObserver(
(entries) => {
for (const entry of entries) {
if (entry.isIntersecting) {
entry.target.classList.add("visible");
revealObserver.unobserve(entry.target);
}
}
},
{ threshold: 0.1, rootMargin: "0px 0px -60px 0px" }
);
const revealEls = document.querySelectorAll(".reveal");
// Was beim Aufbau schon im Bild steht, darf nicht erst von unten
// hereinfahren. Die Seite baut in diesem Moment ohnehin noch auf, und
// die Verschiebung liest sich dann nicht als Aufbau, sondern als
// Sprung. Diese Elemente blenden nur auf — der zeitliche Versatz
// bleibt, die Bewegung entfällt. Alles, was erst hereingescrollt
// wird, behält den vollen Reveal.
for (const el of revealEls) {
if (el.getBoundingClientRect().top < window.innerHeight) {
el.classList.add("reveal-settled");
}
}
revealEls.forEach((el) => revealObserver.observe(el));
// Safety net: a fast jump-scroll (End key, anchor link, etc.) can skip
// straight past an element without ever putting it in the viewport, so
// the observer never fires for it and it would stay invisible forever.
// Force-reveal anything still hidden after a short delay.
setTimeout(() => {
revealEls.forEach((el) => el.classList.add("visible"));
}, 1500);
});
</script>
<script>
// Große Display-Headlines wortweise aufbauen. Der Text wird erst hier
// zerlegt — ohne JS bleibt die Headline vollständig und sichtbar.
document.addEventListener("astro:page-load", () => {
for (const el of document.querySelectorAll<HTMLElement>(".display-xl")) {
if (el.querySelector(".word")) continue;
// Gesetzte Zeilenumbrüche bleiben erhalten: über textContent zu
// gehen würde jedes <br> verschlucken und den Claim zu einem
// einzigen Fließtext zusammenziehen.
const tokens: (string | "br")[] = [];
for (const node of Array.from(el.childNodes)) {
if (node.nodeName === "BR") {
tokens.push("br");
} else {
for (const word of (node.textContent ?? "").trim().split(/\s+/)) {
if (word) tokens.push(word);
}
}
}
if (tokens.filter((t) => t !== "br").length < 2) continue;
el.textContent = "";
let i = 0;
tokens.forEach((token, index) => {
if (token === "br") {
el.append(document.createElement("br"));
return;
}
const span = document.createElement("span");
span.className = "word";
span.style.setProperty("--i", String(i++));
span.textContent = token;
if (tokens[index + 1] && tokens[index + 1] !== "br") el.append(span, " ");
else el.append(span);
});
el.classList.add("word-stagger");
}
});
</script>
<script>
// Count-up numbers: data-count-to holds the target integer, the
// element's own text supplies the formatting (e.g. "950.000" or
// "2,5 Mio.") which we only overwrite once the count reaches its
// final frame, so a slow network/JS delay never shows a stuck "0".
document.addEventListener("astro:page-load", () => {
const countEls = Array.from(document.querySelectorAll<HTMLElement>("[data-count-to]"));
const reduceMotionCount = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
const countObserver = new IntersectionObserver(
(entries) => {
for (const entry of entries) {
if (!entry.isIntersecting) continue;
const el = entry.target as HTMLElement;
countObserver.unobserve(el);
const target = Number(el.dataset.countTo);
const finalText = el.textContent ?? "";
if (reduceMotionCount || !Number.isFinite(target)) continue;
const duration = 1400;
const start = performance.now();
const format = (value: number) => Math.round(value).toLocaleString("de-DE");
function tick(now: number) {
const elapsed = Math.min((now - start) / duration, 1);
const eased = 1 - Math.pow(1 - elapsed, 3);
el.textContent = format(target * eased);
if (elapsed < 1) {
requestAnimationFrame(tick);
} else {
el.textContent = finalText;
}
}
requestAnimationFrame(tick);
}
},
{ threshold: 0.5 }
);
countEls.forEach((el) => countObserver.observe(el));
});
</script>
</body>
</html>
+117
View File
@@ -0,0 +1,117 @@
import { medusaFetch } from "./medusa";
export interface MedusaCustomer {
id: string;
email: string;
first_name: string | null;
last_name: string | null;
}
export async function loginCustomer(email: string, password: string): Promise<string> {
const data = await medusaFetch("/auth/customer/emailpass", {
method: "POST",
body: JSON.stringify({ email, password }),
});
return data.token;
}
export async function registerCustomer(input: {
email: string;
password: string;
first_name: string;
last_name: string;
}): Promise<string> {
const registration = await medusaFetch("/auth/customer/emailpass/register", {
method: "POST",
body: JSON.stringify({ email: input.email, password: input.password }),
});
await medusaFetch("/store/customers", {
method: "POST",
headers: { Authorization: `Bearer ${registration.token}` },
body: JSON.stringify({ email: input.email, first_name: input.first_name, last_name: input.last_name }),
});
// The registration token isn't linked to the new customer yet (Medusa
// issues it before the auth identity <-> customer link exists), so it
// can't authenticate customer-scoped routes. Log in again to get a token
// that actually resolves to this customer.
return loginCustomer(input.email, input.password);
}
export async function getCustomerMe(token: string): Promise<MedusaCustomer> {
const data = await medusaFetch("/store/customers/me", {
headers: { Authorization: `Bearer ${token}` },
});
return data.customer;
}
export interface MedusaOrderSummary {
id: string;
display_id: number;
status: string;
total: number;
currency_code: string;
created_at: string;
}
export async function listMyOrders(token: string): Promise<MedusaOrderSummary[]> {
const data = await medusaFetch("/store/orders?limit=50&order=-created_at", {
headers: { Authorization: `Bearer ${token}` },
});
return data.orders;
}
export interface MedusaOrderDetailItem {
title: string;
quantity: number;
unit_price: number;
total: number;
thumbnail: string | null;
}
export interface MedusaOrderDetail {
id: string;
display_id: number;
email: string;
created_at: string;
currency_code: string;
items: MedusaOrderDetailItem[];
shipping_address: {
first_name?: string | null;
last_name?: string | null;
address_1?: string | null;
postal_code?: string | null;
city?: string | null;
country_code?: string | null;
} | null;
item_total: number;
shipping_total: number;
total: number;
fulfillment_status: string;
fulfillments: {
packed_at: string | null;
shipped_at: string | null;
delivered_at: string | null;
canceled_at: string | null;
labels: { tracking_number: string; tracking_url: string }[];
}[];
}
export async function getMyOrder(token: string, id: string): Promise<MedusaOrderDetail> {
const data = await medusaFetch(`/store/customers/me/orders/${id}`, {
headers: { Authorization: `Bearer ${token}` },
});
return data.order;
}
// Links a (possibly guest-created) cart to the now-logged-in customer, so
// the resulting order shows up under "Meine Bestellungen" — carts only get
// a customer_id automatically at creation time if already authenticated,
// which isn't the case when someone adds to cart before logging in.
export async function transferCartToCustomer(cartId: string, token: string): Promise<void> {
await medusaFetch(`/store/carts/${cartId}/customer`, {
method: "POST",
headers: { Authorization: `Bearer ${token}` },
});
}
+206 -4
View File
@@ -1,4 +1,6 @@
import { medusaFetch } from "./medusa";
import { summariseVarieties } from "./subscriptions";
import { varietyName } from "./varieties";
export interface MedusaCartItem {
id: string;
@@ -6,14 +8,55 @@ export interface MedusaCartItem {
thumbnail: string | null;
quantity: number;
unit_price: number;
/** Beim Abo steht hier die Sortenwahl. */
metadata?: {
subscription_selection?: "fixed" | "random";
/** Altbestand: eine Sorte für alle Gläser. */
subscription_variety?: string;
subscription_variant_id?: string;
/** Eine Angabe je Glas, in der Reihenfolge der Auswahl. */
subscription_varieties?: string[];
subscription_variant_ids?: string[];
/** Beim verschenkten Abo gesetzt. */
subscription_gift?: boolean;
/** Bienenpatenschaft: Angaben für Urkunde, Etikett und Beschenkten. */
sponsorship_name?: string;
sponsorship_gift?: boolean;
sponsorship_recipient_email?: string;
sponsorship_sender_name?: string;
subscription_deliveries?: number;
gift_recipient_name?: string;
gift_recipient_email?: string;
gift_sender_name?: string;
/** Geschenkgutschein: geht er direkt an den Beschenkten? */
voucher_gift?: boolean;
voucher_recipient_name?: string;
voucher_recipient_email?: string;
voucher_sender_name?: string;
voucher_message?: string;
} | null;
/** `false` beim Geschenkgutschein: er kommt per E-Mail. */
requires_shipping?: boolean;
variant?: {
id: string;
metadata?: { subscription_interval?: string; subscription_size?: string } | null;
product?: { metadata?: { subscription?: boolean } | null } | null;
} | null;
}
export interface MedusaCart {
id: string;
email: string | null;
currency_code: string;
/** Bestimmt, welche Zahlungsarten zur Verfügung stehen. */
region_id: string | null;
item_total: number;
items: MedusaCartItem[];
/** Nach Abzug eingelöster Gutscheine. */
total?: number;
credit_line_total?: number;
credit_lines?: { id: string; amount: number; reference: string | null; reference_id: string | null }[];
gift_cards?: { id: string; code: string }[];
}
export interface MedusaShippingOption {
@@ -30,15 +73,152 @@ export async function createCart(regionId: string): Promise<MedusaCart> {
return data.cart;
}
// Ohne diese Felder liefert Medusa weder die Posten-Metadaten noch die
// Produktkennzeichnung — beides braucht die Kasse, um ein Abo zu erkennen.
// Dazu die eingelösten Gutscheine und ob ein Posten verschickt wird.
const CART_FIELDS =
"+items.metadata,+items.variant.metadata,+items.variant.product.metadata,+items.requires_shipping," +
"+total,+credit_line_total,+credit_lines.*,+gift_cards.id,+gift_cards.code";
export async function getCart(cartId: string): Promise<MedusaCart> {
const data = await medusaFetch(`/store/carts/${cartId}`);
const data = await medusaFetch(`/store/carts/${cartId}?fields=${encodeURIComponent(CART_FIELDS)}`);
return data.cart;
}
export async function addLineItem(cartId: string, variantId: string, quantity = 1): Promise<MedusaCart> {
/** Enthält der Warenkorb ein Abo? Dann läuft die Kasse anders. */
function istAboPosten(item: MedusaCartItem): boolean {
return item.variant?.product?.metadata?.subscription === true;
}
/**
* Ob der Warenkorb ein Abo enthält, das ein Mandat braucht.
*
* Ein verschenktes Abo braucht keines: es ist mit der Bestellung vollständig
* bezahlt und wird nie abgebucht. Es läuft deshalb durch die normale Kasse,
* nicht über die Weiterleitung zu Mollie.
*/
export function cartHasSubscription(cart: MedusaCart | null): boolean {
return (cart?.items ?? []).some(
(item) => istAboPosten(item) && item.metadata?.subscription_gift !== true
);
}
/** Ob im Warenkorb ein verschenktes Abo liegt. */
export function cartHasGiftSubscription(cart: MedusaCart | null): boolean {
return (cart?.items ?? []).some(
(item) => istAboPosten(item) && item.metadata?.subscription_gift === true
);
}
const INTERVAL_LABELS: Record<string, string> = {
monthly: "monatlich",
quarterly: "alle 3 Monate",
biannual: "alle 6 Monate",
};
/**
* Die Angaben, die ein Posten über sich selbst macht.
*
* Bei der Patenschaft sind das Name und Empfänger — sie stehen im Warenkorb
* und an der Kasse, damit ein Tippfehler im Namen auffällt, bevor die
* Urkunde gedruckt ist.
*/
export function describeSponsorshipItem(item: MedusaCartItem): string {
const name = item.metadata?.sponsorship_name;
if (!name) return "";
const teile = [`Auf den Namen: ${name}`];
if (item.metadata?.sponsorship_gift) {
teile.push(`Geschenk an ${item.metadata.sponsorship_recipient_email ?? "—"}`);
}
return teile.join(" · ");
}
/** Beim verschenkten Gutschein: an wen er per E-Mail geht. */
export function describeVoucherItem(item: MedusaCartItem): string {
if (!item.metadata?.voucher_gift || !item.metadata.voucher_recipient_email) return "";
const an = item.metadata.voucher_recipient_name
? `${item.metadata.voucher_recipient_name} (${item.metadata.voucher_recipient_email})`
: item.metadata.voucher_recipient_email;
return `Per E-Mail an ${an}`;
}
/** Ob etwas im Warenkorb verschickt wird. Ein Gutschein allein nicht. */
export function cartRequiresShipping(cart: MedusaCart | null): boolean {
return (cart?.items ?? []).some((item) => item.requires_shipping !== false);
}
/** Gutscheincode am Warenkorb einlösen. */
export async function applyGiftCard(cartId: string, code: string): Promise<void> {
await medusaFetch(`/store/carts/${cartId}/gift-cards`, {
method: "POST",
body: JSON.stringify({ code }),
});
}
/** Eingelösten Gutschein wieder vom Warenkorb nehmen. */
export async function removeGiftCard(cartId: string, code: string): Promise<void> {
await medusaFetch(`/store/carts/${cartId}/gift-cards`, {
method: "DELETE",
body: JSON.stringify({ code }),
});
}
/** Das Guthaben der eingelösten Gutscheine — für den Abzug an der Kasse. */
export async function getGiftCardBalances(cartId: string): Promise<{ code: string; balance: number }[]> {
const data = await medusaFetch(`/store/carts/${cartId}/gift-card-balances`);
return data.gift_cards ?? [];
}
export function describeSubscriptionItem(item: MedusaCartItem): string {
const interval = INTERVAL_LABELS[item.variant?.metadata?.subscription_interval ?? ""] ?? "";
const size = item.variant?.metadata?.subscription_size ?? "";
// Beim Anzeigen kürzen statt beim Speichern: so lesen sich auch Warenkörbe
// kurz, die noch mit den vollen Katalogtiteln angelegt wurden.
const perGlass = summariseVarieties(
(item.metadata?.subscription_varieties ?? []).map(varietyName)
);
const variety =
item.metadata?.subscription_selection === "fixed"
? // Altbestand aus der Zeit vor der Wahl je Glas kennt nur die
// Einzelangabe.
(perGlass || (item.metadata.subscription_variety && varietyName(item.metadata.subscription_variety)) || "feste Sorte")
: "Überraschungshonig";
return [size, interval, variety].filter(Boolean).join(" · ");
}
/** Startet die Abo-Kasse und liefert die Weiterleitungsadresse zu Mollie. */
export async function startSubscriptionCheckout(payload: {
cart_id: string;
email: string;
shipping_address: Record<string, unknown>;
shipping_option_id?: string;
method?: string;
}): Promise<{ checkout_url: string }> {
const data = await medusaFetch("/store/subscriptions/checkout", {
method: "POST",
body: JSON.stringify(payload),
});
return data;
}
export async function addLineItem(
cartId: string,
variantId: string,
quantity = 1,
/**
* Zusatzangaben am Posten. Beim Abo steht hier die Sortenwahl, die
* bewusst keine Produktvariante ist — mit 12 Sorten mal Größe mal
* Intervall gäbe das 78 Varianten.
*/
metadata?: Record<string, unknown>
): Promise<MedusaCart> {
const data = await medusaFetch(`/store/carts/${cartId}/line-items`, {
method: "POST",
body: JSON.stringify({ variant_id: variantId, quantity }),
body: JSON.stringify({
variant_id: variantId,
quantity,
...(metadata && Object.keys(metadata).length ? { metadata } : {}),
}),
});
return data.cart;
}
@@ -80,14 +260,36 @@ export async function listShippingOptions(cartId: string): Promise<MedusaShippin
return data.shipping_options;
}
/**
* Versandart setzen. Über die eigene Route statt Medusas `shipping-methods`:
* nur sie rechnet die Versandkostenfreigrenze ohne Gutscheine im Warenkorb.
*/
export async function addShippingMethod(cartId: string, optionId: string): Promise<MedusaCart> {
const data = await medusaFetch(`/store/carts/${cartId}/shipping-methods`, {
const data = await medusaFetch(`/store/carts/${cartId}/select-shipping`, {
method: "POST",
body: JSON.stringify({ option_id: optionId }),
});
return data.cart;
}
export interface PaymentMethod {
id: string;
label: string;
description: string;
}
/**
* Die Zahlungsarten, die der Shop zu Ende führen kann.
*
* Bewusst nicht Medusas `/store/payment-providers`: das listet auch
* Anbieter, für die es an der Kasse noch keinen Ablauf gibt.
*/
export async function listPaymentMethods(regionId?: string): Promise<PaymentMethod[]> {
const query = regionId ? `?region_id=${encodeURIComponent(regionId)}` : "";
const data = await medusaFetch(`/store/payment-methods${query}`);
return data.payment_methods ?? [];
}
export async function createPaymentCollection(cartId: string) {
const data = await medusaFetch("/store/payment-collections", {
method: "POST",
+20
View File
@@ -0,0 +1,20 @@
import { medusaFetch } from "./medusa";
export interface ContactRequest {
quelle: string;
name: string;
email: string;
nachricht: string;
datenschutz: boolean;
/** Die unsichtbare Falle. Bleibt beim Menschen leer. */
website?: string;
seite?: string;
}
/** Schickt eine Anfrage an den Shop. Wirft mit der Meldung des Backends. */
export async function sendContactRequest(anfrage: ContactRequest): Promise<void> {
await medusaFetch("/store/contact", {
method: "POST",
body: JSON.stringify(anfrage),
});
}
+14
View File
@@ -0,0 +1,14 @@
export const CUSTOMER_COOKIE_NAME = "customer_jwt";
export function getCustomerTokenClient(): string | null {
const match = document.cookie.match(new RegExp(`(?:^|; )${CUSTOMER_COOKIE_NAME}=([^;]*)`));
return match ? decodeURIComponent(match[1]) : null;
}
export function setCustomerTokenClient(token: string) {
document.cookie = `${CUSTOMER_COOKIE_NAME}=${encodeURIComponent(token)}; path=/; max-age=${60 * 60 * 24 * 30}; SameSite=Lax`;
}
export function clearCustomerTokenClient() {
document.cookie = `${CUSTOMER_COOKIE_NAME}=; path=/; max-age=0`;
}
+12
View File
@@ -6,3 +6,15 @@ export function formatGrundpreis(amount: number, netWeightGrams: number): string
const perKg = (amount / netWeightGrams) * 1000;
return `${formatEUR(perKg)}/kg`;
}
/**
* Wie formatEUR, aber ohne "‚00" bei glatten Beträgen — "60 €" statt
* "60,00 €". Für Angaben wie die Versandfreigrenze, die immer rund ist.
*/
export function formatEURKurz(amount: number): string {
return new Intl.NumberFormat("de-DE", {
style: "currency",
currency: "EUR",
minimumFractionDigits: Number.isInteger(amount) ? 0 : 2,
}).format(amount);
}
+112
View File
@@ -0,0 +1,112 @@
/**
* Umrisse der 16 Bundesländer als SVG-Pfade.
*
* Erzeugt aus deutschlandGeoJSON (isellsoap, niedrige Auflösung) mit einer
* äquirektangularen Projektion und Standardparallele in der Landesmitte —
* dadurch entspricht das Seitenverhältnis den realen Entfernungen statt der
* Mercator-Überhöhung. Douglas-Peucker-vereinfacht.
*
* `project()` verwendet exakt dieselbe Projektion wie die Pfade. Nur so
* landen zur Laufzeit gesetzte Koordinaten an der richtigen Stelle.
*/
export const MAP_WIDTH = 1000.0;
export const MAP_HEIGHT = 1354.59;
const LON0 = 5.87161922454851;
const LAT_N = 55.05652618408226;
const KX = 0.6271040495237281;
const SCALE = 173.96311033367303;
/** Geografische Koordinate -> Punkt im SVG-Koordinatensystem der Karte. */
export function project(lat: number, lng: number): { x: number; y: number } {
return {
x: (lng - LON0) * KX * SCALE,
y: (LAT_N - lat) * SCALE,
};
}
/** Ausschnitte für das viewBox-Attribut. */
export const VIEWS = {
germany: `0 0 1000 1355`,
/** Hamburg mit Umland – Standardansicht, weil dort alle Völker stehen. */
hamburg: `389 213 128 90`,
/** Norddeutschland. */
north: `59 0 897 677`,
} as const;
export type MapView = keyof typeof VIEWS;
/** Hamburg im Gesamtbild — für die kleine Übersichtskarte. */
export const HAMBURG = project(53.5511, 9.9937);
export interface StatePath {
id: string;
name: string;
d: string;
}
/** Bundesländer, die im Nord-Ausschnitt sichtbar sind. */
export const NORTHERN_STATES = ["Bremen", "Hamburg", "Mecklenburg-Vorpommern", "Niedersachsen", "Schleswig-Holstein"].map(String);
export const STATES: StatePath[] = [
{ id: "DE-BW", name: "Baden-Württemberg", d: "M412.2 918.6L410.8 933.5L414.6 934.8L419.4 927.6L421.4 934.7L428.1 927.5L432.6 932.0L432.2 940.4L437.3 948.7L431.3 957.8L435.7 959.7L441.8 952.5L440.0 957.0L443.1 957.0L444.1 970.5L452.7 970.4L458.1 959.4L460.1 965.8L464.5 965.7L461.6 976.6L469.2 985.5L463.0 988.2L465.0 993.2L462.5 995.2L466.9 997.1L468.1 1005.0L463.4 1009.3L465.9 1009.9L464.7 1018.8L479.2 1028.8L473.7 1036.6L478.7 1037.7L478.8 1046.7L490.1 1048.4L501.3 1064.3L498.2 1069.4L501.3 1072.1L498.2 1079.7L500.6 1086.2L496.3 1092.5L505.5 1107.5L496.3 1111.8L499.3 1106.1L495.7 1105.4L489.5 1113.0L488.3 1106.6L480.8 1104.0L479.0 1111.0L486.4 1120.7L483.3 1121.3L485.1 1135.4L475.9 1137.2L477.1 1140.4L469.8 1146.5L454.5 1147.0L455.2 1152.1L447.3 1160.7L457.8 1177.9L459.8 1195.4L466.0 1209.6L465.4 1223.9L459.4 1234.4L462.5 1238.2L461.9 1248.0L458.9 1250.0L465.0 1259.0L457.8 1264.3L463.2 1268.8L464.4 1283.8L459.6 1283.9L458.3 1290.5L453.0 1281.3L446.5 1287.8L433.4 1283.4L422.7 1295.9L403.2 1299.5L395.8 1288.0L375.7 1283.8L346.1 1258.2L360.6 1273.2L365.4 1285.3L359.2 1287.8L340.4 1271.4L342.4 1274.5L334.9 1274.2L342.0 1280.6L329.5 1287.6L325.3 1282.6L327.6 1278.4L320.4 1272.5L316.3 1276.3L319.3 1283.3L311.6 1280.3L311.9 1268.3L307.5 1268.8L303.8 1261.4L300.9 1268.3L299.8 1261.7L294.2 1259.9L295.1 1264.3L283.8 1267.6L276.3 1283.3L283.7 1289.6L297.8 1283.8L300.8 1288.2L297.3 1289.0L296.0 1297.1L289.0 1290.5L282.2 1296.2L286.3 1299.7L279.9 1302.1L268.1 1301.5L263.9 1294.7L254.5 1292.6L241.8 1303.6L226.1 1305.9L220.3 1298.3L212.6 1298.1L196.1 1308.1L192.1 1303.7L197.3 1302.2L196.3 1298.3L189.4 1300.5L180.3 1286.7L183.9 1248.3L191.0 1232.2L185.1 1221.3L186.1 1206.5L195.8 1189.1L198.8 1175.0L204.4 1170.2L203.1 1158.2L210.9 1138.2L210.9 1124.4L228.9 1096.0L241.7 1088.1L253.7 1061.1L264.4 1052.9L271.7 1036.3L274.5 1012.8L285.8 1001.2L281.3 995.7L286.1 990.9L286.6 985.2L282.9 985.4L287.7 976.8L280.8 975.3L283.2 971.3L277.9 957.6L279.0 951.7L296.7 962.3L300.4 957.6L297.7 946.9L308.3 944.5L306.6 952.9L311.7 962.8L330.6 964.7L328.2 971.1L322.5 970.6L323.8 976.9L319.5 980.9L325.8 983.2L336.4 973.4L336.3 964.5L355.8 963.1L351.4 958.6L353.2 952.2L369.5 951.6L375.6 939.4L386.9 941.4L387.9 929.8L384.8 926.5L381.1 931.0L383.5 927.2L374.8 925.2L377.9 924.6L376.6 920.1L397.0 916.8L403.9 924.5L403.7 918.0L412.2 918.6ZM309.5 1277.1L311.0 1280.4L304.3 1280.6L309.5 1277.1Z" },
{ id: "DE-BY", name: "Bayern", d: "M465.0 784.0L472.7 783.3L475.9 790.5L486.8 793.7L494.6 806.0L493.3 811.2L500.3 809.9L504.2 818.3L516.4 822.2L517.1 840.4L529.3 844.9L530.5 836.4L543.7 836.3L528.6 823.5L529.2 817.0L541.1 811.8L553.0 811.8L559.3 820.1L559.3 816.2L564.3 820.1L571.8 816.2L576.9 822.6L575.0 829.7L586.9 833.5L590.2 816.1L586.5 796.7L594.8 794.7L597.4 788.9L606.4 790.1L605.0 801.1L608.2 806.3L612.0 804.3L616.4 814.7L624.2 809.4L645.3 806.1L649.7 811.3L661.9 805.4L666.8 811.2L666.5 818.3L682.2 825.2L683.5 830.6L677.9 835.2L690.3 845.6L690.3 860.2L697.1 863.6L696.5 868.8L721.9 882.0L720.5 890.1L728.3 892.3L723.3 907.7L720.1 908.2L720.1 916.1L712.5 922.2L717.0 930.6L726.1 934.0L725.9 943.6L730.2 945.0L732.7 959.0L739.0 961.2L737.6 970.1L740.7 978.4L751.4 984.0L754.1 992.4L772.5 993.0L781.3 999.9L781.8 1007.0L797.3 1023.3L797.3 1028.5L809.9 1032.7L821.7 1044.6L823.9 1058.5L831.8 1064.0L833.3 1059.1L841.9 1059.1L850.9 1073.9L859.6 1075.4L868.8 1093.4L863.5 1102.1L867.7 1116.0L866.0 1124.8L858.4 1135.6L832.5 1123.8L825.2 1129.3L827.2 1137.8L822.5 1161.9L808.8 1174.5L787.5 1178.6L763.3 1192.1L750.7 1207.2L777.8 1253.3L768.0 1274.3L779.3 1274.6L786.6 1281.3L789.2 1290.3L782.9 1299.8L783.5 1315.5L779.1 1320.5L774.4 1318.5L755.8 1303.9L753.8 1300.4L758.7 1294.3L752.7 1289.3L754.0 1284.0L734.6 1283.4L731.5 1291.2L723.8 1292.1L716.1 1279.6L696.8 1283.9L696.3 1272.8L687.6 1280.0L691.4 1297.0L670.4 1293.4L652.9 1300.8L628.9 1297.5L622.9 1312.5L607.2 1312.3L601.8 1319.4L605.7 1324.0L596.7 1322.9L589.4 1333.5L583.9 1333.5L586.3 1325.9L557.0 1332.6L551.5 1318.4L544.5 1318.4L550.6 1311.8L546.7 1307.9L534.6 1311.7L515.8 1301.7L511.6 1308.3L497.5 1299.7L497.6 1315.0L500.9 1316.8L501.8 1326.2L497.7 1335.7L492.9 1336.2L485.6 1348.9L468.9 1354.6L475.1 1333.2L460.8 1339.8L457.9 1329.9L460.7 1328.7L460.3 1322.1L450.1 1317.0L447.2 1305.8L436.6 1309.2L430.0 1305.7L428.7 1297.7L421.5 1307.4L408.5 1301.6L413.2 1294.8L423.9 1295.2L433.4 1283.4L446.5 1287.8L453.0 1281.3L458.3 1290.5L459.6 1283.9L464.4 1283.8L463.2 1268.8L457.8 1264.3L465.0 1259.0L458.9 1250.0L461.9 1248.0L462.5 1238.2L459.4 1234.4L465.4 1223.9L466.0 1209.6L459.8 1195.4L457.8 1177.9L447.3 1160.7L455.2 1152.1L454.5 1147.0L469.8 1146.5L477.1 1140.4L475.9 1137.2L485.1 1135.4L483.3 1121.3L486.4 1120.7L479.0 1111.0L480.8 1104.0L488.3 1106.6L489.5 1113.0L495.7 1105.4L499.3 1106.1L496.3 1111.8L505.5 1107.5L496.3 1092.5L500.6 1086.2L498.2 1079.7L501.3 1072.1L498.2 1069.4L501.3 1064.3L490.1 1048.4L478.8 1046.7L478.7 1037.7L473.7 1036.6L479.2 1028.8L464.7 1018.8L465.9 1009.9L463.4 1009.3L468.1 1005.0L466.9 997.1L462.5 995.2L465.0 993.2L463.0 988.2L469.2 985.5L461.6 976.6L464.5 965.7L460.1 965.8L458.1 959.4L452.7 970.4L445.9 971.1L442.1 968.6L441.8 952.5L435.7 959.7L431.3 957.8L437.3 948.1L429.4 927.5L422.1 934.7L419.4 927.6L413.3 934.8L410.2 932.2L412.8 916.6L403.7 918.0L403.9 924.5L397.0 916.8L382.8 918.2L374.8 925.2L383.5 927.2L379.8 928.5L382.4 931.7L386.0 927.2L388.6 933.0L386.9 941.4L375.6 939.4L367.0 952.9L355.1 953.5L349.3 948.4L353.7 941.3L351.7 933.0L359.1 923.9L354.1 921.4L357.1 915.0L352.7 915.7L352.6 906.7L346.3 906.2L344.8 881.3L348.6 880.5L346.5 872.3L340.8 870.5L345.0 860.1L356.4 857.9L360.2 859.0L359.8 864.2L367.2 853.7L382.4 856.6L387.0 865.7L397.9 863.6L399.4 850.5L396.3 849.3L395.8 837.6L413.3 839.3L410.7 836.7L412.5 832.8L422.5 825.5L422.7 807.2L437.6 810.3L445.9 806.3L458.6 785.3L465.0 784.0Z" },
{ id: "DE-BE", name: "Berlin", d: "M795.3 428.3L801.2 430.4L802.8 422.7L807.4 423.4L808.9 417.7L818.0 423.7L829.5 418.8L827.5 416.8L830.3 414.3L835.4 420.2L833.8 429.2L850.1 439.9L845.1 450.1L861.5 455.7L849.8 472.8L848.6 466.3L830.9 463.3L829.7 458.8L824.3 460.6L824.8 466.4L805.2 458.8L793.1 464.4L787.9 459.1L796.9 443.8L791.0 441.1L795.3 428.3Z" },
{ id: "DE-BB", name: "Brandenburg", d: "M873.6 270.6L877.7 284.6L913.0 283.2L912.5 293.5L897.7 312.3L914.9 312.8L921.6 303.4L932.6 301.1L935.7 312.2L926.8 326.4L929.1 334.0L926.7 344.5L902.3 364.5L903.8 378.7L900.0 385.5L924.0 399.6L937.6 417.4L956.5 430.8L952.3 439.0L955.6 444.9L944.4 462.8L950.5 477.6L949.0 481.3L963.1 489.8L959.8 510.6L967.6 519.0L961.0 548.2L950.6 560.1L967.3 589.7L967.5 600.7L961.5 601.4L959.3 609.9L948.9 606.1L924.1 618.6L903.5 610.9L896.8 619.3L898.5 622.1L892.2 622.1L895.5 627.8L888.4 640.6L883.7 636.3L862.7 642.7L838.8 641.3L823.6 626.7L820.9 631.8L814.4 629.1L808.9 638.6L803.1 636.5L802.0 630.7L798.7 631.2L802.3 617.8L799.9 608.8L784.6 593.0L799.4 581.1L792.7 558.4L795.4 554.0L782.9 554.3L783.7 549.2L775.8 549.0L774.6 543.2L762.7 543.6L762.2 537.8L755.6 538.9L743.2 530.3L728.6 535.2L720.8 526.0L716.1 529.1L692.7 503.0L701.5 493.5L696.3 488.2L703.2 472.2L700.6 469.6L702.7 461.9L699.4 459.9L705.6 449.1L695.1 441.2L691.0 446.2L687.7 444.3L689.7 439.8L685.0 441.0L689.2 432.7L688.0 423.6L695.4 423.1L694.9 412.8L690.9 408.2L692.4 397.9L697.2 394.1L694.7 383.1L651.8 374.6L649.9 371.4L652.6 366.9L635.1 362.1L634.5 356.9L628.5 356.2L629.2 351.0L616.3 350.2L609.6 344.3L597.4 348.7L589.3 340.2L602.9 339.0L602.9 333.9L618.5 336.6L622.6 329.6L621.3 321.1L628.8 316.0L650.5 318.9L647.2 314.4L671.7 305.7L674.5 294.0L687.3 299.4L694.1 296.3L697.4 302.2L712.2 305.7L717.5 314.9L741.7 314.1L742.3 318.6L751.7 319.5L749.6 324.0L752.3 326.0L775.2 323.9L771.7 328.3L775.7 330.4L790.9 316.5L797.6 314.7L802.9 320.7L810.6 309.9L821.9 315.3L825.5 306.4L835.1 302.8L837.6 288.6L845.7 286.9L855.0 274.3L868.1 271.4L862.8 268.7L863.8 261.0L866.9 268.2L873.6 270.6ZM830.3 414.3L827.5 416.8L829.5 418.8L818.0 423.7L808.9 417.7L807.4 423.4L802.8 422.7L801.2 430.4L792.6 430.2L795.2 433.5L791.0 441.1L796.9 443.8L788.5 461.1L793.1 464.4L811.1 459.6L824.8 466.4L824.3 460.6L829.7 458.8L830.9 463.3L848.6 466.3L849.8 472.8L858.7 462.1L860.9 453.7L845.1 450.1L850.1 439.9L833.8 429.2L835.4 420.2L830.3 414.3Z" },
{ id: "DE-HB", name: "Bremen", d: "M339.7 335.5L335.7 336.2L340.5 340.6L337.2 342.0L339.4 349.1L334.2 355.1L326.7 350.1L321.5 353.6L316.6 347.9L312.0 351.3L300.5 329.0L285.3 318.0L297.5 320.0L297.0 325.3L322.7 328.8L326.2 333.9L335.5 330.4L339.7 335.5Z" },
{ id: "DE-HH", name: "Hamburg", d: "M458.2 232.8L472.0 228.9L466.0 237.9L475.3 247.5L467.2 261.0L486.5 280.1L477.4 287.4L469.7 286.8L456.2 275.3L449.9 283.1L440.1 283.9L441.5 278.0L435.2 281.3L424.6 267.8L425.1 259.4L420.2 258.8L424.2 246.6L431.3 254.2L440.2 242.6L458.3 237.9L458.2 232.8Z" },
{ id: "DE-HE", name: "Hessen", d: "M395.7 595.8L409.8 594.8L416.5 604.2L405.7 614.7L411.6 623.5L411.8 632.5L403.6 637.3L402.6 645.1L421.0 653.4L425.4 646.1L421.6 649.4L418.3 641.2L430.7 633.4L436.1 640.4L434.7 633.4L440.7 632.7L447.5 655.9L456.6 657.3L458.7 666.3L476.2 673.0L473.7 685.2L469.2 679.3L464.0 681.2L469.9 685.2L466.7 696.1L474.5 701.3L467.4 706.4L455.1 703.1L452.5 708.9L457.8 714.7L444.7 714.7L444.8 718.5L449.3 716.6L448.1 721.8L452.0 719.2L457.2 725.7L452.7 728.9L452.8 734.7L444.9 736.6L445.6 743.7L441.8 746.9L443.7 751.4L436.5 768.0L444.5 770.0L445.1 762.9L455.7 761.8L459.8 769.6L454.5 772.8L457.3 782.7L454.7 793.8L446.5 805.7L433.7 810.4L424.0 805.9L421.9 827.5L412.5 832.8L410.7 836.7L413.3 839.3L395.8 837.6L396.3 849.3L399.4 850.5L397.9 863.6L387.0 865.7L382.4 856.6L367.2 853.7L359.8 864.2L360.2 859.0L356.4 857.9L343.1 863.4L340.8 871.8L346.5 872.3L348.6 880.5L344.8 881.3L346.3 906.2L352.6 906.7L352.7 915.7L357.1 915.0L354.1 921.4L359.1 923.9L351.7 933.0L353.7 941.3L349.3 945.2L353.2 952.2L351.4 958.6L355.8 963.1L336.3 964.5L336.4 973.4L321.4 983.3L322.5 970.6L328.2 971.1L330.6 964.7L311.7 962.8L306.6 952.9L308.3 944.5L297.7 946.9L300.4 957.6L293.0 962.5L275.1 946.2L271.7 933.5L285.2 920.0L278.9 920.4L274.3 911.0L275.5 905.8L270.3 900.2L270.0 886.7L262.2 876.8L252.7 874.0L219.9 884.8L208.7 870.4L218.0 857.3L225.8 861.8L226.3 855.3L221.0 850.1L223.4 844.2L232.9 838.8L237.4 842.7L240.5 839.3L237.8 832.9L247.3 832.0L241.2 814.6L230.5 807.7L235.5 801.7L231.8 795.3L233.4 788.1L238.4 782.7L249.9 783.7L251.1 775.2L245.1 762.1L251.8 751.7L246.6 741.9L262.3 726.3L273.7 730.2L283.6 721.1L283.2 712.1L292.7 703.4L288.6 699.0L290.9 689.1L312.3 687.2L309.6 682.7L317.8 670.1L314.3 660.5L297.8 662.9L294.8 655.9L309.0 640.5L336.7 638.3L337.9 631.1L334.6 631.2L331.7 622.2L340.3 617.4L352.9 619.0L353.7 628.7L366.2 625.7L382.6 602.6L378.8 598.9L394.3 591.4L395.7 595.8Z" },
{ id: "DE-MV", name: "Mecklenburg-Vorpommern", d: "M725.3 99.5L740.0 106.8L773.6 107.7L756.1 112.8L738.0 109.9L731.5 113.6L733.3 117.1L716.1 117.9L707.9 130.5L710.4 135.2L708.2 137.5L718.8 140.6L713.2 135.1L727.0 124.9L728.9 117.8L733.1 121.6L741.6 115.8L740.3 112.8L746.6 113.5L745.5 115.1L748.7 119.3L754.4 114.9L757.0 123.8L779.8 107.4L780.4 114.8L787.9 120.0L785.9 123.7L789.2 134.8L808.9 142.9L815.4 152.4L812.4 156.0L823.0 153.3L819.4 159.0L822.5 156.6L827.5 168.0L832.3 169.0L831.0 162.3L853.6 153.9L865.7 165.8L858.8 178.7L877.4 197.3L867.6 207.1L879.9 199.7L876.5 185.6L883.0 185.5L882.4 195.3L885.0 190.3L891.4 193.9L891.9 184.4L883.9 172.7L877.0 172.6L878.5 177.6L871.7 183.9L873.6 176.8L871.3 175.4L861.6 180.5L866.3 166.6L859.4 156.1L865.3 152.7L872.7 166.1L888.3 174.3L910.9 196.0L907.1 198.5L910.5 207.2L891.0 205.8L875.7 211.7L865.6 208.5L891.0 226.4L917.6 229.1L910.2 235.5L916.5 236.1L918.3 247.5L922.2 250.1L919.8 263.4L927.7 277.8L932.1 300.4L921.6 303.4L914.9 312.8L897.7 312.3L912.5 293.5L913.0 283.2L877.7 284.6L873.6 270.3L866.9 268.2L863.8 261.0L862.8 268.7L868.1 271.4L855.0 274.3L845.7 286.9L837.6 288.6L835.1 302.8L825.5 306.4L821.9 315.3L810.6 309.9L802.9 320.7L797.6 314.7L790.9 316.5L775.7 330.4L771.7 328.3L775.2 323.9L752.3 326.0L749.6 324.0L751.7 319.5L742.3 318.6L741.7 314.1L717.5 314.9L712.2 305.7L697.4 302.2L694.1 296.3L687.3 299.4L674.5 294.0L671.7 305.7L663.5 311.4L657.4 310.0L654.6 315.1L647.2 314.4L650.5 318.9L641.0 320.7L628.8 316.0L619.9 322.4L622.6 329.6L618.5 336.6L602.9 333.9L601.5 339.0L579.8 334.2L581.2 326.4L567.0 317.8L558.8 299.5L550.7 296.7L541.9 304.0L527.6 291.8L515.6 292.8L520.1 276.8L540.3 267.8L540.2 256.8L551.1 255.9L553.7 239.9L533.0 227.0L531.6 211.5L534.2 204.5L545.9 196.3L548.7 201.0L555.5 199.3L547.2 197.0L548.0 191.5L579.0 181.1L587.7 186.4L587.7 195.3L596.0 191.0L609.1 201.1L612.2 189.3L607.9 190.7L608.0 184.3L606.2 190.6L601.8 189.8L600.7 184.3L613.2 179.8L610.5 188.3L613.0 189.3L616.1 178.2L621.9 178.1L627.7 168.2L625.3 165.9L617.6 175.3L616.8 171.3L633.9 157.1L652.6 158.5L678.1 151.9L678.6 157.3L682.2 157.7L684.1 153.8L679.0 152.3L705.6 132.0L725.3 99.5ZM824.5 64.7L818.7 73.3L823.6 83.3L851.8 85.9L850.6 93.2L839.8 103.5L844.2 113.4L851.1 114.1L861.3 124.4L855.9 129.8L856.8 136.2L848.2 132.2L854.5 127.0L844.3 128.8L852.2 123.0L844.6 126.3L841.0 122.4L827.3 125.4L820.7 136.6L816.1 136.9L823.3 139.5L820.6 145.4L809.3 140.1L812.7 141.2L814.2 135.4L807.1 139.7L799.4 136.8L798.8 132.2L792.8 134.7L797.8 131.4L790.2 126.1L791.6 119.2L806.2 117.2L800.7 109.0L794.0 109.2L806.9 100.4L802.5 99.3L802.8 94.9L795.0 96.1L793.3 88.7L805.5 87.8L811.0 94.4L810.1 87.7L817.9 83.0L814.5 88.3L818.8 86.5L822.7 97.9L832.9 100.1L832.4 88.4L820.8 84.1L818.1 76.9L804.2 86.6L808.5 71.4L795.2 86.5L804.9 69.0L824.5 64.7ZM797.7 97.8L802.4 102.3L790.8 106.8L797.7 97.8ZM792.5 78.5L794.9 83.0L789.7 82.2L790.4 90.3L784.6 104.2L788.3 81.1L792.5 78.5Z" },
{ id: "DE-NI", name: "Niedersachsen", d: "M306.5 202.6L314.8 211.2L328.6 213.7L343.1 212.3L351.8 204.0L372.7 206.5L396.6 235.8L401.0 249.2L425.1 259.4L424.6 267.8L435.2 281.3L439.3 276.1L442.2 280.0L440.1 283.9L448.5 283.8L456.2 275.3L469.7 286.8L486.5 280.8L513.6 293.4L527.6 291.8L541.9 304.0L552.0 296.7L558.8 299.5L567.0 317.8L581.2 326.4L579.8 334.2L588.6 335.6L595.4 347.4L609.6 344.3L625.1 352.3L621.0 358.7L615.6 358.0L614.9 368.3L594.5 379.7L564.0 372.9L558.6 374.1L553.2 383.6L534.0 383.6L537.2 406.4L541.2 405.9L550.9 426.2L557.1 423.5L552.3 433.3L560.6 446.2L553.8 446.1L552.5 451.9L568.1 466.8L558.1 473.1L569.5 492.5L561.7 497.5L566.9 502.7L565.0 508.4L553.9 513.4L556.7 521.8L525.8 522.5L511.8 530.0L521.9 538.6L517.2 541.8L521.9 548.3L513.3 557.6L513.4 569.5L519.3 573.9L527.3 593.7L520.2 598.0L522.9 608.6L516.4 605.4L507.3 609.9L491.6 603.9L488.6 614.9L476.3 623.9L471.8 621.9L466.0 628.9L468.0 630.9L456.3 629.5L444.2 639.7L440.7 632.7L434.7 633.4L436.1 640.4L430.7 633.4L418.3 641.2L421.6 649.4L425.4 646.1L421.0 653.4L402.6 645.1L403.6 637.3L411.8 632.5L411.6 623.5L405.7 614.7L416.5 604.2L409.8 594.8L383.0 593.0L385.9 584.0L383.7 573.8L390.5 567.8L389.0 559.5L392.1 556.9L378.5 557.2L379.6 550.0L371.6 544.4L372.0 537.2L360.8 535.5L363.3 532.2L360.5 525.8L362.3 519.3L356.3 515.5L358.8 510.3L343.5 508.7L339.9 497.8L346.6 500.2L345.7 493.1L349.6 491.7L337.4 482.9L354.7 461.7L351.8 454.6L356.3 448.7L351.6 444.9L346.9 444.4L334.8 461.6L325.6 463.8L309.6 462.9L309.0 444.1L303.5 439.1L287.6 442.2L279.4 453.4L265.4 451.3L266.4 460.9L280.6 468.3L283.5 476.6L280.9 494.8L289.0 499.1L276.3 512.4L261.6 508.3L253.6 518.9L235.7 519.8L229.4 525.4L219.7 516.7L233.2 511.7L234.1 501.6L221.3 497.1L227.3 483.6L224.4 478.6L230.9 477.5L225.4 467.6L201.6 461.8L198.7 452.3L190.0 448.9L186.2 456.7L189.5 458.5L187.1 466.3L155.7 485.8L130.8 489.4L126.3 480.5L131.7 465.1L123.8 450.0L117.7 455.7L91.9 447.5L88.6 435.0L97.8 433.4L93.0 429.0L95.1 419.2L128.8 421.1L133.4 384.5L151.6 358.2L151.1 340.6L147.9 336.1L155.0 329.4L154.1 323.0L152.8 317.1L145.5 316.2L150.3 300.4L126.0 299.3L122.9 294.9L128.5 269.4L126.8 265.0L137.7 265.1L132.9 257.5L140.3 248.5L157.7 238.9L180.9 240.9L233.9 234.1L237.1 246.1L244.2 246.0L251.0 261.3L249.1 268.4L239.3 269.7L240.2 276.9L259.7 288.3L266.7 276.6L266.7 266.9L257.4 267.2L261.9 251.7L288.5 261.0L293.0 266.3L288.9 270.6L294.5 267.6L284.9 237.0L293.1 212.7L306.5 202.6ZM288.9 323.7L300.5 329.0L312.0 351.3L316.6 347.9L321.5 353.6L326.7 350.1L334.2 355.1L339.4 349.1L337.2 342.0L340.5 340.6L335.7 336.2L339.7 335.5L335.5 330.4L326.2 333.9L322.7 328.8L297.0 325.3L297.5 320.0L285.3 318.0L288.9 323.7ZM286.6 195.8L288.4 198.2L285.4 198.8L286.6 195.8ZM233.2 221.1L234.6 228.2L230.8 223.8L233.2 221.1ZM220.8 219.6L228.7 223.0L215.4 220.9L220.8 219.6ZM200.2 222.1L211.0 223.0L195.9 225.8L200.2 222.1ZM185.7 226.0L191.6 227.6L174.1 231.3L176.0 226.4L185.7 226.0ZM166.1 230.0L170.0 231.6L162.4 231.3L166.1 230.0ZM157.6 231.9L160.5 232.4L138.2 235.1L157.6 231.9ZM129.5 238.7L133.6 239.3L107.2 242.7L129.5 238.7ZM112.3 244.0L111.9 248.8L108.3 246.6L112.3 244.0ZM97.1 250.1L102.5 252.9L92.7 256.2L95.8 260.9L82.8 253.7L97.1 250.1Z" },
{ id: "DE-NW", name: "Nordrhein-Westfalen", d: "M304.9 440.3L309.0 444.1L309.6 462.9L313.0 464.1L334.8 461.6L346.9 444.4L355.6 447.4L350.9 469.6L344.4 471.7L337.4 482.9L349.6 491.7L345.7 493.1L346.6 500.2L339.9 497.8L343.5 508.7L358.8 510.3L356.3 515.5L362.3 519.3L360.5 525.8L363.3 532.2L360.8 535.5L372.0 537.2L371.6 544.4L379.6 550.0L378.5 557.2L392.1 556.9L389.0 559.5L390.5 567.8L383.2 576.4L385.9 584.0L383.0 593.0L390.6 593.4L378.8 598.9L382.6 602.6L366.2 625.7L353.7 628.7L353.5 619.6L345.9 615.3L331.7 622.2L334.6 631.2L337.9 631.1L336.7 638.3L309.0 640.5L301.2 647.2L294.3 657.8L297.8 662.9L312.9 658.6L317.8 670.1L309.6 682.7L312.3 687.2L290.9 689.1L288.6 699.0L292.7 703.4L283.2 712.1L283.6 721.1L273.7 730.2L262.3 726.3L246.6 741.9L251.8 751.0L248.9 758.8L238.0 758.0L229.4 744.9L229.4 732.6L214.1 726.4L216.3 718.5L210.3 715.6L203.4 719.9L206.7 732.6L195.3 737.1L198.2 742.1L195.2 746.2L164.7 755.2L160.3 769.0L147.0 771.8L146.1 767.4L139.6 776.2L129.3 775.6L115.7 783.5L115.9 788.0L110.9 789.0L112.8 799.3L108.5 802.1L101.7 795.3L96.1 798.2L102.3 818.8L91.1 822.3L87.6 816.3L84.0 821.0L80.2 813.3L63.1 821.6L64.2 817.0L56.7 812.8L58.0 823.6L51.1 813.6L54.9 802.1L50.0 793.8L38.4 792.3L32.8 783.9L44.4 772.4L32.9 771.5L33.0 765.1L27.0 756.4L17.1 753.5L15.3 744.8L10.0 741.3L17.0 737.9L16.2 732.6L22.1 732.3L23.1 719.3L15.7 717.3L17.3 708.6L3.5 709.5L0.0 696.8L10.7 699.7L15.7 689.3L32.7 679.1L29.8 675.5L35.1 672.3L24.0 675.2L22.5 663.1L39.3 642.0L37.5 615.8L23.9 600.4L27.0 590.8L18.3 587.8L19.5 581.0L10.1 576.7L14.5 572.1L11.0 561.0L21.5 555.2L32.4 558.7L25.7 551.0L31.3 548.2L59.5 562.1L57.9 553.5L66.4 557.0L89.5 545.6L95.0 549.3L105.5 537.7L105.1 532.5L90.2 524.7L90.4 518.9L95.0 518.7L97.8 510.7L109.6 509.5L122.6 491.9L140.5 485.1L155.7 485.8L187.1 466.3L189.5 458.5L186.2 456.7L190.0 448.9L198.7 452.3L201.6 461.8L225.4 467.6L230.9 477.5L224.4 478.6L227.3 483.6L221.3 497.1L234.9 503.5L232.2 504.5L233.2 511.7L219.7 516.7L223.3 523.1L253.6 518.9L261.6 508.3L276.3 512.4L289.0 499.1L280.9 494.8L283.5 476.6L280.6 468.3L266.4 460.9L264.7 451.9L279.4 453.4L287.6 442.2L304.9 440.3Z" },
{ id: "DE-RP", name: "Rheinland-Pfalz", d: "M210.3 715.6L216.3 718.5L214.1 726.4L229.4 732.6L229.4 744.9L238.0 758.0L245.4 757.5L247.6 773.2L251.2 776.5L247.6 786.4L238.4 782.7L233.4 788.1L231.8 795.3L235.5 801.7L230.5 807.7L241.2 814.6L247.3 832.0L237.8 832.9L240.5 839.3L237.4 842.7L232.9 838.8L223.4 844.2L221.0 850.1L226.3 855.3L225.8 861.8L218.0 857.3L208.7 870.4L219.9 884.8L260.3 874.9L270.0 886.7L270.3 900.2L275.5 905.8L274.3 911.0L278.9 920.4L285.2 920.0L271.7 933.5L279.0 951.7L277.9 957.6L283.2 971.3L280.8 975.3L287.7 976.8L282.9 985.4L286.6 985.2L286.1 990.9L281.3 995.7L285.8 1001.2L275.0 1011.5L271.7 1036.3L258.5 1059.0L242.2 1055.5L225.3 1043.8L217.7 1047.8L210.4 1042.5L196.3 1045.6L181.0 1036.7L176.7 1024.3L161.7 1023.9L155.0 1010.9L165.2 1002.7L167.8 987.9L155.1 984.5L151.0 977.0L157.0 970.3L154.2 964.6L157.1 959.3L154.0 958.8L152.9 950.5L146.8 954.0L126.6 941.1L80.4 963.1L55.3 958.3L53.7 953.7L59.5 946.2L60.3 937.7L70.4 927.6L71.6 913.0L58.2 911.0L53.6 905.0L48.1 908.3L47.7 903.1L39.9 898.4L37.9 888.1L31.8 887.7L24.7 869.2L30.0 849.4L34.7 846.7L32.6 838.5L44.1 833.5L46.9 824.2L60.0 823.6L55.5 813.5L64.2 817.0L63.1 821.6L80.2 813.3L84.0 821.0L87.6 816.3L91.1 822.3L102.3 818.8L96.1 798.2L101.7 795.3L108.5 802.1L112.8 799.3L110.9 789.0L115.9 788.0L115.7 783.5L129.3 775.6L139.6 776.2L146.1 767.4L147.0 771.8L160.3 769.0L164.7 755.2L195.2 746.2L198.2 742.1L195.3 737.1L206.7 732.6L203.4 719.9L210.3 715.6Z" },
{ id: "DE-SL", name: "Saarland", d: "M127.2 941.7L146.8 954.0L152.9 950.5L154.0 958.8L157.1 959.3L154.2 964.6L157.0 970.3L151.0 977.0L155.1 984.5L167.8 987.9L165.2 1002.7L155.0 1010.9L162.7 1028.4L144.7 1033.6L133.8 1026.8L129.4 1034.0L126.8 1020.9L114.8 1014.8L105.7 1016.3L107.9 1022.5L105.0 1027.3L94.5 1025.0L86.9 1004.8L75.7 992.8L79.4 989.8L72.4 978.1L61.1 971.1L52.7 972.7L54.5 958.3L80.4 963.1L116.5 942.4L127.2 941.7Z" },
{ id: "DE-SN", name: "Sachsen", d: "M764.3 588.7L772.7 594.6L779.4 589.6L788.4 600.1L796.2 601.6L795.4 608.0L802.4 614.6L798.7 631.2L802.0 630.7L803.1 636.5L808.9 638.6L814.4 629.1L820.9 631.8L823.6 626.7L838.8 641.3L862.7 642.7L883.7 636.3L888.4 640.6L895.5 627.8L892.2 622.1L898.5 622.1L896.8 619.3L903.5 610.9L924.1 618.6L948.9 606.1L959.3 609.9L962.1 601.4L967.4 614.5L986.1 619.9L991.9 626.8L992.3 644.0L998.9 651.8L1000.0 663.9L988.2 707.2L976.2 724.5L974.6 735.4L953.5 730.9L957.8 717.4L947.9 719.0L951.7 707.7L941.6 702.8L941.5 696.7L940.3 702.1L930.1 704.2L918.8 696.3L913.7 710.3L930.5 715.7L927.4 725.1L914.5 725.5L893.1 740.4L881.8 739.8L875.3 743.4L875.7 750.4L870.5 754.7L837.5 755.6L835.0 769.1L828.4 775.9L818.6 767.7L813.3 778.4L804.8 776.6L799.0 792.6L781.3 791.2L780.7 801.5L775.2 807.6L759.0 799.9L745.5 810.5L735.7 806.7L724.9 810.0L722.4 818.9L708.3 831.6L704.3 848.4L699.4 847.9L699.6 840.1L694.1 835.6L696.2 831.7L689.8 831.1L689.7 823.5L681.6 825.2L665.9 817.7L666.8 811.2L656.9 802.2L664.0 800.2L665.4 794.4L655.3 784.7L670.5 768.5L672.8 782.7L686.5 778.7L685.5 769.7L699.2 768.4L705.4 759.9L695.0 749.7L701.6 743.4L697.1 736.3L717.8 732.3L722.5 723.5L741.3 718.3L736.4 705.4L727.3 705.1L728.7 700.7L725.4 701.9L724.9 694.2L719.8 690.2L693.9 685.9L695.9 682.7L691.3 680.7L692.7 673.7L688.8 673.6L692.2 667.9L685.9 649.9L690.5 648.1L690.7 632.1L685.6 624.9L691.5 621.2L690.3 614.7L695.7 607.1L764.3 588.7Z" },
{ id: "DE-ST", name: "Sachsen-Anhalt", d: "M628.5 354.9L634.5 356.9L635.1 362.1L652.6 366.9L649.9 371.4L651.8 374.6L694.7 383.1L697.2 394.1L692.4 397.9L690.9 408.2L694.9 412.8L695.4 423.1L688.0 423.6L689.2 432.7L685.0 441.0L689.7 439.8L687.7 444.3L691.0 446.2L695.1 441.2L705.6 449.1L699.4 459.9L702.7 461.9L700.6 469.6L703.2 472.2L696.3 488.2L701.5 493.5L692.7 503.0L699.2 514.0L716.1 529.1L722.1 526.7L728.6 535.2L743.2 530.3L755.6 538.9L762.2 537.8L762.7 543.6L774.6 543.2L775.8 549.0L783.7 549.2L782.9 554.3L795.4 554.0L792.7 558.4L799.4 581.1L781.9 594.8L779.4 589.6L772.7 594.6L760.4 587.3L754.4 593.6L744.6 590.8L739.2 598.4L695.7 607.1L691.0 613.5L691.5 621.2L685.6 624.9L690.7 632.1L690.5 648.1L685.9 649.9L692.2 667.9L688.8 673.6L692.7 673.7L691.3 680.7L695.9 682.7L693.9 685.9L701.0 689.2L697.0 698.1L702.1 699.4L694.1 715.2L689.7 708.8L670.7 710.5L666.2 706.0L667.6 702.8L655.9 695.0L642.8 698.2L632.5 685.9L611.0 686.6L611.1 672.3L599.4 667.2L611.9 653.6L603.5 645.9L602.9 638.8L595.1 634.3L558.6 633.1L560.6 631.2L556.0 630.6L556.7 622.1L552.8 618.9L554.1 612.4L547.0 604.7L552.9 602.0L551.6 598.1L527.3 593.7L519.3 573.9L513.4 569.5L513.3 557.6L521.9 548.3L517.2 541.8L521.9 538.6L514.5 535.2L512.5 528.7L519.2 529.5L525.8 522.5L556.7 521.8L553.9 513.4L565.0 508.4L566.9 502.7L561.7 497.5L569.5 492.5L558.1 473.1L568.1 466.8L552.5 451.9L553.8 446.1L560.6 446.2L552.3 433.3L557.1 423.5L550.9 426.2L541.2 405.9L537.2 406.4L534.0 383.6L553.2 383.6L558.6 374.1L564.0 372.9L594.5 379.7L614.9 368.3L616.3 357.3L630.5 352.3L628.5 354.9Z" },
{ id: "DE-SH", name: "Schleswig-Holstein", d: "M567.1 90.8L585.0 95.6L593.7 113.8L572.4 113.8L569.8 106.3L560.5 107.0L561.4 97.8L567.1 90.8ZM276.6 2.2L280.5 7.1L270.8 15.5L272.2 26.8L279.1 31.1L320.8 24.3L365.8 34.9L372.1 44.2L385.9 37.5L388.8 46.6L408.2 31.4L407.1 39.1L427.7 45.1L433.3 52.2L440.1 50.9L440.3 45.1L445.5 48.1L454.2 66.8L448.5 61.8L443.6 66.7L443.1 74.6L425.3 82.8L419.9 91.9L423.0 88.7L443.6 75.3L444.7 66.6L454.1 67.3L453.4 88.0L433.0 102.5L436.0 106.0L464.3 99.4L472.1 104.5L468.8 108.3L471.3 116.0L466.5 119.6L464.8 129.7L470.5 126.8L469.8 121.0L475.3 111.9L485.1 108.0L516.2 120.7L527.3 130.8L536.4 129.6L551.7 117.4L573.4 115.8L565.9 122.2L569.7 149.4L546.3 168.4L538.2 167.1L532.3 175.3L536.2 184.4L546.2 186.2L547.2 197.0L555.5 199.3L548.7 201.0L545.9 196.3L534.2 204.5L531.6 211.5L533.0 227.0L553.7 239.9L551.1 255.9L540.2 256.8L540.3 267.8L520.1 276.8L518.2 289.6L513.6 293.4L485.2 280.8L487.1 277.6L468.7 264.8L467.8 255.2L473.4 254.6L471.8 249.4L475.3 247.5L466.0 237.9L472.1 230.8L469.9 227.6L459.5 230.9L458.3 237.9L450.6 237.4L449.3 243.1L440.2 242.6L431.3 254.2L424.2 246.6L420.2 258.8L414.8 257.7L401.0 249.2L396.6 235.8L372.7 206.5L335.9 200.8L321.6 179.6L337.4 177.7L339.7 173.1L333.4 160.9L325.9 162.5L320.3 153.3L323.4 140.0L330.7 138.5L336.0 129.4L326.2 137.0L324.2 133.6L324.5 138.1L322.0 133.1L302.6 136.4L295.4 129.9L298.2 121.5L307.0 121.7L298.6 116.6L326.7 113.5L343.9 101.4L339.3 93.2L331.3 103.4L320.2 102.0L320.0 97.2L327.3 91.9L329.3 80.7L320.9 79.9L324.0 76.8L321.9 71.4L307.2 56.8L307.8 49.9L296.6 29.8L277.6 36.4L266.0 31.7L268.5 33.6L264.9 35.8L264.8 54.7L262.7 53.0L264.7 25.6L276.6 2.2ZM418.4 93.5L400.8 95.2L403.9 101.1L409.4 94.8L419.3 98.3L417.7 94.2L418.4 93.5ZM277.1 1.2L277.7 0.0L282.7 1.9L277.1 1.2ZM307.7 86.9L305.5 97.8L296.5 94.8L307.7 86.9ZM291.1 52.3L297.1 58.6L294.0 65.5L275.5 61.0L278.2 54.5L291.1 52.3ZM292.3 83.0L294.7 86.6L287.7 83.9L292.3 83.0ZM284.2 100.9L289.6 108.4L283.5 110.4L281.3 105.1L284.2 100.9ZM284.3 88.8L287.3 91.4L283.7 97.5L284.3 88.8ZM284.9 82.1L286.9 86.7L281.9 86.6L284.9 82.1ZM271.1 60.0L269.2 63.9L275.3 77.3L264.1 67.7L271.1 60.0Z" },
{ id: "DE-TH", name: "Thüringen", d: "M534.6 593.5L552.9 600.1L547.0 604.7L554.1 612.4L552.8 618.9L556.7 622.1L556.0 630.6L560.6 631.2L558.6 633.1L595.1 634.3L602.9 638.8L603.5 645.9L611.9 653.6L599.4 667.2L611.1 672.3L613.0 676.9L609.0 680.7L612.9 687.8L632.5 685.9L642.8 698.2L655.9 695.0L667.6 702.8L666.2 706.0L670.7 710.5L689.7 708.8L693.5 715.2L702.1 701.3L697.0 698.1L701.0 689.2L719.8 690.2L724.9 694.2L725.4 701.9L728.7 700.7L727.3 705.1L736.4 705.4L741.2 719.0L722.5 723.5L717.8 732.3L697.1 736.3L701.6 743.4L695.0 749.7L699.0 749.7L698.8 757.4L704.6 762.5L699.2 768.4L691.4 767.1L690.6 771.6L686.1 769.1L684.6 777.5L687.2 778.1L675.4 782.7L671.6 780.8L671.8 769.7L667.2 770.4L661.2 782.1L655.3 784.7L665.4 795.0L662.8 795.7L664.0 800.2L656.9 802.2L661.3 804.8L654.2 809.3L649.1 811.3L644.7 806.1L616.4 814.7L612.0 804.3L608.2 806.3L605.0 801.1L606.4 790.1L597.4 788.9L594.8 794.7L586.5 796.7L590.2 816.1L586.9 833.5L575.0 829.7L576.9 822.6L571.8 816.2L564.3 820.1L559.3 816.2L559.3 820.1L553.0 811.8L546.1 811.1L528.6 818.3L529.9 824.8L543.1 832.5L543.1 837.6L530.5 836.4L529.9 844.9L517.8 841.1L516.4 822.2L504.2 818.3L500.3 809.9L493.3 811.2L494.6 806.0L486.8 793.7L464.3 781.4L454.7 789.9L457.3 782.7L454.5 772.8L459.8 771.6L455.7 761.8L445.1 762.9L444.5 770.0L436.5 768.0L443.7 751.4L441.8 746.9L445.6 743.7L444.9 736.6L452.8 734.7L452.7 728.9L457.2 725.7L452.0 719.2L448.1 721.8L449.3 716.6L444.8 718.5L444.7 714.7L457.8 714.7L452.5 708.9L455.1 703.1L472.6 705.2L472.6 698.1L466.7 696.1L469.9 685.2L464.0 681.2L469.2 679.3L473.7 685.2L476.2 674.2L458.7 666.3L456.6 657.3L447.5 655.9L442.2 641.0L456.3 629.5L468.0 630.9L466.0 628.9L471.8 621.9L483.4 620.0L490.5 612.3L491.6 603.9L522.3 609.4L520.2 598.0L534.6 593.5Z" },
];
/**
* Die Elbe als Mittellinie, gezeichnet mit einem Strich statt als Fläche.
*
* Als Uferflächen zerfällt der Fluss in Hamburg in dutzende Einzelpolygone
* (Norderelbe, Süderelbe, Hafenbecken). Behält man nur die größten, klaffen
* dazwischen Lücken und der Fluss wirkt abgeschnitten. Die Mittellinie ist
* durchgehend und passt zur reduzierten Darstellung: die Breite kommt aus
* stroke-width, nicht aus der Geometrie.
*
* Quelle: OpenStreetMap via Overpass (waterway=river; Elbe, Norderelbe,
* Süderelbe), zu durchgehenden Zügen verkettet. Norder- und Süderelbe sind
* die beiden Hafenarme um Wilhelmsburg; Neben- und Binnenelben bleiben
* draußen, sie machen die Darstellung wieder kleinteilig. Gleiche Projektion wie STATES.
*/
export const RIVERS = "M444.01 270.52L445.02 271.60L446.15 273.68L447.61 274.70L450.31 275.63L453.00 275.24L454.11 275.44L457.61 278.48L459.72 279.31L457.60 277.67L457.08 274.68L456.02 273.29L455.89 271.36L456.94 269.30L456.71 267.90L455.60 266.68L452.49 264.83L448.92 264.09L446.89 263.06L444.38 263.53L435.61 263.18L425.85 260.50L412.81 258.61L409.27 256.56L406.00 253.42L401.81 250.42L399.08 247.48L397.99 245.12L395.46 236.29L394.30 234.38L392.46 232.33L388.60 229.71L385.53 226.85L382.00 217.47M520.56 293.41L517.24 293.56L513.40 295.22L512.48 294.92L510.94 293.57L505.56 292.98L495.86 287.66L491.23 283.81L490.09 283.60L486.60 283.87L484.42 282.45L483.35 282.42L484.20 282.07L485.49 282.11L491.34 283.86M456.05 270.17L456.33 270.22M487.89 282.75L486.56 282.41M483.35 282.42L481.83 283.81L478.55 285.01L477.71 286.08L477.15 288.21L476.28 288.99L474.47 289.11L471.94 288.29L469.27 288.86L467.26 287.42L465.68 284.42L464.79 283.95L462.37 283.79L461.94 283.47L460.49 280.17L459.72 279.31";
/** Außen- und Binnenalster als Fläche — ein See ist eine Form, keine Linie. */
export const WATER = "M451.06 257.71L451.39 258.62L452.09 259.06L452.05 259.71L451.26 260.50L450.16 260.84L449.93 260.53L450.67 258.25L450.24 256.99L450.45 256.76L450.70 256.74L451.06 257.71ZM449.45 261.23L449.63 260.86L450.16 260.84L450.37 261.15L449.76 261.58Z";
/** Beschriftungen für den Hamburger Ausschnitt. */
export const REGION_LABELS = [
{ name: "Schleswig-Holstein", x: 419.8, y: 216.0 },
{ name: "Hamburg", x: 471.1, y: 238.6 },
{ name: "Niedersachsen", x: 435.1, y: 297.7 },
];
/**
* Höher aufgelöste Umrisse für den Hamburg-Ausschnitt.
*
* STATES stammt aus der niedrigen Auflösung und ist für die Gesamtansicht
* Deutschlands richtig — bei achtfachem Zoom wurde daraus aber ein Vieleck
* (Hamburg hatte dort nur 21 Stützpunkte). Diese Fassung kommt aus der hohen
* Auflösung, ist auf den Rahmen des Ausschnitts geklemmt und erst danach
* vereinfacht, damit Küstenlinien außerhalb des Bildes nichts kosten.
*/
export const DETAIL_STATES: StatePath[] = [
{ id: "DE-HH", name: "Hamburg", d: "M458.19 232.81L458.18 232.17L458.87 232.17L459.54 230.88L460.94 230.87L461.65 231.51L463.76 232.14L464.44 231.49L464.43 230.85L468.56 228.91L468.53 227.62L469.92 227.61L469.94 228.26L470.63 228.25L471.34 228.89L472.04 228.89L472.08 230.82L470.74 232.75L470.04 232.75L470.03 232.11L469.35 232.75L467.97 233.40L467.98 234.04L468.68 234.04L468.03 235.97L467.36 237.26L466.68 237.90L465.98 237.91L466.70 238.54L468.09 238.54L468.82 239.82L470.21 239.81L470.24 241.09L470.94 241.09L472.36 242.37L473.08 243.65L471.72 244.94L473.13 245.57L473.82 245.57L475.23 246.20L474.53 246.21L474.55 246.85L475.24 246.84L475.26 247.49L472.51 248.78L471.83 249.43L471.85 250.07L472.55 250.07L472.59 251.99L471.92 252.64L472.63 253.27L473.35 254.55L469.17 254.58L469.16 253.93L468.49 255.22L467.79 255.23L467.84 257.15L467.14 257.15L467.15 257.80L468.57 258.43L468.60 259.71L467.23 261.01L467.98 262.93L468.66 262.28L469.36 262.28L469.39 263.56L468.71 264.21L468.72 264.85L469.44 265.48L470.85 266.12L471.57 266.75L472.97 266.74L474.33 265.45L475.05 266.09L475.08 267.38L475.79 268.01L475.81 268.65L475.11 268.66L475.12 269.30L475.84 269.94L476.54 269.93L477.22 269.29L477.29 271.85L478.70 272.48L479.42 273.12L480.81 273.11L480.86 275.04L482.29 276.31L482.98 276.31L484.40 277.58L483.74 278.23L484.45 278.86L485.81 278.86L485.77 277.57L487.12 277.57L486.50 279.49L486.51 280.13L485.18 280.14L485.20 280.78L483.10 282.10L481.69 282.77L480.98 282.77L480.28 283.43L479.57 283.44L479.57 284.09L478.15 286.70L477.44 287.35L475.34 287.38L473.94 286.74L469.72 286.79L467.59 284.87L467.59 284.22L466.17 282.94L466.16 282.29L463.34 282.32L461.92 281.04L461.91 279.75L461.20 279.11L460.49 277.82L459.78 277.18L458.36 276.54L456.23 275.27L455.54 276.57L455.55 277.22L456.26 277.86L455.56 278.52L453.44 278.54L453.44 277.89L452.04 279.20L452.74 279.19L454.16 280.47L452.76 281.14L452.05 281.14L450.64 281.81L449.94 281.81L449.95 283.11L448.54 283.78L447.83 283.78L447.83 282.49L445.71 281.86L444.30 281.23L444.31 282.52L442.90 282.54L442.21 283.20L440.82 283.87L440.11 283.87L440.11 283.22L441.49 281.91L440.79 281.27L442.18 279.95L441.46 278.01L439.34 276.09L435.19 280.04L435.21 281.34L434.49 280.05L432.37 277.48L429.57 275.57L428.88 275.58L428.85 274.28L428.16 274.29L428.09 271.03L428.78 270.37L428.76 269.72L427.38 269.74L426.70 270.40L425.99 269.76L426.67 269.10L425.27 268.47L424.57 267.83L424.52 265.22L425.91 265.20L425.90 264.55L424.48 263.26L424.46 261.32L425.16 261.31L425.14 259.38L424.44 259.38L420.23 258.77L420.90 257.48L420.89 256.85L421.57 255.56L421.56 254.92L420.86 254.30L422.23 253.00L422.20 251.08L423.59 251.06L423.57 249.78L422.86 249.15L423.55 248.50L423.53 247.23L424.22 246.58L424.91 246.57L424.94 248.48L427.06 249.73L427.75 249.73L428.47 250.36L427.07 250.37L427.08 251.01L427.80 252.29L429.22 252.92L430.65 254.20L431.35 254.19L432.74 253.54L432.03 253.54L432.71 252.25L434.11 252.24L434.80 251.59L434.79 250.95L436.16 249.66L436.15 249.02L437.52 247.72L438.22 247.72L438.21 247.08L438.90 246.43L438.89 245.79L439.57 245.14L439.56 244.50L440.26 244.49L440.22 242.56L441.61 241.91L444.42 242.54L445.12 242.53L446.54 243.16L449.33 243.14L449.31 241.86L450.01 241.85L449.99 241.21L449.26 239.93L450.61 237.36L455.50 237.32L456.21 237.96L458.31 237.95L458.25 235.38L458.92 234.09L459.60 233.45L458.21 233.46L458.89 232.81L458.19 232.81Z" },
{ id: "DE-MV", name: "Mecklenburg-Vorpommern", d: "M535.00 195.00L535.00 321.00L535.00 294.03L535.00 321.00L535.00 296.66L535.00 303.97L535.00 301.81L534.43 299.11L533.76 299.08L533.08 298.41L533.75 297.79L533.75 297.15L531.72 297.07L531.72 296.42L531.04 295.11L527.64 291.77L526.30 291.73L524.95 292.33L524.28 292.31L522.25 291.62L516.88 291.51L515.55 292.76L515.55 292.12L516.21 290.21L516.87 290.23L518.21 289.61L518.17 283.85L518.83 282.59L518.82 281.31L519.48 279.40L518.80 278.75L519.47 278.76L520.13 276.85L521.47 276.87L521.47 276.23L524.16 276.28L524.83 276.93L526.18 276.97L527.50 273.15L529.53 273.85L529.52 273.20L530.19 272.58L530.87 273.24L531.54 272.62L532.22 272.64L532.89 272.02L532.90 272.66L533.57 272.04L533.56 271.40L534.24 271.42L535.00 270.82L535.00 227.07L534.37 226.40L533.70 226.38L533.71 227.03L533.04 227.01L533.01 223.79L533.66 223.16L534.32 221.88L534.31 221.24L533.64 221.23L534.29 219.31L534.27 218.02L533.60 217.36L534.26 216.73L533.59 216.07L533.56 213.49L532.89 212.19L532.23 212.19L531.57 211.53L532.21 209.61L532.20 208.32L532.86 207.69L532.85 207.05L534.15 205.13L534.15 204.49L534.80 204.49L535.00 205.15L535.00 195.00Z" },
{ id: "DE-NI", name: "Niedersachsen", d: "M371.00 202.57L371.00 213.73L371.00 203.62L371.00 205.34L372.73 206.51L375.52 208.99L376.93 210.86L378.33 212.10L380.43 214.59L381.14 215.85L381.16 216.49L381.88 218.38L385.46 225.95L386.87 227.82L389.65 230.30L393.81 233.37L396.60 235.84L397.35 239.01L398.75 240.89L398.82 244.09L399.56 246.63L400.98 249.15L402.35 249.75L405.13 252.23L407.87 253.42L414.77 257.69L420.23 258.77L424.44 259.38L425.14 259.38L425.16 261.31L424.46 261.32L424.48 263.26L425.90 264.55L425.91 265.20L424.52 265.22L424.57 267.83L425.27 268.47L426.67 269.10L425.99 269.76L426.70 270.40L427.38 269.74L428.76 269.72L428.78 270.37L428.09 271.03L428.16 274.29L428.85 274.28L428.88 275.58L429.57 275.57L432.37 277.48L434.49 280.05L435.21 281.34L435.19 280.04L439.34 276.09L441.46 278.01L442.18 279.95L440.79 281.27L441.49 281.91L440.11 283.22L440.11 283.87L440.82 283.87L442.21 283.20L442.90 282.54L444.31 282.52L444.30 281.23L445.71 281.86L447.83 282.49L447.83 283.78L448.54 283.78L449.95 283.11L449.94 281.81L450.64 281.81L452.05 281.14L452.76 281.14L454.16 280.47L452.74 279.19L452.04 279.20L453.44 277.89L453.44 278.54L455.56 278.52L456.26 277.86L455.55 277.22L455.54 276.57L456.23 275.27L458.36 276.54L459.78 277.18L460.49 277.82L461.20 279.11L461.91 279.75L461.92 281.04L463.34 282.32L466.16 282.29L466.17 282.94L467.59 284.22L467.59 284.87L469.72 286.79L473.94 286.74L475.34 287.38L477.44 287.35L478.15 286.70L479.57 284.09L479.57 283.44L480.28 283.43L480.98 282.77L481.69 282.77L483.10 282.10L485.20 280.78L486.52 280.78L487.84 282.05L493.11 282.02L495.10 284.57L497.08 285.84L501.70 288.38L502.36 289.01L503.68 289.65L505.67 290.91L506.33 290.91L507.65 291.54L511.60 291.51L513.58 293.42L514.24 293.41L514.89 292.76L515.55 292.76L516.88 291.51L522.25 291.62L524.28 292.31L524.95 292.33L526.30 291.73L527.64 291.77L531.04 295.11L531.72 296.42L531.72 297.07L533.75 297.15L533.75 297.79L533.08 298.41L533.76 299.08L534.43 299.11L535.00 301.81L535.00 303.97L535.00 296.66L535.00 321.00L371.00 321.00L372.75 321.00L371.00 321.00L371.00 202.57Z" },
{ id: "DE-SH", name: "Schleswig-Holstein", d: "M371.00 195.00L535.00 195.00L532.17 195.00L535.00 195.00L535.00 205.15L534.80 204.49L534.15 204.49L534.15 205.13L532.85 207.05L532.86 207.69L532.20 208.32L532.21 209.61L531.57 211.53L532.23 212.19L532.89 212.19L533.56 213.49L533.59 216.07L534.26 216.73L533.60 217.36L534.27 218.02L534.29 219.31L533.64 221.23L534.31 221.24L534.32 221.88L533.66 223.16L533.01 223.79L533.04 227.01L533.71 227.03L533.70 226.38L534.37 226.40L535.00 227.07L535.00 270.82L534.24 271.42L533.56 271.40L533.57 272.04L532.90 272.66L532.89 272.02L532.22 272.64L531.54 272.62L530.87 273.24L530.19 272.58L529.52 273.20L529.53 273.85L527.50 273.15L526.18 276.97L524.83 276.93L524.16 276.28L521.47 276.23L521.47 276.87L520.13 276.85L519.47 278.76L518.80 278.75L519.48 279.40L518.82 281.31L518.83 282.59L518.17 283.85L518.21 289.61L516.87 290.23L516.21 290.21L515.55 292.12L515.55 292.76L514.89 292.76L514.24 293.41L513.58 293.42L511.60 291.51L507.65 291.54L506.33 290.91L505.67 290.91L503.68 289.65L502.36 289.01L501.70 288.38L497.08 285.84L495.10 284.57L493.11 282.02L487.84 282.05L486.52 280.78L485.20 280.78L485.18 280.14L486.51 280.13L486.50 279.49L487.12 277.57L485.77 277.57L485.81 278.86L484.45 278.86L483.74 278.23L484.40 277.58L482.98 276.31L482.29 276.31L480.86 275.04L480.81 273.11L479.42 273.12L478.70 272.48L477.29 271.85L477.22 269.29L476.54 269.93L475.84 269.94L475.12 269.30L475.11 268.66L475.81 268.65L475.79 268.01L475.08 267.38L475.05 266.09L474.33 265.45L472.97 266.74L471.57 266.75L470.85 266.12L469.44 265.48L468.72 264.85L468.71 264.21L469.39 263.56L469.36 262.28L468.66 262.28L467.98 262.93L467.23 261.01L468.60 259.71L468.57 258.43L467.15 257.80L467.14 257.15L467.84 257.15L467.79 255.23L468.49 255.22L469.16 253.93L469.17 254.58L473.35 254.55L472.63 253.27L471.92 252.64L472.59 251.99L472.55 250.07L471.85 250.07L471.83 249.43L472.51 248.78L475.26 247.49L475.24 246.84L474.55 246.85L474.53 246.21L475.23 246.20L473.82 245.57L473.13 245.57L471.72 244.94L473.08 243.65L472.36 242.37L470.94 241.09L470.24 241.09L470.21 239.81L468.82 239.82L468.09 238.54L466.70 238.54L465.98 237.91L466.68 237.90L467.36 237.26L468.03 235.97L468.68 234.04L467.98 234.04L467.97 233.40L469.35 232.75L470.03 232.11L470.04 232.75L470.74 232.75L472.08 230.82L472.04 228.89L471.34 228.89L470.63 228.25L469.94 228.26L469.92 227.61L468.53 227.62L468.56 228.91L464.43 230.85L464.44 231.49L463.76 232.14L461.65 231.51L460.94 230.87L459.54 230.88L458.87 232.17L458.18 232.17L458.19 232.81L458.89 232.81L458.21 233.46L459.60 233.45L458.92 234.09L458.25 235.38L458.31 237.95L456.21 237.96L455.50 237.32L450.61 237.36L449.26 239.93L449.99 241.21L450.01 241.85L449.31 241.86L449.33 243.14L446.54 243.16L445.12 242.53L444.42 242.54L441.61 241.91L440.22 242.56L440.26 244.49L439.56 244.50L439.57 245.14L438.89 245.79L438.90 246.43L438.21 247.08L438.22 247.72L437.52 247.72L436.15 249.02L436.16 249.66L434.79 250.95L434.80 251.59L434.11 252.24L432.71 252.25L432.03 253.54L432.74 253.54L431.35 254.19L430.65 254.20L429.22 252.92L427.80 252.29L427.08 251.01L427.07 250.37L428.47 250.36L427.75 249.73L427.06 249.73L424.94 248.48L424.91 246.57L424.22 246.58L423.53 247.23L423.55 248.50L422.86 249.15L423.57 249.78L423.59 251.06L422.20 251.08L422.23 253.00L420.86 254.30L421.56 254.92L421.57 255.56L420.89 256.85L420.90 257.48L420.23 258.77L414.77 257.69L407.87 253.42L405.13 252.23L402.35 249.75L400.98 249.15L399.56 246.63L398.82 244.09L398.75 240.89L397.35 239.01L396.60 235.84L393.81 233.37L389.65 230.30L386.87 227.82L385.46 225.95L381.88 218.38L381.16 216.49L381.14 215.85L380.43 214.59L378.33 212.10L376.93 210.86L375.52 208.99L372.73 206.51L371.00 205.34L371.00 195.00Z" },
];
+131 -6
View File
@@ -1,3 +1,5 @@
import { varietyName } from "./varieties";
const BACKEND_URL = import.meta.env.PUBLIC_MEDUSA_BACKEND_URL;
const PUBLISHABLE_KEY = import.meta.env.PUBLIC_MEDUSA_PUBLISHABLE_KEY;
@@ -20,11 +22,67 @@ export async function medusaFetch(path: string, init?: RequestInit) {
return body;
}
export interface ShopShippingOption {
id: string;
name: string;
description: string | null;
/** Grundpreis in Euro, ohne die Schwellenregel. */
amount: number;
}
export interface ShopSettings {
/** Schwelle für kostenfreien Versand in Euro, `null` wenn es keine gibt. */
freeShippingThreshold: number | null;
/** Die Versandarten, die der Shop anbietet, nach Preis sortiert. */
shippingOptions: ShopShippingOption[];
}
// Der Wert steht auf jeder Shop-Seite und ändert sich fast nie. Ohne diesen
// kurzen Puffer liefe je Seitenaufruf eine eigene Anfrage an Medusa.
let settingsCache: { wert: ShopSettings; bis: number } | null = null;
const SETTINGS_TTL_MS = 60_000;
/**
* Die Shop-Einstellungen aus dem Backend.
*
* Fällt still auf "keine Schwelle" zurück, wenn das Backend nicht antwortet:
* lieber gar kein Versprechen als eines, das gerade nicht belegt ist.
*/
export async function getShopSettings(): Promise<ShopSettings> {
if (settingsCache && settingsCache.bis > Date.now()) return settingsCache.wert;
try {
const data = await medusaFetch("/store/shop-settings");
const schwelle = Number(data?.free_shipping_threshold);
const wert: ShopSettings = {
freeShippingThreshold: Number.isFinite(schwelle) && schwelle > 0 ? schwelle : null,
shippingOptions: Array.isArray(data?.shipping_options)
? data.shipping_options.map((option: any) => ({
id: option.id,
name: option.name,
description: option.description ?? null,
amount: option.amount,
}))
: [],
};
settingsCache = { wert, bis: Date.now() + SETTINGS_TTL_MS };
return wert;
} catch {
return { freeShippingThreshold: null, shippingOptions: [] };
}
}
export interface MedusaVariant {
id: string;
title: string;
calculated_price?: { calculated_amount: number; currency_code: string };
metadata?: { net_weight_grams?: number } | null;
metadata?: {
net_weight_grams?: number;
/** Nur am Abo-Produkt: "monthly" | "quarterly" | "biannual". */
subscription_interval?: string;
/** Nur am Abo-Produkt: Glasgröße, z. B. "250 Gramm". */
subscription_size?: string;
} | null;
thumbnail?: string | null;
}
export interface MedusaProduct {
@@ -35,18 +93,48 @@ export interface MedusaProduct {
thumbnail: string | null;
images?: { id: string; url: string }[];
variants: MedusaVariant[];
metadata?: { delivery_time?: string; category?: string } | null;
/** `subscription: true` markiert das Abo-Produkt. */
metadata?: {
delivery_time?: string;
subscription?: boolean;
/** Hilfsartikel: gehört nicht ins Sortiment. */
hidden?: boolean;
/** Nur am Abo: "once" oder "per_delivery" — wie beim Geschenk der Versand berechnet wird. */
gift_shipping?: "once" | "per_delivery";
/** Bienenpatenschaft: braucht Namen für Urkunde und Etikett. */
sponsorship?: boolean;
} | null;
categories?: { id: string; name: string; rank: number }[];
}
// Pulls in the custom metadata (delivery time, category, net fill weight) on
// top of Medusa's default product/variant fields.
const PRODUCT_FIELDS = "*variants.calculated_price,+metadata,+variants.metadata";
// Pulls in the custom metadata (delivery time, net fill weight) and the
// real Medusa product categories on top of the default product/variant
// fields.
const PRODUCT_FIELDS =
"*variants.calculated_price,+metadata,+variants.metadata,+variants.thumbnail,+categories.name,+categories.rank";
export async function listProducts(regionId?: string): Promise<MedusaProduct[]> {
const params = new URLSearchParams({ fields: PRODUCT_FIELDS });
if (regionId) params.set("region_id", regionId);
const data = await medusaFetch(`/store/products?${params}`);
return data.products;
// Hilfsartikel wie der Versandanteil eines Geschenk-Abos gehören nicht ins
// Sortiment — sie werden nur automatisch mitverkauft.
return (data.products as MedusaProduct[]).filter((product) => !product.metadata?.hidden);
}
/**
* Der Artikel, über den der Versandanteil weiterer Geschenk-Pakete
* berechnet wird. `null`, wenn er nicht eingerichtet ist — dann wird nichts
* berechnet und der Shop verspricht es auch nicht.
*/
export async function getGiftShippingSurcharge(
regionId?: string
): Promise<{ variantId: string; amount: number } | null> {
const produkt = await getProductByHandle("versandanteil-geschenk-abo", regionId);
const variante = produkt?.variants?.[0];
const betrag = variante?.calculated_price?.calculated_amount;
if (!variante || betrag == null) return null;
return { variantId: variante.id, amount: betrag };
}
export async function getProductByHandle(handle: string, regionId?: string): Promise<MedusaProduct | null> {
@@ -65,3 +153,40 @@ export async function getDefaultRegion(): Promise<MedusaRegion> {
const data = await medusaFetch("/store/regions");
return data.regions[0];
}
/** Glasgrößen, die im Abo wählbar sind. Spiegelt HONEY_SIZES im Backend. */
export const SUBSCRIPTION_SIZES = ["250 Gramm", "500 Gramm"] as const;
export interface HoneyVariety {
variantId: string;
/** Der volle Katalogtitel. */
productTitle: string;
/** Der kurze Sortenname aus dem Briefing — das, was angezeigt wird. */
name: string;
size: string;
}
/**
* Honigsorten je Glasgröße, für die Sortenauswahl im Abo.
*
* Leitet sich aus dem normalen Katalog ab statt aus einer gepflegten Liste:
* kommt eine Sorte dazu, steht sie automatisch im Abo zur Wahl.
*/
export async function listHoneyVarieties(regionId?: string): Promise<HoneyVariety[]> {
const products = await listProducts(regionId);
const varieties: HoneyVariety[] = [];
for (const product of products) {
const isHoney = (product.categories ?? []).some((category) => category.name === "Honig");
if (!isHoney) continue;
for (const variant of product.variants) {
if (!SUBSCRIPTION_SIZES.includes(variant.title as any)) continue;
varieties.push({
variantId: variant.id,
productTitle: product.title,
name: varietyName(product.title),
size: variant.title,
});
}
}
return varieties.sort((a, b) => a.name.localeCompare(b.name, "de"));
}
+67 -18
View File
@@ -1,35 +1,84 @@
export const partners = [
{ name: "ABB", file: "abb-3x2-1.png" },
export interface PartnerLocation {
/** Breitengrad des Bienenstandorts. */
lat: number;
/** Längengrad des Bienenstandorts. */
lng: number;
/** Wird an der Nadel und im Tooltip angezeigt, z. B. "Hamburg-Harburg". */
label: string;
}
export interface Partner {
name: string;
file: string;
/**
* Optional. Partner mit Standort erscheinen als Bienenstock auf der Karte
* und bekommen eine Verbindungslinie zu ihrem Logo. Partner ohne Standort
* erscheinen weiterhin in der Logo-Wand — es geht also nichts verloren,
* wenn die Koordinate fehlt.
*/
location?: PartnerLocation;
}
/*
* ⚠️ ACHTUNG: Die Koordinaten unten sind PLATZHALTER.
*
* Sie verteilen sich über Hamburger Stadtteile, damit die Karte sichtbar
* funktioniert — sie sagen NICHT aus, wo die Völker tatsächlich stehen.
* Vor der Live-Schaltung durch die echten Standorte ersetzen.
*
* Koordinaten findet man z. B. über Google Maps (Rechtsklick auf den Punkt →
* die beiden Zahlen sind lat und lng) oder über nominatim.openstreetmap.org.
*
* Neuen Partner ergänzen: Eintrag mit `name`, `file` und optional `location`
* hinzufügen — Karte, Nadeln, Verbindungslinien und Logo-Wand aktualisieren
* sich von allein.
*/
export const partners: Partner[] = [
{ name: "ABB", file: "abb-3x2-1.png", location: { lat: 53.541, lng: 10.0, label: "Hamburg-HafenCity" } },
{ name: "AdvoNeo", file: "advoneo-3x2-1.png" },
{ name: "ak.", file: "ak-3x2-1-smaller.png" },
{ name: "bp", file: "bp-3x2-1.png" },
{ name: "bp", file: "bp-3x2-1.png", location: { lat: 53.545, lng: 10.025, label: "Hamburg-Hammerbrook" } },
{ name: "Coloplast", file: "coloplast_logo.png" },
{ name: "dentsu", file: "dentsu-3x2-1.png" },
{ name: "dentsu", file: "dentsu-3x2-1.png", location: { lat: 53.551, lng: 9.965, label: "Hamburg-St. Pauli" } },
{ name: "East Cosmos", file: "east-cosmos-3x2-1.png" },
{ name: "Edeka Harburg", file: "edeka_harburg.png" },
{ name: "Edeka Harburg", file: "edeka_harburg.png", location: { lat: 53.46, lng: 9.983, label: "Hamburg-Harburg" } },
{ name: "Eggers", file: "eggers-3x2-1.png" },
{ name: "Empire Riverside Hotels", file: "empire-riverside-hotels-3x2-1.png" },
{ name: "Engel & Völkers", file: "engel-voelkers-3x2-1.png" },
{ name: "EY", file: "ey-3x2-1.png" },
{ name: "Empire Riverside Hotels", file: "empire-riverside-hotels-3x2-1.png", location: { lat: 53.549, lng: 9.96, label: "Hamburg-St. Pauli" } },
{ name: "Engel & Völkers", file: "engel-voelkers-3x2-1.png", location: { lat: 53.568, lng: 9.988, label: "Hamburg-Rotherbaum" } },
{ name: "EY", file: "ey-3x2-1.png", location: { lat: 53.551, lng: 9.982, label: "Hamburg-Neustadt" } },
{ name: "Fairplay", file: "fairplay-3x2-1.png" },
{ name: "Hamburger Feuerkasse", file: "hamburger_feuerkasse.png" },
{ name: "Hanseatic Bank", file: "hanseatic-bank-3x2-1.png" },
{ name: "International School of Hamburg", file: "international-school-of-hamburg-3x2-1.png" },
{ name: "Jung von Matt", file: "jungvmatt-3x2-1.png" },
{ name: "Hamburger Feuerkasse", file: "hamburger_feuerkasse.png", location: { lat: 53.567, lng: 10.017, label: "Hamburg-Uhlenhorst" } },
{ name: "Hanseatic Bank", file: "hanseatic-bank-3x2-1.png", location: { lat: 53.588, lng: 10.04, label: "Hamburg-Barmbek" } },
{ name: "International School of Hamburg", file: "international-school-of-hamburg-3x2-1.png", location: { lat: 53.549, lng: 9.89, label: "Hamburg-Othmarschen" } },
{ name: "Jung von Matt", file: "jungvmatt-3x2-1.png", location: { lat: 53.55, lng: 9.935, label: "Hamburg-Altona" } },
{ name: "Kinderzimmer", file: "kinderzimmer.png" },
{ name: "Kontora", file: "kontora-3x2-1.png" },
{ name: "Lorentz", file: "lorentz-3x2-1.png" },
{ name: "Martha Haus", file: "martha_haus.png" },
{ name: "NKG", file: "nkg-3x2-1.png" },
{ name: "Nordmann", file: "nordmann-3x2-1.png" },
{ name: "Nordmann", file: "nordmann-3x2-1.png", location: { lat: 53.575, lng: 9.952, label: "Hamburg-Eimsbüttel" } },
{ name: "Porsche Zentren", file: "porsche_zentren.png" },
{ name: "Private Banking", file: "private-banking-3x2-1.png" },
{ name: "Röder Stiftung", file: "roeder_stiftung.png" },
{ name: "Sund", file: "sund-3x2-1.png" },
{ name: "Stilwerks", file: "stilwerks-3x2-1-smaller.png" },
{ name: "Still", file: "still-3x2-1.png" },
{ name: "Stilwerks", file: "stilwerks-3x2-1-smaller.png", location: { lat: 53.559, lng: 9.81, label: "Hamburg-Blankenese" } },
{ name: "Still", file: "still-3x2-1.png", location: { lat: 53.489, lng: 10.212, label: "Hamburg-Bergedorf" } },
{ name: "Seniorenzentren Geschwister Jensen", file: "senioren-zentren-geschwister-jensen-3x2-1.png" },
{ name: "Tews", file: "tews-3x2-1.png" },
{ name: "The Cloud One", file: "the_cloud_one.png" },
{ name: "ZF", file: "zf-3x2-1.png" },
{ name: "Tews", file: "tews-3x2-1.png", location: { lat: 53.618, lng: 9.95, label: "Hamburg-Niendorf" } },
{ name: "The Cloud One", file: "the_cloud_one.png", location: { lat: 53.603, lng: 10.156, label: "Hamburg-Rahlstedt" } },
{ name: "ZF", file: "zf-3x2-1.png", location: { lat: 53.582, lng: 10.087, label: "Hamburg-Wandsbek" } },
// Im Sommer 2026 auf place4bees.com dazugekommen. Namen stammen aus dem
// title-Attribut der Logos dort, Standorte sind noch keine hinterlegt.
{ name: "Ahrens Haus- und Grundstücksverwaltung", file: "ahrens-hausverwaltung.png" },
{ name: "BRUHN-Unternehmensgruppe", file: "bruhn-unternehmensgruppe.png" },
{ name: "E-Center Schleswig", file: "e-center-schleswig.png" },
{ name: "intersoft consulting", file: "intersoft-consulting.png" },
{ name: "JUFA Hotels", file: "jufa-hotels.png" },
{ name: "P+R", file: "p-r.png" },
{ name: "Radkultur Hamburg", file: "radkultur-hamburg.png" },
];
/** Partner mit hinterlegtem Standort — nur die erscheinen auf der Karte. */
export const locatedPartners = partners.filter(
(p): p is Partner & { location: PartnerLocation } => p.location != null
);
+113 -33
View File
@@ -1,61 +1,141 @@
export type Section = "private" | "business";
/**
* Der Aufbau der Seite: ein Hauptauftritt, darüber Ebenen.
*
* place4bees.com ist eine Seite mit einer Navigation. Shop und Automaten
* sind keine zweite Website, sondern legen sich als Ebene darüber: sie
* öffnen eine zweite Leiste, während die Hauptnavigation stehen bleibt.
* Von dort führt jeder Klick nahtlos zurück in den Hauptauftritt.
*/
export type Layer = "site" | "shop" | "automaten";
export const COMPANY_NAME = "place4bees";
/**
* Subline der Wortmarke laut PLACE4BEES_Designguidelines.pdf: auf den
* Produkten steht unter „PLACE 4 BEES" nicht mehr „modern beekeeping",
* sondern „Hamburger Stadtimkerei".
*
* Im Header steht sie nicht mehr — dort ist wie auf place4bees.com nur die
* Biene. Im Fuß bleibt sie.
*/
export const BRAND_SUBLINE = "Hamburger Stadtimkerei";
/**
* Der Claim vom Konzeptboard des Briefings (Seite 3), der dort unter jedem
* Produktnamen steht.
*
* Achtung, das Briefing widerspricht sich: der Deckel trägt laut Seite 5
* „Regional. Natürlich. 100% Honig." Wir führen die Board-Fassung, weil der
* Auftraggeber zum Board schreibt „gern möglichst genau so übernehmen".
* Muss noch entschieden werden.
*/
export const CLAIM = "Regional. Natürlich. Handgemacht.";
/** Fixed canonical domain: all pages consolidate their SEO signal here, even
* though the site also resolves on hhonig.de (see Layout.astro). */
export const PRIMARY_DOMAIN = "https://place4bees.com";
interface SectionConfig {
/**
* Die Hauptnavigation — Wortlaut und Reihenfolge wie auf place4bees.com,
* am 9.9.2026 dort ausgelesen. Sie steht auf jeder Seite, auch im Shop.
*/
export const mainNav = [
{ label: "Unternehmensbienen", href: "/business" },
{ label: "Ihr Projekt", href: "/business/ihr-projekt" },
{ label: "Über uns", href: "/business/ueber-uns" },
{ label: "Philosophie", href: "/business/philosophie" },
{ label: "Presse", href: "/business/presse" },
{ label: "Kontakt", href: "/business/kontakt" },
];
/** Die Reiter, die eine eigene Ebene öffnen. Rechts neben der Hauptnavigation. */
export const layerTabs: { layer: Layer; label: string; href: string }[] = [
{ layer: "shop", label: "Shop", href: "/shop" },
{ layer: "automaten", label: "Automaten", href: "/automaten" },
];
interface LayerConfig {
label: string;
tagline: string;
/** Stable, host-independent path for this section's homepage. Always link
* here internally (never to bare "/") so switching sections behaves the
* same regardless of which domain a visitor is on. */
/** Startseite der Ebene. Immer hierhin verlinken, nie auf "/". */
homeHref: string;
/** Inhalt der zweiten Leiste. Beim Hauptauftritt leer — der hat nur eine. */
nav: { label: string; href: string }[];
}
export const sections: Record<Section, SectionConfig> = {
private: {
label: "Privatkunden",
export const layers: Record<Layer, LayerConfig> = {
site: {
label: "place4bees",
tagline: "Eigene Bienen vor Ort. Professionell betreut. Nachhaltig erlebbar.",
homeHref: "/business",
nav: [],
},
shop: {
label: "Shop",
tagline: "Regionaler Honig aus Hamburg",
homeHref: "/privatkunden",
homeHref: "/shop",
nav: [
{ label: "Shop", href: "/shop" },
{ label: "Alle Sorten", href: "/shop" },
{ label: "Honig-Abo", href: "/shop/honig-abo" },
{ label: "Über uns", href: "/ueber-uns" },
{ label: "Kontakt", href: "/kontakt" },
],
},
business: {
label: "Business",
tagline: "Eigene Bienen vor Ort. Professionell betreut. Nachhaltig erlebbar.",
homeHref: "/business",
nav: [
{ label: "Ihr Projekt", href: "/business/ihr-projekt" },
{ label: "Über uns", href: "/business/ueber-uns" },
{ label: "Philosophie", href: "/business/philosophie" },
{ label: "Presse", href: "/business/presse" },
{ label: "Angebot", href: "/business/angebot" },
{ label: "Anfrage", href: "/business/anfrage" },
{ label: "Kontakt", href: "/business/kontakt" },
],
automaten: {
label: "Automaten",
tagline: "Honig rund um die Uhr, ohne Öffnungszeiten",
homeHref: "/automaten",
nav: [{ label: "Alle Standorte", href: "/automaten" }],
},
};
export function sectionForPath(pathname: string): Section {
return pathname.startsWith("/business") ? "business" : "private";
}
/**
* Welche Pfade zur Shop-Ebene gehören.
*
* Alles, was mit Kaufen zu tun hat, inklusive Konto und Bestellverfolgung —
* dort soll die zweite Leiste mit dem Warenkorb stehen bleiben. Rechtliche
* Seiten bleiben bewusst draußen: sie gehören zu keiner Ebene.
*/
const SHOP_PATHS = [
"/shop",
"/warenkorb",
"/kasse",
"/konto",
"/bestellung", "/versand",
"/privatkunden",
// Die Endkunden-Fassungen von Über uns und Kontakt. Sie stehen in der
// zweiten Leiste des Shops — stünden sie nicht auch hier, würde ein Klick
// dort die Ebene schließen, statt in ihr zu bleiben. Die Fassungen des
// Hauptauftritts liegen getrennt davon unter /business/.
"/ueber-uns",
"/kontakt",
];
/** hhonig.de defaults to the private/B2C section, place4bees.com to business. */
/** hhonig.de landet im Shop, place4bees.com im Hauptauftritt. */
export function isBusinessHost(hostname: string): boolean {
return hostname.includes("place4bees");
}
/** Resolves the active section for a request, accounting for the host-based
* default that only applies at the bare "/" root. */
export function resolveSection(pathname: string, hostname: string): Section {
if (pathname.startsWith("/business")) return "business";
if (pathname === "/" && isBusinessHost(hostname)) return "business";
return "private";
/**
* Die aktive Ebene. Der Host zählt nur an der blanken "/", jeder andere
* Pfad entscheidet für sich.
*/
export function resolveLayer(pathname: string, hostname = ""): Layer {
if (pathname === "/") return isBusinessHost(hostname) ? "site" : "shop";
if (pathname === "/automaten" || pathname.startsWith("/automaten/")) return "automaten";
if (SHOP_PATHS.some((path) => pathname === path || pathname.startsWith(`${path}/`))) {
return "shop";
}
return "site";
}
/**
* Ob zwischen zwei Ebenen die Bahn laufen soll.
*
* Nur beim Sprung zwischen Hauptauftritt und einer aufgelegten Ebene —
* innerhalb einer Ebene, und auch zwischen Shop und Automaten, wäre sie nur
* Wartezeit.
*/
export function crossesLayer(from: Layer, to: Layer): boolean {
return (from === "site") !== (to === "site");
}
+103
View File
@@ -0,0 +1,103 @@
import { medusaFetch } from "./medusa";
export interface Subscription {
id: string;
status: "active" | "paused" | "canceled";
interval: "monthly" | "quarterly" | "biannual";
size: string | null;
quantity: number;
selection: "fixed" | "random";
/** Altbestand: eine Sorte für alle Gläser. */
variety: string | null;
/** Eine Variante je Glas, in der Reihenfolge der Auswahl. */
variant_ids: string[];
/** Die Namen dazu, gleiche Reihenfolge. */
varieties: (string | null)[];
last_variety: string | null;
next_order_at: string | null;
last_order_at: string | null;
canceled_at: string | null;
paused_at: string | null;
payment_method: string | null;
}
export const INTERVAL_LABELS: Record<string, string> = {
monthly: "monatlich",
quarterly: "alle 3 Monate",
biannual: "alle 6 Monate",
};
/**
* "2× Lindenhonig, Rapshonig" — gleiche Sorten zusammengefasst.
*
* Steht hier und nicht bei Warenkorb oder Konto, weil beide dieselbe
* Schreibweise brauchen.
*/
export function summariseVarieties(labels: (string | null | undefined)[]): string {
const counts = new Map<string, number>();
for (const label of labels) {
if (label) counts.set(label, (counts.get(label) ?? 0) + 1);
}
return [...counts]
.map(([label, count]) => (count > 1 ? `${count}× ${label}` : label))
.join(", ");
}
export const STATUS_LABELS: Record<string, string> = {
active: "aktiv",
paused: "pausiert",
canceled: "gekündigt",
};
function authHeaders(token: string) {
return { Authorization: `Bearer ${token}` };
}
export async function listMySubscriptions(
token: string
): Promise<{ subscriptions: Subscription[]; sizes: string[] }> {
return medusaFetch("/store/customers/me/subscriptions", { headers: authHeaders(token) });
}
export async function updateSubscription(
token: string,
id: string,
payload: {
action?: "pause" | "resume" | "cancel";
quantity?: number;
size?: string;
selection?: "fixed" | "random";
variant_id?: string | null;
/** Eine Variante je Glas. Hat Vorrang vor variant_id. */
variant_ids?: string[] | null;
cancel_reason?: string;
}
): Promise<{ subscription: Subscription }> {
return medusaFetch(`/store/customers/me/subscriptions/${id}`, {
method: "POST",
headers: authHeaders(token),
body: JSON.stringify(payload),
});
}
/**
* Kündigung ohne Anmeldung — der gesetzlich vorgeschriebene Weg nach
* § 312k BGB. Braucht Abo-Nummer und E-Mail, kein Konto.
*/
export async function cancelWithoutLogin(payload: {
subscription_id: string;
email: string;
name?: string;
kind?: "ordentlich" | "ausserordentlich";
reason?: string;
}): Promise<{
subscription_id: string;
canceled_at: string;
already_canceled?: boolean;
message?: string;
}> {
return medusaFetch("/store/subscriptions/cancel", {
method: "POST",
body: JSON.stringify(payload),
});
}
+115
View File
@@ -0,0 +1,115 @@
/**
* Sortentexte und Farbcodes aus PLACE4BEES_Designguidelines.pdf.
*
* Das Briefing (Seite 2) teilt die Honigkollektion in zwei Linien und gibt
* jeder Sorte eine feste Subline. Beides ist Markentext, keine
* Produktbeschreibung — deshalb steht es hier und nicht in Medusa: die
* Zuordnung soll auch dann halten, wenn im Backend jemand den Produkttitel
* anfasst.
*
* Der Farbcode kommt aus Punkt 2 des Briefings („Ich mag die Idee, dass jede
* Sorte eine Farbe hat"). Die Farbwelt des Konzeptboards (Seite 3) hat acht
* Töne, wir haben zwölf Sorten — die drei Ergänzungen unten sind als solche
* markiert und liegen bewusst im selben gedeckten Register.
*
* Gematcht wird über ein Stichwort im Produkttitel, weil die Titel im Shop
* länger sind als die Sortennamen im Briefing ("Lindenhonig aus Hamburg –
* cremig" gegenüber "Lindenhonig").
*/
export type Collection = "urban" | "country";
export interface Variety {
/** Kleingeschriebenes Stichwort, das im Produkttitel vorkommen muss. */
match: string;
/** Sortenname laut Briefing. */
name: string;
/** Subline laut Briefing. Fehlt im Briefing bei Himbeerblütenhonig. */
subline?: string;
collection: Collection;
/**
* Farbe des Stegs laut Briefing-Idee, als CSS-Custom-Property-Verweis.
* Wird ausschließlich als Fläche benutzt (Steg, Regel), nie als Textfarbe
* — die hellen Töne der Farbwelt tragen auf Weiß keinen Text.
*/
color: string;
}
export const COLLECTION_LABELS: Record<Collection, string> = {
urban: "Urban Collection",
country: "Country Collection",
};
/**
* Herkunftshinweis laut Briefing, Seite 2: „12 Honigsorten, wovon 3 in der
* Stadt geerntet werden und 9 aus ländlicheren Gegenden stammen."
*/
export const COLLECTION_NOTES: Record<Collection, string> = {
urban: "In der Stadt geerntet.",
country: "Aus ländlicheren Gegenden.",
};
/** Reihenfolge der Kollektionen im Shop: erst Hamburg, dann Umland. */
export const COLLECTION_ORDER: Collection[] = ["urban", "country"];
/**
* Farbwelt des Konzeptboards, Seite 3.
*
* Die Hex-Werte stehen in src/styles/global.css, nicht hier — sonst müsste
* jede Korrektur an zwei Stellen passieren. Was hier steht, ist die
* Zuordnung: welche Sorte welchen Ton bekommt.
*/
const FARBWELT = {
ink: "var(--color-farbwelt-ink)",
forest: "var(--color-farbwelt-forest)",
sage: "var(--color-farbwelt-sage)",
mustard: "var(--color-farbwelt-mustard)",
apricot: "var(--color-farbwelt-apricot)",
rust: "var(--color-farbwelt-rust)",
olive: "var(--color-farbwelt-olive)",
stone: "var(--color-farbwelt-stone)",
cornflower: "var(--color-farbwelt-cornflower)",
// --- Ergänzungen, nicht im Board. Noch nicht freigegeben. ---
amber: "var(--color-farbwelt-amber)",
heather: "var(--color-farbwelt-heather)",
bronze: "var(--color-farbwelt-bronze)",
} as const;
export const varieties: Variety[] = [
// Urban Collection — in Hamburg geerntet.
{ match: "frühlingsblütenhonig", name: "Frühlingsblütenhonig", subline: "Aus Hamburgs Parks und Gärten", collection: "urban", color: FARBWELT.sage },
{ match: "sommerblütenhonig", name: "Sommerblütenhonig", subline: "Hamburger Sommer im Glas", collection: "urban", color: FARBWELT.amber },
{ match: "lindenhonig", name: "Lindenhonig", subline: "Mehr Hamburg geht nicht", collection: "urban", color: FARBWELT.olive },
// Country Collection — aus dem Umland und weiter weg.
{ match: "rapshonig", name: "Rapshonig", subline: "Norddeutschland in seiner schönsten Farbe", collection: "country", color: FARBWELT.mustard },
{ match: "buchweizenhonig", name: "Buchweizenhonig", subline: "Kräftig. Ehrlich. Unverwechselbar.", collection: "country", color: FARBWELT.ink },
{ match: "akazienhonig", name: "Akazienhonig", subline: "Mild. Klar. Elegant.", collection: "country", color: FARBWELT.stone },
{ match: "sonnenblumenhonig", name: "Sonnenblumenhonig", subline: "Gute Laune pur", collection: "country", color: FARBWELT.apricot },
{ match: "waldhonig", name: "Waldhonig", subline: "Die Kraft des Waldes", collection: "country", color: FARBWELT.forest },
// Im Briefing ohne Subline — hier bewusst leer statt erfunden.
{ match: "himbeerblütenhonig", name: "Himbeerblütenhonig", collection: "country", color: FARBWELT.rust },
{ match: "heidehonig", name: "Heidehonig", subline: "Der Charakter des Nordens", collection: "country", color: FARBWELT.heather },
{ match: "kornblumenhonig", name: "Kornblumenhonig", subline: "Zwischen Himmel und Kornfeld", collection: "country", color: FARBWELT.cornflower },
// Das Briefing nennt die Sorte "Traditionshonig", im Katalog heißt sie
// "Presshonig Hamburger Sommerblüte". Zugeordnet über das Pressverfahren —
// bitte gegenprüfen, das ist meine Schlussfolgerung, nicht das Briefing.
{ match: "presshonig", name: "Traditionshonig", subline: "Schonend gepresst. Besonders gehaltvoll.", collection: "urban", color: FARBWELT.bronze },
];
/** Findet die Sorte zu einem Produkttitel, oder undefined bei Nicht-Honig. */
export function findVariety(productTitle: string): Variety | undefined {
const haystack = productTitle.toLowerCase();
return varieties.find((v) => haystack.includes(v.match));
}
/**
* Der kurze Sortenname aus dem Briefing zu einem Produkttitel.
*
* Im Katalog heißen die Produkte ausführlich ("Buchweizenhonig aus der
* Oder-Spree-Region - cremig"). Überall, wo eine Sorte nur benannt werden
* soll — Auswahlfelder im Abo, Warenkorb, Kontoübersicht — steht der Name
* aus dem Briefing. Findet sich keine Sorte, bleibt der Titel stehen.
*/
export function varietyName(productTitle: string): string {
return findVariety(productTitle)?.name ?? productTitle;
}
+108
View File
@@ -0,0 +1,108 @@
---
import Layout from "../layouts/Layout.astro";
import DraftNotice from "../components/DraftNotice.astro";
---
<Layout title="AGB" description="Allgemeine Geschäftsbedingungen der place4bees GmbH.">
<section class="honeycomb-bg pt-32 pb-[var(--section-y)] sm:pt-36">
<div class="mx-auto max-w-[48rem] px-[var(--gutter)]">
<span class="section-label">Rechtliches</span>
<h1 class="mt-5">Allgemeine Geschäftsbedingungen</h1>
<DraftNotice />
<div class="legal-content mt-8">
<h2>1. Geltungsbereich</h2>
<p>
Diese Allgemeinen Geschäftsbedingungen gelten für alle Bestellungen von Verbraucherinnen und
Verbrauchern im Sinne des § 13 BGB über den Onlineshop der PLACE4BEES GmbH (Honig, Bienenprodukte,
Geschenkgutscheine, Kurse, Bienenpatenschaften, Süßigkeiten mit Honig). Für Geschäftskund:innen
(Business-Bereich, individuelle Firmenkooperationen) gelten abweichende, gesondert vereinbarte
Konditionen.
</p>
<h2>2. Vertragspartner</h2>
<p>Der Kaufvertrag kommt zustande mit der PLACE4BEES GmbH, Isestraße 109, 20149 Hamburg (siehe Impressum).</p>
<h2>3. Vertragsschluss</h2>
<p>
Die Darstellung der Produkte im Shop stellt kein bindendes Angebot unsererseits dar, sondern eine
unverbindliche Aufforderung, Waren zu bestellen. Mit dem Klick auf „Zahlungspflichtig bestellen"
geben Sie ein verbindliches Angebot zum Kauf der im Warenkorb enthaltenen Artikel ab. Der Vertrag
kommt zustande, sobald wir Ihre Bestellung durch eine Bestellbestätigung per E-Mail annehmen.
</p>
<h2 id="versand">4. Preise und Versandkosten</h2>
<p>
Alle angegebenen Preise sind Endpreise und enthalten die gesetzliche Umsatzsteuer. Zusätzlich anfallende
Versandkosten werden Ihnen vor Abschluss der Bestellung an der Kasse transparent ausgewiesen.
</p>
<h2>5. Zahlung</h2>
<p>Die Zahlung erfolgt wahlweise per PayPal oder Kreditkarte über PayPal.</p>
<h2>6. Lieferung</h2>
<p>
Die Lieferzeit ist auf der jeweiligen Produktseite angegeben. Wir liefern nur innerhalb Deutschlands,
sofern nicht anders vereinbart. Eine Selbstabholung nach vorheriger Absprache ist möglich.
</p>
<h2>7. Eigentumsvorbehalt</h2>
<p>Die gelieferte Ware bleibt bis zur vollständigen Bezahlung unser Eigentum.</p>
<h2>8. Widerrufsrecht</h2>
<p>
Verbraucher:innen steht ein gesetzliches Widerrufsrecht zu. Einzelheiten entnehmen Sie unserer{" "}
<a href="/widerrufsrecht">Widerrufsbelehrung</a>.
</p>
<h2>9. Gutscheine</h2>
<p>
<strong>Geschenkgutscheine</strong>, die im Shop erworben werden, können innerhalb ihrer Gültigkeitsdauer
gegen Waren aus unserem Sortiment eingelöst werden. Eine Barauszahlung ist ausgeschlossen. Für den
Kauf von Geschenkgutscheinen selbst besteht das gesetzliche Widerrufsrecht wie für jede andere Ware.
</p>
<p>
<strong>Aktionsgutscheine</strong> (z.B. Rabattcodes), die im Rahmen von Marketingaktionen kostenlos
ausgegeben werden, sind nur innerhalb des angegebenen Zeitraums und Personenkreises einlösbar und
nicht auszahlbar.
</p>
<h2>10. Kurse und Veranstaltungen</h2>
<p>
Für Plätze in Kursen (z.B. Bienen-Schnupperkurs) gilt der gebuchte Termin. Bei Verhinderung
informieren Sie uns bitte möglichst frühzeitig; eine Umbuchung auf einen anderen Termin ist nach
Verfügbarkeit möglich. Für die Durchführung von Veranstaltungen Dritter (z.B. an gebuchten
Veranstaltungsorten) übernehmen wir keine Haftung. Beginnt ein gebuchter Kurs mit Ihrer ausdrücklichen
Zustimmung innerhalb der Widerrufsfrist und wurde er vollständig erbracht, erlischt Ihr Widerrufsrecht
gemäß § 356 Abs. 4 BGB vorzeitig.
</p>
<h2>11. Bienenpatenschaften</h2>
<p>
Eine Bienenpatenschaft umfasst die auf der jeweiligen Produktseite beschriebene Laufzeit und
Leistungen (z.B. Urkunde, Honig-Anteil). Der Leistungsumfang richtet sich nach der Produktbeschreibung
zum Zeitpunkt der Bestellung.
</p>
<h2>12. Gewährleistung</h2>
<p>
Es gilt das gesetzliche Mängelhaftungsrecht. Informationen zu Herkunft, Zusammensetzung und
Mindesthaltbarkeit unserer Honigprodukte finden Sie auf dem Produketikett bzw. der Produktseite.
</p>
<h2>13. Haftung</h2>
<p>
Wir haften unbeschränkt bei Vorsatz und grober Fahrlässigkeit sowie nach Maßgabe des
Produkthaftungsgesetzes. Bei leichter Fahrlässigkeit haften wir nur bei Verletzung einer wesentlichen
Vertragspflicht (Kardinalpflicht), begrenzt auf den vertragstypisch vorhersehbaren Schaden.
</p>
<h2>14. Schlussbestimmungen</h2>
<p>
Es gilt das Recht der Bundesrepublik Deutschland unter Ausschluss des UN-Kaufrechts. Ist eine
Bestimmung dieser AGB unwirksam, bleibt die Wirksamkeit der übrigen Bestimmungen unberührt.
</p>
</div>
</div>
</section>
</Layout>
+622
View File
@@ -0,0 +1,622 @@
---
import Layout from "../layouts/Layout.astro";
import PageHero from "../components/PageHero.astro";
/**
* Standorte der Honigautomaten.
*
* Koordinaten per OpenStreetMap (Nominatim) aus den Adressen ermittelt.
* Delingsdorfer Weg 13a ist dort nicht erfasst — die Koordinate ist die von
* Hausnummer 13 nebenan.
*/
const automaten = [
{ strasse: "Delingsdorfer Weg 13a", ort: "22143 Hamburg", stadtteil: "Rahlstedt", lat: 53.61295, lng: 10.15761 },
{ strasse: "Brödermannsweg 41", ort: "22453 Hamburg", stadtteil: "Groß Borstel", lat: 53.60526, lng: 9.97511 },
{ strasse: "Langenhorner Chaussee 63", ort: "22335 Hamburg", stadtteil: "Fuhlsbüttel", lat: 53.63903, lng: 10.0134 },
{ name: "Hamburger Meile", strasse: "Hamburger Str. 27", ort: "22083 Hamburg", stadtteil: "Barmbek-Süd", lat: 53.57346, lng: 10.03168 },
{ name: "Rahlstedt Center", strasse: "Wariner Weg 1", ort: "22143 Hamburg", stadtteil: "Rahlstedt", lat: 53.60462, lng: 10.15801 },
{ name: "AEZ", strasse: "Heegbarg 31", ort: "22391 Hamburg", stadtteil: "Poppenbüttel", lat: 53.65334, lng: 10.09107 },
{ name: "Phönix-Center Harburg", strasse: "Hannoversche Str. 86", ort: "21079 Hamburg", stadtteil: "Harburg", lat: 53.45618, lng: 9.98754 },
{ name: "Bäderland Familienbad Ohlsdorf", strasse: "Im Grünen Grunde 1", ort: "22337 Hamburg", stadtteil: "Ohlsdorf", lat: 53.62132, lng: 10.03076 },
];
// Google Maps öffnet die Routenplanung mit dem Automaten als Ziel — auf dem
// Handy direkt in der App. Die Adresse statt der Koordinate, damit dort der
// Ortsname erscheint.
const standorte = automaten.map((automat, i) => ({
...automat,
nr: i + 1,
titel: automat.name ?? automat.stadtteil,
route: `https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(
[automat.name, automat.strasse, automat.ort].filter(Boolean).join(", ")
)}`,
}));
---
<Layout
title="Honigautomaten"
description="Honig von place4bees rund um die Uhr: die Standorte unserer Honigautomaten in Hamburg."
>
<PageHero
label="Rund um die Uhr"
title="Honig aus dem Automaten"
lede="Acht Automaten in Hamburg, jeden Tag geöffnet. Kein Ladenschluss, keine Schlange — Glas ziehen und mitnehmen."
/>
<section class="brand-section bg-brand-surface py-[var(--section-y)]">
<div class="mx-auto max-w-[84rem] px-[var(--gutter)]">
<div id="automaten-finder" class="finder" data-standorte={JSON.stringify(standorte)}>
<div class="finder-map">
<div id="automaten-karte" role="region" aria-label={`Karte mit ${standorte.length} Honigautomaten in Hamburg`}></div>
<button type="button" class="finder-alle" data-alle hidden>Alle zeigen</button>
</div>
<div class="finder-list">
<div class="finder-head">
<p class="finder-head-title">Standorte</p>
<p class="finder-head-sub">{standorte.length} Automaten in Hamburg</p>
</div>
<ol>
{standorte.map((automat) => (
<li class="finder-item" data-nr={automat.nr}>
<button type="button" class="finder-row" data-nr={automat.nr} aria-controls="automaten-karte">
<span class="automat-nr" aria-hidden="true">{automat.nr}</span>
<span class="finder-row-text">
<span class="finder-row-title">{automat.titel}</span>
<span class="finder-row-sub">{automat.strasse}, {automat.ort}</span>
</span>
</button>
<a
href={automat.route}
target="_blank"
rel="noopener"
class="finder-route"
aria-label={`Route zu ${automat.titel} planen`}
title="Route planen"
>
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M3.5 10.8 20 4l-6.8 16.5-2.1-7.6z" />
</svg>
</a>
</li>
))}
</ol>
</div>
</div>
</div>
</section>
</Layout>
<script>
import L from "leaflet";
import "leaflet/dist/leaflet.css";
interface Standort {
nr: number;
titel: string;
strasse: string;
ort: string;
stadtteil: string;
lat: number;
lng: number;
route: string;
}
document.addEventListener("astro:page-load", () => {
const root = document.getElementById("automaten-finder");
const el = document.getElementById("automaten-karte");
if (!root || !el || el.classList.contains("leaflet-container")) return;
const standorte: Standort[] = JSON.parse(root.dataset.standorte ?? "[]");
const list = root.querySelector<HTMLElement>(".finder-list")!;
const alle = root.querySelector<HTMLButtonElement>("[data-alle]")!;
const ruhig = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches;
// Kein Zoomen per Mausrad — sonst bleibt man beim Scrollen der Seite in
// der Karte hängen. Zoom-Knöpfe oben rechts wie in Apple Karten.
const map = L.map(el, { scrollWheelZoom: false, zoomControl: false });
map.attributionControl.setPrefix('<a href="https://leafletjs.com">Leaflet</a>');
L.control.zoom({ position: "topright", zoomInTitle: "Vergrößern", zoomOutTitle: "Verkleinern" }).addTo(map);
// ⚠️ Inoffizielle Google-Kartenbilder ohne API-Key. Verstößt gegen die
// Nutzungsbedingungen von Google und kann jederzeit gesperrt werden —
// bewusste Entscheidung, das Risiko ist bekannt (September 2026).
L.tileLayer("https://mt{s}.google.com/vt/lyrs=m&hl=de&x={x}&y={y}&z={z}", {
subdomains: "0123",
maxZoom: 20,
attribution: "Kartendaten &copy; Google",
}).addTo(map);
const bounds = L.latLngBounds(standorte.map((s) => [s.lat, s.lng] as [number, number]));
const uebersicht = () => map.fitBounds(bounds, { padding: [48, 48], animate: !ruhig() });
const markers = new Map<number, L.Marker>();
let aktiv: number | null = null;
function setAktiv(nr: number | null) {
aktiv = nr;
for (const [n, marker] of markers) {
marker.getElement()?.classList.toggle("is-active", n === nr);
marker.setZIndexOffset(n === nr ? 1000 : 0);
}
for (const item of list.querySelectorAll<HTMLElement>(".finder-item")) {
const an = Number(item.dataset.nr) === nr;
item.classList.toggle("is-active", an);
item.querySelector(".finder-row")?.setAttribute("aria-current", String(an));
// Nur innerhalb der Liste scrollen, nie die ganze Seite.
if (an && list.scrollHeight > list.clientHeight) {
const ziel = item.offsetTop - list.clientHeight / 2 + item.offsetHeight / 2;
list.scrollTo({ top: ziel, behavior: ruhig() ? "auto" : "smooth" });
}
}
}
for (const s of standorte) {
const popup = document.createElement("div");
popup.className = "automat-popup";
const titel = document.createElement("strong");
titel.textContent = s.titel;
const adresse = document.createElement("span");
adresse.textContent = `${s.strasse}, ${s.ort}`;
const stadtteil = document.createElement("span");
stadtteil.className = "automat-popup-muted";
stadtteil.textContent = `Hamburg-${s.stadtteil}`;
const route = document.createElement("a");
route.href = s.route;
route.target = "_blank";
route.rel = "noopener";
route.className = "automat-popup-route";
route.textContent = "Route planen";
popup.append(titel, adresse, stadtteil, route);
const marker = L.marker([s.lat, s.lng], {
title: s.titel,
riseOnHover: true,
icon: L.divIcon({
className: "automat-marker",
html: `<span class="automat-nr automat-pin">${s.nr}</span>`,
iconSize: [30, 30],
iconAnchor: [15, 15],
popupAnchor: [0, -18],
}),
})
.bindPopup(popup, { closeButton: false, autoPanPadding: [24, 24], offset: [0, -2] })
.addTo(map);
marker.on("popupopen", () => setAktiv(s.nr));
// Beim Wechsel schließt Leaflet erst das alte Popup — dann darf nur der
// eigene Eintrag abgewählt werden, nicht der neue.
marker.on("popupclose", () => {
if (aktiv === s.nr) setAktiv(null);
});
markers.set(s.nr, marker);
}
uebersicht();
// „Alle zeigen" erscheint erst, wenn der Ausschnitt nicht mehr alles zeigt.
map.on("moveend", () => {
alle.hidden = map.getBounds().contains(bounds);
});
alle.addEventListener("click", () => {
map.closePopup();
uebersicht();
});
for (const row of root.querySelectorAll<HTMLButtonElement>(".finder-row")) {
row.addEventListener("click", () => {
const nr = Number(row.dataset.nr);
const marker = markers.get(nr)!;
const ziel = marker.getLatLng();
const zoom = Math.max(map.getZoom(), 15);
// Unter lg steht die Karte über der Liste — erst hinscrollen, sonst
// sieht man nicht, dass sich etwas getan hat.
if (el.getBoundingClientRect().bottom < 0 || el.getBoundingClientRect().top > window.innerHeight) {
el.scrollIntoView({ block: "center", behavior: ruhig() ? "auto" : "smooth" });
}
if (map.getCenter().distanceTo(ziel) < 5 && map.getZoom() === zoom) {
marker.openPopup();
return;
}
map.once("moveend", () => marker.openPopup());
if (ruhig()) map.setView(ziel, zoom, { animate: false });
else map.flyTo(ziel, zoom, { duration: 0.7 });
});
}
});
</script>
<style>
/* --- Finder: Liste und Karte als eine Fläche, wie in Apple Karten --- */
.finder {
display: grid;
overflow: hidden;
border-radius: 1.75rem;
background: var(--color-brand-surface-strong);
box-shadow:
0 0 0 1px rgb(33 35 38 / 0.06),
var(--shadow-lg);
}
.finder-map {
position: relative;
isolation: isolate;
/* Auf dem Handy fast quadratisch — bei 4:3 kleben die Pins in der
* Übersicht aufeinander. */
aspect-ratio: 1 / 1.05;
background: #e9e5dc;
}
#automaten-karte {
position: absolute;
inset: 0;
scroll-margin-block: 10rem;
}
/* position: relative, damit offsetTop der Zeilen sich auf die Liste bezieht. */
.finder-list {
position: relative;
padding: 0.5rem 0.5rem 0.75rem;
}
@media (min-width: 64rem) {
.finder {
grid-template-columns: 23rem minmax(0, 1fr);
height: 40rem;
}
.finder-map {
order: 2;
aspect-ratio: auto;
}
.finder-list {
overflow-y: auto;
overscroll-behavior: contain;
border-right: 1px solid var(--color-brand-border-soft);
}
}
.finder-head {
padding: 1.25rem 1rem 0.75rem;
}
.finder-head-title {
font-size: 1.375rem;
font-weight: 700;
line-height: 1.15;
letter-spacing: -0.02em;
color: var(--color-brand-ink);
}
.finder-head-sub {
margin-top: 0.15rem;
font-size: 0.875rem;
color: var(--color-brand-text-muted);
}
/* --- Zeilen --- */
.finder-item {
position: relative;
display: flex;
align-items: center;
border-radius: 0.875rem;
transition: background-color 0.2s var(--ease-out);
}
/* Eingerückte Trennlinie wie in iOS-Listen — beginnt beim Text, nicht am Rand. */
.finder-item + .finder-item::before {
content: "";
position: absolute;
top: 0;
left: 3.75rem;
right: 0.75rem;
height: 1px;
background: var(--color-brand-border-soft);
transition: opacity 0.2s var(--ease-out);
}
.finder-item.is-active::before,
.finder-item.is-active + .finder-item::before {
opacity: 0;
}
.finder-item.is-active {
background: var(--color-brand-honey-tint);
}
.finder-row {
display: flex;
flex: 1;
min-width: 0;
align-items: center;
gap: 0.875rem;
padding: 0.8rem 0.25rem 0.8rem 0.75rem;
text-align: left;
cursor: pointer;
border-radius: inherit;
transition: transform 0.12s var(--ease-out);
}
/* Rückmeldung schon beim Drücken, nicht erst beim Loslassen. */
.finder-row:active {
transform: scale(0.98);
}
.finder-row:focus-visible,
.finder-route:focus-visible,
.finder-alle:focus-visible {
outline: 2px solid var(--color-brand-primary);
outline-offset: 2px;
}
.finder-row-text {
display: grid;
min-width: 0;
}
.finder-row-title {
font-size: 0.9375rem;
font-weight: 600;
letter-spacing: -0.01em;
color: var(--color-brand-ink);
}
.finder-row-sub {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 0.8125rem;
color: var(--color-brand-text-muted);
}
.finder-route {
display: grid;
flex-shrink: 0;
place-items: center;
width: 2.25rem;
height: 2.25rem;
margin-right: 0.5rem;
border-radius: 999px;
background: var(--color-brand-surface-sunk);
color: var(--color-brand-ink);
transition:
background-color 0.2s var(--ease-out),
transform 0.12s var(--ease-out);
}
.finder-route svg {
width: 1rem;
height: 1rem;
fill: currentColor;
}
.finder-item.is-active .finder-route {
background: var(--color-brand-ink);
color: #fff;
}
.finder-route:active {
transform: scale(0.92);
}
@media (hover: hover) and (pointer: fine) {
.finder-item:not(.is-active):hover {
background: var(--color-brand-surface-sunk);
}
.finder-item:not(.is-active):hover .finder-route {
background: var(--color-brand-surface-strong);
}
}
/* --- Schwebender Knopf über der Karte --- */
.finder-alle {
position: absolute;
left: 1rem;
bottom: 1rem;
z-index: 1000;
padding: 0.55rem 1.1rem;
border-radius: 999px;
background: rgb(255 255 255 / 0.78);
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);
box-shadow:
0 0 0 1px rgb(33 35 38 / 0.06),
var(--shadow-md);
font-size: 0.8125rem;
font-weight: 600;
color: var(--color-brand-ink);
cursor: pointer;
transition: transform 0.12s var(--ease-out);
}
.finder-alle:active {
transform: scale(0.96);
}
@media (prefers-reduced-motion: reduce) {
.finder-item,
.finder-item::before,
.finder-row,
.finder-route,
.finder-alle {
transition: none;
}
.finder-row:active,
.finder-route:active,
.finder-alle:active {
transform: none;
}
}
@media (prefers-reduced-transparency: reduce) {
.finder-alle {
background: #fff;
backdrop-filter: none;
-webkit-backdrop-filter: none;
}
}
</style>
<style is:global>
/* Global, weil Leaflet Marker, Popups und Bedienelemente zur Laufzeit
* erzeugt — die tragen kein Scope-Attribut. Alles unter #automaten-finder. */
.automat-nr {
display: inline-grid;
flex-shrink: 0;
place-items: center;
width: 1.75rem;
height: 1.75rem;
border-radius: 999px;
background: var(--color-brand-primary);
color: var(--color-brand-ink);
font-size: 0.8125rem;
font-weight: 600;
font-variant-numeric: tabular-nums;
transition:
background-color 0.2s var(--ease-out),
color 0.2s var(--ease-out),
scale 0.35s var(--ease-spring);
}
.finder-item.is-active .automat-nr {
background: var(--color-brand-ink);
color: var(--color-brand-primary);
}
#automaten-finder .automat-marker {
display: grid;
place-items: center;
}
#automaten-finder .automat-pin {
width: 1.875rem;
height: 1.875rem;
cursor: pointer;
box-shadow:
0 0 0 2.5px #fff,
0 2px 6px rgb(33 35 38 / 0.35);
}
#automaten-finder .automat-marker:hover .automat-pin {
scale: 1.1;
}
#automaten-finder .automat-marker.is-active .automat-pin {
scale: 1.25;
background: var(--color-brand-ink);
color: var(--color-brand-primary);
}
/* Popup als schwebendes Glas statt Leaflets weißem Kasten. */
#automaten-finder .leaflet-popup-content-wrapper {
border-radius: 1.125rem;
background: rgb(255 255 255 / 0.82);
backdrop-filter: blur(24px) saturate(180%);
-webkit-backdrop-filter: blur(24px) saturate(180%);
box-shadow:
0 0 0 1px rgb(33 35 38 / 0.06),
var(--shadow-lg);
}
#automaten-finder .leaflet-popup-tip {
background: rgb(255 255 255 / 0.82);
box-shadow: none;
}
#automaten-finder .leaflet-popup-content {
margin: 0.9rem 1rem 1rem;
min-width: 12rem;
}
.automat-popup {
display: grid;
gap: 0.1rem;
font-family: var(--font-sans);
font-size: 0.8125rem;
line-height: 1.45;
color: var(--color-brand-text);
}
.automat-popup strong {
margin-bottom: 0.15rem;
font-size: 0.9375rem;
font-weight: 600;
letter-spacing: -0.01em;
color: var(--color-brand-ink);
}
.automat-popup-muted {
color: var(--color-brand-text-muted);
}
#automaten-finder a.automat-popup-route {
justify-self: start;
margin-top: 0.7rem;
padding: 0.45rem 0.95rem;
border-radius: 999px;
background: var(--color-brand-ink);
color: #fff;
font-weight: 600;
text-decoration: none;
transition: transform 0.12s var(--ease-out);
}
#automaten-finder a.automat-popup-route:active {
transform: scale(0.96);
}
/* Zoom-Knöpfe als Glas-Pille. */
#automaten-finder .leaflet-bar {
overflow: hidden;
border: 0;
border-radius: 0.75rem;
box-shadow:
0 0 0 1px rgb(33 35 38 / 0.06),
var(--shadow-md);
}
#automaten-finder .leaflet-bar a {
width: 2.25rem;
height: 2.25rem;
line-height: 2.25rem;
background: rgb(255 255 255 / 0.78);
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);
color: var(--color-brand-ink);
font-weight: 400;
border-bottom-color: rgb(33 35 38 / 0.08);
}
#automaten-finder .leaflet-control-zoom {
margin: 1rem 1rem 0 0;
}
#automaten-finder .leaflet-control-attribution {
border-top-left-radius: 0.5rem;
background: rgb(255 255 255 / 0.7);
font-size: 0.625rem;
}
@media (prefers-reduced-motion: reduce) {
.automat-nr,
#automaten-finder a.automat-popup-route {
transition: none;
}
}
@media (prefers-reduced-transparency: reduce) {
#automaten-finder .leaflet-popup-content-wrapper,
#automaten-finder .leaflet-popup-tip,
#automaten-finder .leaflet-bar a {
background: #fff;
backdrop-filter: none;
-webkit-backdrop-filter: none;
}
}
</style>
+114
View File
@@ -0,0 +1,114 @@
---
export const prerender = false;
import Layout from "../../layouts/Layout.astro";
// Mollie schickt den Kunden hierher zurück. Die Bestellung entsteht aber
// nicht hier, sondern im Webhook — deshalb wartet diese Seite darauf, statt
// selbst etwas abzuschließen. Bricht der Webhook aus, sieht der Kunde einen
// ehrlichen Hinweis statt einer falschen Erfolgsmeldung.
const cartId = Astro.url.searchParams.get("cart") ?? "";
---
<Layout
title="Abo abschließen"
description="Ihr Honig-Abo bei place4bees wird eingerichtet."
>
<section class="honeycomb-bg pt-24 pb-[var(--section-y)] sm:pt-28">
<div class="mx-auto max-w-[46rem] px-[var(--gutter)]">
<div class="surface p-9 shadow-xs sm:p-14" data-cart={cartId}>
<img src="/images/bee-single.png" alt="" class="h-10 w-auto opacity-70" />
<div id="abo-pending">
<h1 class="mt-7 max-w-[18ch]">Wir richten Ihr Abo ein</h1>
<p class="mt-5 text-[1.0625rem] leading-relaxed text-brand-text">
Ihre Zahlung wird gerade bestätigt. Das dauert meist wenige Sekunden,
bei Lastschrift gelegentlich etwas länger.
</p>
<div class="mt-8 flex flex-col gap-2" aria-hidden="true">
<div class="skeleton h-4 w-2/3"></div>
<div class="skeleton h-4 w-1/2"></div>
</div>
</div>
<div id="abo-done" hidden>
<h1 class="mt-7 max-w-[18ch]">Ihr Abo läuft</h1>
<p class="mt-5 text-[1.0625rem] leading-relaxed text-brand-text">
Die erste Lieferung ist bezahlt und geht in den Versand. Jede weitere
wird automatisch im gewählten Rhythmus abgebucht.
</p>
<div class="mt-9 flex flex-wrap gap-3">
<a href="/konto/abos" class="btn btn-primary">Abo verwalten</a>
<a href="/shop" class="btn btn-outline">Weiter einkaufen</a>
</div>
</div>
<div id="abo-slow" hidden>
<h1 class="mt-7 max-w-[20ch]">Zahlung wird noch geprüft</h1>
<p class="mt-5 text-[1.0625rem] leading-relaxed text-brand-text">
Das kann bei Lastschrift ein bis zwei Bankarbeitstage dauern. Sobald
die Zahlung bestätigt ist, richten wir das Abo ein und Sie bekommen
eine Bestätigung per E-Mail. Sie müssen nichts weiter tun.
</p>
<a href="/konto/abos" class="link-underline mt-8">
Zu meinen Abos
<svg viewBox="0 0 20 20" class="h-4 w-4 text-brand-primary" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true">
<path d="M4 10h12M11 5l5 5-5 5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</a>
</div>
<p class="mt-10 border-t border-brand-border pt-6 text-sm leading-relaxed text-brand-text-muted">
Ihr Abo ist jederzeit ohne Frist kündbar — im
<a href="/konto/abos" class="text-brand-honey-ink underline underline-offset-2">Kundenkonto</a>
oder über
<a href="/kuendigung" class="text-brand-honey-ink underline underline-offset-2">Verträge hier kündigen</a>.
</p>
</div>
</div>
</section>
</Layout>
<script data-astro-rerun>
import { getCart } from "../../lib/cart";
import { clearCartIdClient } from "../../lib/cartCookie";
document.addEventListener("astro:page-load", async () => {
const wrap = document.querySelector<HTMLElement>("[data-cart]");
const cartId = wrap?.dataset.cart;
if (!wrap || !cartId) return;
const pending = document.getElementById("abo-pending")!;
const done = document.getElementById("abo-done")!;
const slow = document.getElementById("abo-slow")!;
// Der Webhook schließt den Warenkorb ab. Wir fragen ihn ab, bis er
// abgeschlossen ist — höchstens 30 Sekunden, danach die ehrliche
// Auskunft statt endlosem Warten.
const deadline = Date.now() + 30_000;
while (Date.now() < deadline) {
try {
const cart: any = await getCart(cartId);
if (cart?.completed_at) {
clearCartIdClient();
window.dispatchEvent(new CustomEvent("cart:updated"));
pending.hidden = true;
done.hidden = false;
return;
}
} catch {
// Ein abgeschlossener Warenkorb ist über die Store-API nicht mehr
// abrufbar — genau das ist hier das Erfolgssignal.
clearCartIdClient();
window.dispatchEvent(new CustomEvent("cart:updated"));
pending.hidden = true;
done.hidden = false;
return;
}
await new Promise((resolve) => setTimeout(resolve, 2000));
}
pending.hidden = true;
slow.hidden = false;
});
</script>
+78 -13
View File
@@ -6,22 +6,87 @@ import Layout from "../../layouts/Layout.astro";
title="Bestellung erfolgreich"
description="Vielen Dank für Ihre Bestellung bei place4bees."
>
<section class="mx-auto max-w-2xl px-4 sm:px-6 lg:px-8 py-16 text-center">
<h1 class="text-3xl font-semibold text-brand-ink">Vielen Dank für Ihre Bestellung!</h1>
<p id="order-summary" class="mt-4 text-brand-text">Bestellbestätigung wird geladen…</p>
<a href="/shop" class="mt-8 inline-block text-brand-primary underline">Weiter einkaufen</a>
<section class="honeycomb-bg pt-24 pb-[var(--section-y)] sm:pt-28">
<div class="mx-auto max-w-[46rem] px-[var(--gutter)]">
<div class="surface p-9 shadow-xs sm:p-14">
<img src="/images/bee-single.png" alt="" class="h-10 w-auto opacity-70" />
<h1 class="mt-7 max-w-[16ch]">Vielen Dank für Ihre Bestellung</h1>
<p id="order-summary" class="mt-5 text-[1.0625rem] leading-relaxed text-brand-text">
Bestellbestätigung wird geladen
</p>
<button id="invoice-button" class="btn btn-primary mt-9 hidden disabled:pointer-events-none disabled:opacity-55">
Rechnung herunterladen
</button>
<p id="invoice-status" role="alert" class="mt-3 hidden text-sm text-[#b4453a]"></p>
<p class="mt-10 border-t border-brand-border pt-6 text-sm leading-relaxed text-brand-text-muted">
Informationen zu Ihrem 14-tägigen Widerrufsrecht finden Sie in unserer{" "}
<a href="/widerrufsrecht" class="text-brand-honey-ink underline underline-offset-2">Widerrufsbelehrung</a>{" "}
sowie auf Seite 2 Ihrer Rechnung.
</p>
<a href="/shop" class="link-underline mt-8">
Weiter einkaufen
<svg viewBox="0 0 20 20" class="h-4 w-4 text-brand-primary" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true">
<path d="M4 10h12M11 5l5 5-5 5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</a>
</div>
</div>
</section>
</Layout>
<script>
const raw = sessionStorage.getItem("last_order");
const el = document.getElementById("order-summary");
// astro:page-load feuert beim ersten Laden und nach jedem
// View-Transition-Wechsel.
document.addEventListener("astro:page-load", () => {
const raw = sessionStorage.getItem("last_order");
const el = document.getElementById("order-summary");
const invoiceButton = document.getElementById("invoice-button") as HTMLButtonElement | null;
const invoiceStatus = document.getElementById("invoice-status");
if (raw && el) {
const order = JSON.parse(raw);
el.textContent = `Bestellnummer ${order.display_id ?? order.id}. Eine Bestätigung geht an ${order.email}.`;
sessionStorage.removeItem("last_order");
} else if (el) {
el.textContent = "Keine aktuelle Bestellung gefunden.";
}
if (raw && el) {
const order = JSON.parse(raw);
el.textContent = `Bestellnummer ${order.display_id ?? order.id}. Eine Bestätigung geht an ${order.email}.`;
if (invoiceButton && order.id) {
invoiceButton.classList.remove("hidden");
invoiceButton.addEventListener("click", async () => {
invoiceButton.disabled = true;
try {
// The invoice route needs the publishable API key header, which a
// plain link click can't send — fetch it ourselves and open the
// resulting PDF as a blob instead.
const backendUrl = import.meta.env.PUBLIC_MEDUSA_BACKEND_URL;
const key = import.meta.env.PUBLIC_MEDUSA_PUBLISHABLE_KEY;
const res = await fetch(`${backendUrl}/store/orders/${order.id}/invoice`, {
headers: { "x-publishable-api-key": key },
});
if (!res.ok) throw new Error("Rechnung konnte nicht geladen werden.");
const blob = await res.blob();
const url = URL.createObjectURL(blob);
const link = document.createElement("a");
link.href = url;
link.download = `rechnung-${order.display_id ?? order.id}.pdf`;
document.body.appendChild(link);
link.click();
link.remove();
URL.revokeObjectURL(url);
} catch {
if (invoiceStatus) {
invoiceStatus.textContent = "Die Rechnung konnte nicht geladen werden. Bitte später erneut versuchen.";
invoiceStatus.classList.remove("hidden");
}
} finally {
invoiceButton.disabled = false;
}
});
}
sessionStorage.removeItem("last_order");
} else if (el) {
el.textContent = "Keine aktuelle Bestellung gefunden.";
}
});
</script>
-25
View File
@@ -1,25 +0,0 @@
---
import Layout from "../../layouts/Layout.astro";
---
<Layout
title="Anfrage"
description="Interesse an eigenen Bienenvölkern für Ihr Unternehmen? Jetzt unverbindlich anfragen."
>
<section class="mx-auto max-w-3xl px-4 sm:px-6 lg:px-8 py-16">
<h1 class="text-3xl font-semibold text-brand-ink">Interesse?</h1>
<p class="mt-4 text-brand-text">
Schreiben Sie uns, wir melden uns mit einem individuellen Angebot für Ihren Standort.
</p>
<form class="mt-8 grid gap-4 max-w-md">
<input type="text" name="company" placeholder="Unternehmen" required class="rounded-lg border border-brand-border px-4 py-2" />
<input type="text" name="name" placeholder="Ansprechpartner" required class="rounded-lg border border-brand-border px-4 py-2" />
<input type="email" name="email" placeholder="E-Mail" required class="rounded-lg border border-brand-border px-4 py-2" />
<input type="text" name="location" placeholder="Standort (Stadt)" class="rounded-lg border border-brand-border px-4 py-2" />
<textarea name="message" placeholder="Ihre Nachricht" rows="4" class="rounded-lg border border-brand-border px-4 py-2"></textarea>
<button type="submit" class="rounded-full bg-brand-primary text-brand-ink px-6 py-3 text-sm font-semibold hover:bg-brand-primary-hover transition-colors">
Anfrage senden
</button>
</form>
</section>
</Layout>
-18
View File
@@ -1,18 +0,0 @@
---
import Layout from "../../layouts/Layout.astro";
---
<Layout
title="Unser Angebot"
description="Bienenvölker, professionelle Betreuung und Team-Erlebnisse für Unternehmen und Hotels."
>
<section class="mx-auto max-w-3xl px-4 sm:px-6 lg:px-8 py-16 prose prose-stone">
<h1 class="text-3xl font-semibold text-brand-ink">Unser Angebot</h1>
<p class="mt-4 text-brand-text">
Wir bringen eigene Bienenvölker an Ihren Firmen- oder Hotelstandort und übernehmen die
komplette fachliche Betreuung. Ihr Unternehmen profitiert von einem nachhaltigen Image,
eigenem Honig als Geschenk oder Give-away, und einem greifbaren Beitrag zum Artenschutz –
inklusive Erlebnisangeboten für Ihr Team vor Ort.
</p>
</section>
</Layout>

Some files were not shown because too many files have changed in this diff Show More