44 lines
1.7 KiB
PHP
44 lines
1.7 KiB
PHP
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>{{ filled($title ?? null) ? $title.' - '.config('app.name', 'Laravel') : config('app.name', 'Laravel') }}</title>
|
|
<link rel="icon" href="/favicon.ico" sizes="any"><link rel="icon" href="/favicon.svg" type="image/svg+xml"><link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
|
@fonts
|
|
@php
|
|
$backendCssEntry = is_file(resource_path('themes/backend/assets/css/app.css'))
|
|
? 'resources/themes/backend/assets/css/app.css'
|
|
: 'resources/themes/backend/assets/css/helpdesk.css';
|
|
|
|
$viteAssets = [
|
|
$backendCssEntry,
|
|
'resources/themes/backend/assets/js/passkeys.js',
|
|
'resources/themes/backend/assets/js/layout.js',
|
|
];
|
|
|
|
$moduleStatuses = [];
|
|
$moduleStatusFile = base_path('modules_statuses.json');
|
|
|
|
if (is_file($moduleStatusFile)) {
|
|
$moduleStatuses = json_decode((string) file_get_contents($moduleStatusFile), true) ?: [];
|
|
}
|
|
|
|
foreach (glob(base_path('Modules/*'), GLOB_ONLYDIR) ?: [] as $moduleDirectory) {
|
|
$moduleName = basename($moduleDirectory);
|
|
|
|
if (array_key_exists($moduleName, $moduleStatuses) && ! $moduleStatuses[$moduleName]) {
|
|
continue;
|
|
}
|
|
|
|
foreach (['Resources/assets/css/app.css', 'Resources/assets/js/app.js'] as $entry) {
|
|
$absoluteEntry = $moduleDirectory.DIRECTORY_SEPARATOR.str_replace('/', DIRECTORY_SEPARATOR, $entry);
|
|
|
|
if (is_file($absoluteEntry)) {
|
|
$viteAssets[] = str_replace('\\', '/', substr($absoluteEntry, strlen(base_path()) + 1));
|
|
}
|
|
}
|
|
}
|
|
|
|
$viteAssets = array_values(array_unique($viteAssets));
|
|
@endphp
|
|
@vite($viteAssets)
|
|
@fluxAppearance
|