mit Versionsstempel. */ public static function script(string $path, string $base = '', bool $defer = false): string { return ''; } /** * Theme-Bootstrap: gespeicherte Auswahl, sonst Systemeinstellung. * Muss im
stehen, damit nichts hell aufblitzt. */ public static function themeScript(): string { return ''; } /** Gueltige Hex-Farbe oder Fallback. */ private static function color(?string $value, string $fallback): string { $value = trim((string)$value); return preg_match('/^#[0-9a-fA-F]{6}$/', $value) ? strtolower($value) : $fallback; } /** * CSS-Overrides fuer die Markenfarben. Gibt einen leeren String zurueck, * wenn nichts vom Standard abweicht. */ public static function brandingStyle($db = null): string { if (!$db) { return ''; } $accent = self::color($db->getSetting('brand_accent', ''), self::DEFAULT_ACCENT); $accentDark = self::color($db->getSetting('brand_accent_dark', ''), self::DEFAULT_ACCENT_DARK); $from = self::color($db->getSetting('brand_gradient_from', ''), self::DEFAULT_GRADIENT_FROM); $to = self::color($db->getSetting('brand_gradient_to', ''), self::DEFAULT_GRADIENT_TO); $radius = (int)$db->getSetting('brand_radius', (string)self::DEFAULT_RADIUS); $radius = max(0, min(28, $radius)); $isDefault = $accent === self::DEFAULT_ACCENT && $accentDark === self::DEFAULT_ACCENT_DARK && $from === self::DEFAULT_GRADIENT_FROM && $to === self::DEFAULT_GRADIENT_TO && $radius === self::DEFAULT_RADIUS; if ($isDefault) { return ''; } // Abgeleitete Töne über color-mix – so genügt eine einzige Grundfarbe. return ''; } /** Entwicklerhinweis – bewusst an einer Stelle gepflegt. */ public const CREDIT_NAME = 'Loheide.eu'; public const CREDIT_URL = 'https://loheide.eu'; /** * Dezenter Hinweis auf den Entwickler, wie er im Seitenfuß erscheint. */ public static function credit(): string { $label = function_exists('__') ? __('credit_by') : 'Entwickelt von'; return '' . htmlspecialchars($label) . ' ' . '' . self::CREDIT_NAME . '
'; } /** * Standard-Druckvorlage (wird nur verwendet, solange keine eigene * Vorlage gespeichert ist). {QR_CODE} fuellt der Browser. */ public static function defaultPrintTemplate(): string { $validUntil = function_exists('__') ? __('print_valid_until') : 'Gültig bis'; $devices = function_exists('__') ? __('print_devices') : 'Geräte'; return '