Files
windwiderstand/src/lib/constants.ts
T
Peter Meier da294010c8
Deploy / verify (push) Successful in 50s
Deploy / deploy (push) Failing after 1m3s
feat: update site URLs and enhance image handling
- Changed site URLs in docker-compose and deployment configurations to remove "www" prefix for consistency.
- Improved image handling by introducing warmPostCardImages function for pre-fetching images in posts and tags.
- Enhanced PostCard component with responsive image sizes for better performance.
- Updated layout to include robots meta tag and JSON-LD structured data for improved SEO.
- Added loading state for images in TopBanner component to enhance user experience.
2026-04-18 12:25:45 +02:00

51 lines
1.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Zentrale Konstanten für die Anwendung.
* URLs, CMS-Resolve-Arrays und Fallback-Werte.
*/
/** Platzhalter-Bild für og:image / twitter:image, wenn weder Page/Post-Bild noch Logo gesetzt ist. */
export const DEFAULT_SOCIAL_IMAGE_URL =
"https://images.ctfassets.net/xjxq6v7l1pfe/43yZHpF9OCnrBlEWHJSZMK/1ef20b265ea1e4e55317812ee5ae6b4c/simple-green-tree-illustrated-watercolor-with-gentle-shading-great-rural-scenery-farm-backdrops-naturethemed-designs-landsca.jpg";
/** og:image-Dimensionen (Facebook/Twitter empfehlen 1200×630, 1.91:1). */
export const SOCIAL_IMAGE_DIMENSIONS = {
width: 1200,
height: 630,
} as const;
/** Logo-Fallback für og:image: letterboxed (contain), damit Logo komplett sichtbar bleibt. */
export const SOCIAL_IMAGE_TRANSFORM = {
...SOCIAL_IMAGE_DIMENSIONS,
fit: "contain" as const,
format: "webp" as const,
};
/** Post-Bild für og:image: cover (Banner-Look), Focal wird separat übergeben. */
export const POST_SOCIAL_IMAGE_TRANSFORM = {
...SOCIAL_IMAGE_DIMENSIONS,
fit: "cover" as const,
format: "webp" as const,
};
/** CMS Content-Rows für resolve (Footer, Pages, Posts). */
export const ROW_RESOLVE: string[] = [
"row1Content",
"row2Content",
"row3Content",
];
/** Resolve für Page-Requests: "all" = alle Referenzen inkl. verschachtelt (z. B. image_gallery.images). */
export const PAGE_RESOLVE = ["all"];
/** Resolve für Post-Requests: "all" damit auch img in row1Content/Image-Blöcken aufgelöst wird (src), sonst nur Referenz. */
export const POST_RESOLVE = ["all"];
/** Fallback-Slug für die Startseite, wenn page_config keine homePage liefert. */
export const DEFAULT_HOME_PAGE_SLUG = "page-home";
/** Site-Name für og:site_name und JSON-LD (in Layout via PUBLIC_SITE_NAME überschreibbar). */
export const SITE_NAME = "Windwiderstand";
/** Slug des Translation-Bundles im CMS (content/de/translation_bundle/{slug}.json5). Alle UI-Texte aus diesem Bundle. */
export const TRANSLATION_BUNDLE_SLUG = "app";