Optimize academy
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
$gridVersion = request()->query('grid') === 'v2' ? 'v2' : 'v1';
|
||||
$skinbaseSessionSkipped = request()->attributes->get('skinbase.session_skipped') === true;
|
||||
$skinbaseCanUseSession = request()->hasSession() && ! $skinbaseSessionSkipped;
|
||||
$deferToolbarSearch = request()->routeIs('index');
|
||||
$deferToolbarSearch = request()->routeIs('index', 'academy.*');
|
||||
$deferFontAwesome = request()->routeIs('index');
|
||||
$deferWebManifest = request()->routeIs('index');
|
||||
$deferWebManifest = request()->routeIs('index', 'academy.*');
|
||||
$isInertiaPage = isset($page) && is_array($page);
|
||||
$isAuthSeoRoute = request()->routeIs([
|
||||
'login',
|
||||
@@ -35,13 +35,27 @@
|
||||
}
|
||||
@endphp
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ app()->getLocale() }}" data-grid-version="{{ $gridVersion }}">
|
||||
<html lang="{{ app()->getLocale() }}" data-grid-version="{{ $gridVersion }}" data-skinbase-theme="default">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
@if($skinbaseCanUseSession)
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
@endif
|
||||
<script>
|
||||
(() => {
|
||||
const storageKey = 'skinbase.theme';
|
||||
const allowedThemes = new Set(['default', 'light']);
|
||||
|
||||
try {
|
||||
const savedTheme = localStorage.getItem(storageKey);
|
||||
const theme = allowedThemes.has(savedTheme) ? savedTheme : 'default';
|
||||
document.documentElement.dataset.skinbaseTheme = theme;
|
||||
} catch (_error) {
|
||||
document.documentElement.dataset.skinbaseTheme = 'default';
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<meta name="msvalidate.01" content="E81C84AA9CE4A9CDF1B0039010228C41">
|
||||
<meta name="verify-v1" content="HNZJnSy5ZbqcrmXUXUwUMtPZzXsKQ+esjxPgXIXDQdk=">
|
||||
<meta name="google-site-verification" content="D5L-4F-ZP1HFLzLsau6ge7LNGEGb9Sfio4RINkleQto">
|
||||
@@ -76,6 +90,11 @@
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
html[data-skinbase-theme="light"] {
|
||||
background-color: rgb(244, 247, 251);
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
@@ -84,6 +103,11 @@
|
||||
background-color: rgb(14, 18, 27);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
html[data-skinbase-theme="light"] body {
|
||||
background-color: rgb(244, 247, 251);
|
||||
color: #172033;
|
||||
}
|
||||
</style>
|
||||
@foreach($novaCssEntries as $novaCssEntry)
|
||||
@php
|
||||
@@ -100,6 +124,12 @@
|
||||
}),
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
window.SKINBASE_THEME = {
|
||||
storageKey: 'skinbase.theme',
|
||||
themes: @json(array_values(array_filter(['default', config('theme.enabled') ? 'light' : null]))),
|
||||
};
|
||||
</script>
|
||||
@stack('head')
|
||||
|
||||
@if($deferToolbarSearch)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
@endphp
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid legacy-page">
|
||||
<div class="explore-page container-fluid legacy-page">
|
||||
@php Banner::ShowResponsiveAd(); @endphp
|
||||
|
||||
<div class="pt-0">
|
||||
@@ -100,7 +100,7 @@
|
||||
$activeTab = $current_sort ?? 'trending';
|
||||
@endphp
|
||||
|
||||
<div class="sticky top-0 z-30 border-b border-white/10 bg-nova-900/90 backdrop-blur-md" id="gallery-ranking-tabs">
|
||||
<div class="explore-page__tabs sticky top-0 z-30 border-b border-white/10 bg-nova-900/90 backdrop-blur-md" id="gallery-ranking-tabs">
|
||||
<div class="px-6 md:px-10">
|
||||
<div class="flex items-center justify-between gap-4">
|
||||
<nav class="flex items-center gap-0 -mb-px nb-scrollbar-none overflow-x-auto" role="tablist">
|
||||
|
||||
@@ -261,6 +261,25 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(config('theme.show_toolbar_switch'))
|
||||
<button
|
||||
type="button"
|
||||
class="theme-toggle shrink-0"
|
||||
data-theme-toggle
|
||||
aria-label="Switch to default theme"
|
||||
aria-pressed="true"
|
||||
title="Switch to default theme"
|
||||
>
|
||||
<span class="theme-toggle__track" aria-hidden="true">
|
||||
<span class="theme-toggle__thumb">
|
||||
<i class="theme-toggle__icon theme-toggle__icon--moon fa-solid fa-moon"></i>
|
||||
<i class="theme-toggle__icon theme-toggle__icon--sun fa-solid fa-sun"></i>
|
||||
</span>
|
||||
</span>
|
||||
<span class="hidden xl:inline text-xs font-semibold uppercase tracking-[0.14em]" data-theme-toggle-label>Light</span>
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@if($skinbaseToolbarCanAuth)
|
||||
<!-- Notification icons -->
|
||||
<div class="hidden md:flex items-center gap-0.5 lg:gap-1 text-soft shrink-0">
|
||||
|
||||
Reference in New Issue
Block a user