feat: redesign CMS and unify German admin UI
This commit is contained in:
+6
-6
@@ -2,7 +2,7 @@ import { siteConfig } from "@/lib/site";
|
||||
import { toBerlinOffsetISOString } from "./dates";
|
||||
import type { BookingSetting, Contact, Event, Offer, Post, SeoSetting } from "@/payload-types";
|
||||
|
||||
// Server-only builders — every function here returns `null` instead of
|
||||
// Server-only builders - every function here returns `null` instead of
|
||||
// guessing when the real data needed for a valid/honest result isn't
|
||||
// present. Nothing here ever invents a review, price, address or phone
|
||||
// number (see section 27/35 of the SEO brief).
|
||||
@@ -34,7 +34,7 @@ function postalAddress(booking: BookingSetting) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Organization (always safe — just a name and a URL) upgraded to
|
||||
* Organization (always safe - just a name and a URL) upgraded to
|
||||
* ProfessionalService/LocalBusiness once a real, complete street address
|
||||
* has actually been entered in the CMS. Phone/opening hours/geo are added
|
||||
* only when present; nothing is fabricated to "complete" the schema.
|
||||
@@ -107,7 +107,7 @@ export function breadcrumbJsonLd(items: { name: string; url?: string }[]): JsonL
|
||||
return {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
// The last item's "item" URL is deliberately omitted when absent —
|
||||
// The last item's "item" URL is deliberately omitted when absent -
|
||||
// that's the current page, and per Google's guidelines a BreadcrumbList
|
||||
// entry doesn't need a URL for the page the visitor is already on.
|
||||
itemListElement: items.map((item, index) => ({
|
||||
@@ -137,7 +137,7 @@ export function serviceJsonLd(args: {
|
||||
};
|
||||
if (args.imageUrl) result.image = args.imageUrl;
|
||||
if (args.areaServed) result.areaServed = args.areaServed;
|
||||
// Deliberately no "offers"/price — the CMS "price" field is free text
|
||||
// Deliberately no "offers"/price - the CMS "price" field is free text
|
||||
// (e.g. "auf Anfrage") and can't be turned into a valid structured price
|
||||
// without risking incorrect data.
|
||||
return result;
|
||||
@@ -154,7 +154,7 @@ export function eventJsonLd(args: {
|
||||
}): JsonLdValue | null {
|
||||
const { event } = args;
|
||||
// Private single-session bookings must never surface as a public Event
|
||||
// (see section 18) — defense in depth alongside the page-level checks
|
||||
// (see section 18) - defense in depth alongside the page-level checks
|
||||
// that already keep them out of public listings entirely.
|
||||
if (event.isPrivateBooking) return null;
|
||||
if (!event.date) return null;
|
||||
@@ -186,7 +186,7 @@ export function eventJsonLd(args: {
|
||||
address: postalAddress(args.booking),
|
||||
};
|
||||
} else if (event.location) {
|
||||
// No structured address on file, but the event itself names a place —
|
||||
// No structured address on file, but the event itself names a place -
|
||||
// still valid schema.org (address is optional on Place).
|
||||
result.location = { "@type": "Place", name: event.location };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user