First commit
This commit is contained in:
commit
7cf3558ba7
12933 changed files with 1180047 additions and 0 deletions
113
app/Helpers/ThemeHelper.php
Normal file
113
app/Helpers/ThemeHelper.php
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
<?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', 'b2in');
|
||||
|
||||
$logoMap = [
|
||||
'b2in' => [
|
||||
'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[$theme][$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');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue