@php use Illuminate\Support\Facades\Route; use App\Http\Controllers\UserSiteSettingController; // Check cookie to see if dark mode is enabled or not. $darkMode = (isset($_COOKIE['dark_mode']) && $_COOKIE['dark_mode'] == 'yes') ? 'yes' : 'no'; // Update the users dark mode preference in the database. if (auth()->check()) { if ($darkMode === 'yes') { $result = UserSiteSettingController::setDarkMode('yes'); } elseif ($darkMode === 'no') { $result = UserSiteSettingController::setDarkMode('no'); } } @endphp printHtmlAttributes('html') !!} {{ theme()->printHtmlClasses('html') }}> {{-- begin::Head --}} {{ ucfirst(theme()->getOption('meta', 'title')) }} {{-- begin::Fonts --}} {{ theme()->includeFonts() }} {{-- end::Fonts --}} @if (theme()->hasOption('page', 'assets/vendors/css')) {{-- begin::Page Vendor Stylesheets(used by this page) --}} @foreach (array_unique(theme()->getOption('page', 'assets/vendors/css')) as $file) {!! preloadCss(assetCustom($file)) !!} @endforeach {{-- end::Page Vendor Stylesheets --}} @endif @if (theme()->hasOption('page', 'assets/custom/css')) {{-- begin::Page Custom Stylesheets(used by this page) --}} @foreach (array_unique(theme()->getOption('page', 'assets/custom/css')) as $file) {!! preloadCss(assetCustom($file)) !!} @endforeach {{-- end::Page Custom Stylesheets --}} @endif @if (theme()->hasOption('assets', 'css')) {{-- begin::Global Stylesheets Bundle(used by all pages) --}} @foreach (array_unique(theme()->getOption('assets', 'css')) as $file) @if (strpos($file, 'plugins') !== false) {!! preloadCss(assetCustom($file)) !!} @else @endif @endforeach {{-- end::Global Stylesheets Bundle --}} @endif @yield('styles') {{-- end::Head --}} {{-- begin::Body --}} printHtmlAttributes('body') !!} {!! theme()->printHtmlClasses('body') !!} {!! theme()->printCssVariables('body') !!}> @if (theme()->getOption('layout', 'loader/display') === true)
Loading...
@endif @yield('content') {{-- begin::Javascript --}} @if (theme()->hasOption('assets', 'js')) {{-- begin::Global Javascript Bundle(used by all pages) --}} @foreach (array_unique(theme()->getOption('assets', 'js')) as $file) @endforeach {{-- end::Global Javascript Bundle --}} @endif @if (theme()->hasOption('page', 'assets/vendors/js')) {{-- begin::Page Vendors Javascript(used by this page) --}} @foreach (array_unique(theme()->getOption('page', 'assets/vendors/js')) as $file) @endforeach {{-- end::Page Vendors Javascript --}} @endif @if (theme()->hasOption('page', 'assets/custom/js')) {{-- begin::Page Custom Javascript(used by this page) --}} @foreach (array_unique(theme()->getOption('page', 'assets/custom/js')) as $file) @endforeach {{-- end::Page Custom Javascript --}} @endif @yield('scripts') @if(Route::currentRouteName() == 'admin.games.index' || Route::currentRouteName() == 'admin.game.edit') @include('partials.footer-scripts.admin.games._toasts') @endif @if(Route::currentRouteName() == 'games.list.index' || Route::currentRouteName() == 'games.list.user.index') @endif @if(Route::currentRouteName() == 'games.list.index') @include('partials.footer-scripts.game-lists._data-tables-games-list') @include('partials.footer-scripts.game-lists._toasts') @endif @if(Route::currentRouteName() == 'games.list.user.index') @include('partials.footer-scripts.game-lists._data-tables-user') @endif @if(Route::currentRouteName() == 'games.list.create') @include('partials.footer-scripts.game-lists._create_start_finish_date_pickers') @endif @if(Route::currentRouteName() == 'games.list.edit') @include('partials.footer-scripts.game-lists._edit_start_finish_date_pickers') @include('partials.footer-scripts.game-lists._toasts') @endif {{-- end::Javascript --}} {{-- end::Body --}}