72 lines
3.0 KiB
PHP
72 lines
3.0 KiB
PHP
{{-- Systems Helpdesk site icons --}}
|
|
<link rel="icon" type="image/png" sizes="32x32" href="{{ asset('favicon-32x32.png') }}">
|
|
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('favicon-16x16.png') }}">
|
|
<link rel="icon" type="image/png" sizes="96x96" href="{{ asset('favicon-96x96.png') }}">
|
|
<link rel="shortcut icon" href="{{ asset('favicon.ico') }}">
|
|
<link rel="apple-touch-icon" sizes="180x180" href="{{ asset('apple-touch-icon.png') }}">
|
|
<link rel="manifest" href="{{ asset('site.webmanifest') }}">
|
|
<meta name="theme-color" content="#0b1220">
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
|
<meta name="format-detection" content="telephone=no">
|
|
<script>
|
|
(function () {
|
|
var ua = navigator.userAgent || '';
|
|
var isIOS12 = /(iPad|iPhone|iPod).*OS 12[_\.]/.test(ua);
|
|
|
|
if (isIOS12) {
|
|
document.documentElement.className +=
|
|
(document.documentElement.className ? ' ' : '') + 'hd-ios12';
|
|
}
|
|
}());
|
|
</script>
|
|
<title>{{ filled($title ?? null) ? $title.' - '.config('app.name', 'Laravel') : config('app.name', 'Laravel') }}</title>
|
|
@fonts
|
|
@php
|
|
// Guest/authentication pages only need the shared theme stylesheet. Loading
|
|
// every enabled module here made /login download each module's CSS/JS even
|
|
// though none of those assets are used on the authentication screen.
|
|
$loadModuleAssets = $loadModuleAssets ?? auth()->check();
|
|
$loadLayoutAssets = $loadLayoutAssets ?? auth()->check();
|
|
|
|
$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];
|
|
|
|
if ($loadLayoutAssets) {
|
|
$viteAssets[] = 'resources/themes/backend/assets/js/layout.js';
|
|
}
|
|
|
|
if ($loadModuleAssets) {
|
|
$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 |