Umbenennung presseportale → pressekonto in Domains, Themes und Dokumentation. Design-Tokens, Portal-Shell, Customer-Dashboard, Auth- und Admin-PM-Views. Artisan-Befehl migrate:legacy-media mit Tests und Hub-Flux-Entwicklungsdocs. Co-authored-by: Cursor <cursoragent@cursor.com>
129 lines
3.4 KiB
PHP
129 lines
3.4 KiB
PHP
<?php
|
|
|
|
namespace App\Helpers;
|
|
|
|
class ThemeHelper
|
|
{
|
|
/**
|
|
* Get the logo path based on the current theme
|
|
*/
|
|
public static function getLogoPath(string $type = 'positive'): string
|
|
{
|
|
$theme = config('app.theme', 'portal');
|
|
|
|
$logoMap = [
|
|
'portal' => [
|
|
'positive' => 'img/logos/portal-logo-positive.svg',
|
|
'negative' => 'img/logos/portal-logo-negative.svg',
|
|
],
|
|
'pressekonto' => [
|
|
'positive' => 'img/logos/portal-logo-positive.svg',
|
|
'negative' => 'img/logos/portal-logo-negative.svg',
|
|
],
|
|
'presseecho' => [
|
|
'positive' => 'img/logos/presseecho-logo-positiv.svg',
|
|
'negative' => 'img/logos/presseecho-logo-negativ.svg',
|
|
],
|
|
'businessportal24' => [
|
|
'positive' => 'img/logos/businessportal24-logo-positiv.svg',
|
|
'negative' => 'img/logos/businessportal24-logo-negativ.svg',
|
|
],
|
|
];
|
|
|
|
return $logoMap[$theme][$type] ?? $logoMap['portal'][$type];
|
|
}
|
|
|
|
/**
|
|
* Get the favicon path based on the current theme
|
|
*/
|
|
public static function getFaviconPath(): string
|
|
{
|
|
$theme = config('app.theme', 'portal');
|
|
|
|
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', 'portal');
|
|
|
|
return "resources/css/web/theme-{$theme}.css";
|
|
}
|
|
|
|
/**
|
|
* Get domain-specific configuration
|
|
*/
|
|
public static function getDomainConfig(): array
|
|
{
|
|
$theme = config('app.theme', 'portal');
|
|
|
|
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'] ?? '#526266';
|
|
}
|
|
|
|
/**
|
|
* Get secondary color for the current theme
|
|
*/
|
|
public static function getSecondaryColor(): string
|
|
{
|
|
$config = self::getDomainConfig();
|
|
|
|
return $config['color_scheme']['secondary'] ?? '#82a0a7';
|
|
}
|
|
|
|
/**
|
|
* Get primary font family for the current theme
|
|
*/
|
|
public static function getFont(): string
|
|
{
|
|
$config = self::getDomainConfig();
|
|
|
|
return $config['font'] ?? 'Montserrat';
|
|
}
|
|
|
|
/**
|
|
* Get domain name for the current theme
|
|
*/
|
|
public static function getDomainName(): string
|
|
{
|
|
$config = self::getDomainConfig();
|
|
|
|
return $config['domain_name'] ?? 'pressekonto.test';
|
|
}
|
|
|
|
public static function getDomainUrl(): string
|
|
{
|
|
$config = self::getDomainConfig();
|
|
|
|
return $config['url'] ?? config('app.url');
|
|
}
|
|
|
|
/**
|
|
* Get the asset URL (Vite dev server) for the current theme
|
|
*/
|
|
public static function getAssetUrl(): string
|
|
{
|
|
$theme = config('app.theme', 'portal');
|
|
|
|
$assetUrlMap = [
|
|
'portal' => 'https://assets.pressekonto.test',
|
|
'pressekonto' => 'https://assets.pressekonto.test',
|
|
'presseecho' => 'https://assets.presseecho.test',
|
|
'businessportal24' => 'https://assets.businessportal24.test',
|
|
];
|
|
|
|
return $assetUrlMap[$theme] ?? 'https://assets.pressekonto.test';
|
|
}
|
|
}
|