Startseite und Heroes - Hero-Slideshow (11 Motive inkl. Febrü) mit Infokarte, Laufzeit-Linie, größeren Klickflächen, Goldrahmen und mobiler Karte unter dem Bild; Zeile über der Überschrift, neue Vertrauenspunkte - Hero-Stil auf Marken, Über uns und Kontakt übertragen, Breadcrumb entfernt - Gründer-Leiste, Vision-Box auf Ocker, Showroom-Display in Box mit „Größer ansehen“/Vollbild - Akzentfarbe #a8741f, größere Serif-Überschriften in der Interior-Welt - Marken: Bildpause mit Zitat; Vereine aktualisiert und verlinkt Inhalte - Lektorat aller angezeigten Texte, /about-Korrekturen, Rechtstexte (DDG, TDDDG, Hosting Hetzner) - Ablauf Maßanfertigung überall einheitlich, Magazin-Beitrag neu, alte Beiträge offline, deutsches Datum/Lesezeit, FAQ Projektausstattung, Otterpohl - Referenzen-Seite per CMS-Schalter ausblendbar CMS und Technik - Tote Sektionen, Felder, Seiten und Komponenten entfernt und archiviert (dev/2026-08-28/archiv-*) - Entwurf /entwurf, Farb-Schalter und /welcome entfernt; Test-Routen nur noch lokal - Seitenbaum-Beschreibungen geprüft, fehlende CMS-Felder ergänzt, Markenliste aus „Kernmarken“ - Admin-Bildvorschauen repariert, verwendete Bilder in die Mediathek übernommen - Seeder für das Deployment siehe dev/2026-08-28/entwicklungsplan.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
186 lines
5.2 KiB
PHP
186 lines
5.2 KiB
PHP
<?php
|
|
|
|
namespace App\Helpers;
|
|
|
|
class ThemeHelper
|
|
{
|
|
/**
|
|
* Logo-Pfad für das aktuelle Theme.
|
|
*
|
|
* Für b2in hängt die Datei zusätzlich an der Farbwelt: die Interior-Welt trägt das Logo
|
|
* mit dem Zusatz „Interior“ und ockerfarbenem Bogen, die Immobilien-Welt das Logo ohne
|
|
* Zusatz mit blauem Bogen. Ohne Angabe wird die Welt aus der aktuellen Route gelesen.
|
|
*/
|
|
public static function getLogoPath(string $type = 'positive', ?string $world = null): string
|
|
{
|
|
$theme = config('app.theme', 'b2in');
|
|
|
|
if ($theme === 'b2in' && ($world ?? b2in_world()) === 'immobilien') {
|
|
return self::getLogoPathForBrand('b2in-immobilien', $type);
|
|
}
|
|
|
|
return self::getLogoPathForBrand($theme, $type);
|
|
}
|
|
|
|
/**
|
|
* Get the logo path for a specific brand
|
|
*/
|
|
public static function getLogoPathForBrand(?string $brand = null, string $type = 'positive'): string
|
|
{
|
|
$brand = $brand ?? config('app.theme', 'b2in');
|
|
|
|
$logoMap = [
|
|
'b2in' => [
|
|
'positive' => 'img/logos/b2in-interior-logo-positive.svg',
|
|
'negative' => 'img/logos/b2in-interior-logo-negative.svg',
|
|
],
|
|
'b2in-immobilien' => [
|
|
'positive' => 'img/logos/b2in-logo-positive.svg',
|
|
'negative' => 'img/logos/b2in-logo-negative.svg',
|
|
],
|
|
'b2a' => [
|
|
'positive' => 'img/logos/b2a-logo-positiv.svg',
|
|
'negative' => 'img/logos/b2a-logo-negativ.svg',
|
|
],
|
|
'stileigentum' => [
|
|
'positive' => 'img/logos/stileigentum-logo-positiv.svg',
|
|
'negative' => 'img/logos/stileigentum-logo-negativ.svg',
|
|
],
|
|
'style2own' => [
|
|
'positive' => 'img/logos/style2own-logo-positiv.svg',
|
|
'negative' => 'img/logos/style2own-logo-negativ.svg',
|
|
],
|
|
];
|
|
|
|
return $logoMap[$brand][$type] ?? $logoMap['b2in'][$type];
|
|
}
|
|
|
|
/**
|
|
* Get the favicon path based on the current theme
|
|
*/
|
|
public static function getFaviconPath(): string
|
|
{
|
|
$theme = config('app.theme', 'b2in');
|
|
|
|
return "img/favicons/{$theme}-favicon.ico";
|
|
}
|
|
|
|
/**
|
|
* Get the CSS theme file based on the current theme
|
|
*/
|
|
public static function getThemeCssPath(): string
|
|
{
|
|
$theme = config('app.theme', 'b2in');
|
|
|
|
return "resources/css/web/theme-{$theme}.css";
|
|
}
|
|
|
|
/**
|
|
* Get domain-specific configuration
|
|
*/
|
|
public static function getDomainConfig(): array
|
|
{
|
|
$theme = config('app.theme', 'b2in');
|
|
|
|
return config("domains.domains.{$theme}", []);
|
|
}
|
|
|
|
/**
|
|
* Get primary color for the current theme
|
|
*/
|
|
public static function getPrimaryColor(): string
|
|
{
|
|
$config = self::getDomainConfig();
|
|
|
|
return $config['color_scheme']['primary'] ?? '#2b3f51';
|
|
}
|
|
|
|
/**
|
|
* Get secondary color for the current theme
|
|
*/
|
|
public static function getSecondaryColor(): string
|
|
{
|
|
$config = self::getDomainConfig();
|
|
|
|
return $config['color_scheme']['secondary'] ?? '#20a0da';
|
|
}
|
|
|
|
/**
|
|
* Get primary font family for the current theme
|
|
*/
|
|
public static function getPrimaryFont(): string
|
|
{
|
|
$config = self::getDomainConfig();
|
|
|
|
return $config['font_family']['primary'] ?? 'Inter';
|
|
}
|
|
|
|
/**
|
|
* Get secondary font family for the current theme
|
|
*/
|
|
public static function getSecondaryFont(): string
|
|
{
|
|
$config = self::getDomainConfig();
|
|
|
|
return $config['font_family']['secondary'] ?? 'IBM Plex Sans';
|
|
}
|
|
|
|
/**
|
|
* Get domain name for the current theme
|
|
*/
|
|
public static function getDomainName(): string
|
|
{
|
|
$config = self::getDomainConfig();
|
|
|
|
return $config['domain_name'] ?? 'B2IN';
|
|
}
|
|
|
|
public static function getDomainUrl(): string
|
|
{
|
|
$config = self::getDomainConfig();
|
|
|
|
return $config['url'] ?? config('app.url');
|
|
}
|
|
|
|
/**
|
|
* Get brand colors for a specific brand
|
|
*/
|
|
public static function getBrandColors(?string $brand = null): array
|
|
{
|
|
$brand = $brand ?? config('app.theme', 'b2in');
|
|
$config = config("domains.domains.{$brand}", []);
|
|
|
|
return [
|
|
'primary' => $config['color_scheme']['primary'] ?? '#2b3f51',
|
|
'secondary' => $config['color_scheme']['secondary'] ?? '#20a0da',
|
|
'accent' => $config['color_scheme']['accent'] ?? null,
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Get brand name for a specific brand
|
|
*/
|
|
public static function getBrandName(?string $brand = null): string
|
|
{
|
|
$brand = $brand ?? config('app.theme', 'b2in');
|
|
|
|
$brandNames = [
|
|
'b2in' => 'B2IN',
|
|
'b2a' => 'B2A',
|
|
'stileigentum' => 'StilEigentum',
|
|
'style2own' => 'Style2Own',
|
|
];
|
|
|
|
return $brandNames[$brand] ?? strtoupper($brand);
|
|
}
|
|
|
|
/**
|
|
* Get all brand configuration for a specific brand
|
|
*/
|
|
public static function getBrandConfig(?string $brand = null): array
|
|
{
|
|
$brand = $brand ?? config('app.theme', 'b2in');
|
|
|
|
return config("domains.domains.{$brand}", []);
|
|
}
|
|
}
|