85 lines
3.2 KiB
PHP
85 lines
3.2 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
|
|
|
<title>{{ $title ?? ($domainName ?? config('app.name', 'Laravel')) }}</title>
|
|
|
|
<!-- Domain-spezifisches Favicon -->
|
|
<link rel="icon" href="{{ asset(\App\Helpers\ThemeHelper::getFaviconPath()) }}">
|
|
|
|
<!-- Fonts -->
|
|
<link rel="preconnect" href="https://fonts.bunny.net">
|
|
|
|
@php
|
|
$primaryFont = \App\Helpers\ThemeHelper::getPrimaryFont();
|
|
$secondaryFont = \App\Helpers\ThemeHelper::getSecondaryFont();
|
|
$theme = config('app.theme', 'b2in');
|
|
@endphp
|
|
|
|
@vite([
|
|
\App\Helpers\ThemeHelper::getThemeCssPath(),
|
|
'resources/js/app.js'
|
|
], 'build/' . $theme)
|
|
|
|
<!-- Sticky Header Script -->
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const topbar = document.getElementById('topbar');
|
|
const header = document.getElementById('header');
|
|
|
|
if (!topbar || !header) return;
|
|
|
|
let topbarHeight = topbar.offsetHeight;
|
|
let isHeaderSticky = false;
|
|
|
|
function updateHeaderPosition() {
|
|
const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
|
|
|
if (scrollTop >= topbarHeight && !isHeaderSticky) {
|
|
header.classList.remove('header-normal');
|
|
header.classList.add('header-sticky');
|
|
isHeaderSticky = true;
|
|
} else if (scrollTop < topbarHeight && isHeaderSticky) {
|
|
header.classList.remove('header-sticky');
|
|
header.classList.add('header-normal');
|
|
isHeaderSticky = false;
|
|
}
|
|
}
|
|
|
|
updateHeaderPosition();
|
|
window.addEventListener('scroll', updateHeaderPosition);
|
|
window.addEventListener('resize', function() {
|
|
topbarHeight = topbar.offsetHeight;
|
|
updateHeaderPosition();
|
|
});
|
|
});
|
|
</script>
|
|
|
|
@stack('styles')
|
|
|
|
@if ($primaryFont === 'Inter' && $secondaryFont === 'IBM Plex Sans')
|
|
<link href="https://fonts.bunny.net/css?family=inter:400,500,600,700|ibm-plex-sans:400,500,600,700"
|
|
rel="stylesheet" />
|
|
@elseif($primaryFont === 'Inter' && $secondaryFont === 'Merriweather')
|
|
<link href="https://fonts.bunny.net/css?family=inter:400,500,600,700|merriweather:400,700" rel="stylesheet" />
|
|
@elseif($primaryFont === 'Inter' && $secondaryFont === 'Ephesis')
|
|
<link href="https://fonts.bunny.net/css?family=inter:400,500,600,700|ephesis:400" rel="stylesheet" />
|
|
@elseif($primaryFont === 'Inter' && $secondaryFont === 'EB Garamond')
|
|
<link href="https://fonts.bunny.net/css?family=inter:400,500,600,700|eb-garamond:400,500,600,700"
|
|
rel="stylesheet" />
|
|
@else
|
|
<link href="https://fonts.bunny.net/css?family=inter:400,500,600,700|ibm-plex-sans:400,500,600,700"
|
|
rel="stylesheet" />
|
|
@endif
|
|
</head>
|
|
<body class="antialiased bg-background text-foreground">
|
|
<livewire:web.components.ui.top-bar />
|
|
|
|
{{ $slot }}
|
|
|
|
@stack('scripts')
|
|
</body>
|
|
</html>
|