favorites
This commit is contained in:
@@ -11,6 +11,21 @@
|
||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
|
||||
|
||||
<script>
|
||||
// Initialize theme early to avoid FOUC
|
||||
(function() {
|
||||
try {
|
||||
const stored = localStorage.getItem('theme');
|
||||
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
if (stored === 'dark' || (!stored && prefersDark)) {
|
||||
document.documentElement.classList.add('dark');
|
||||
} else {
|
||||
document.documentElement.classList.remove('dark');
|
||||
}
|
||||
} catch (e) {}
|
||||
})();
|
||||
</script>
|
||||
|
||||
<!-- Scripts -->
|
||||
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
||||
</head>
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
</div>
|
||||
|
||||
<div class="hidden sm:flex items-center gap-4">
|
||||
<button type="button" aria-label="Toggle dark mode" title="Toggle theme" class="inline-flex items-center justify-center rounded-md p-2 text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white focus:outline-none focus:ring-2 focus:ring-indigo-500/50" onclick="(function(){const c=document.documentElement.classList;const now=c.toggle('dark');try{localStorage.setItem('theme', now?'dark':'light');}catch(e){}})()">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="h-5 w-5 dark:hidden"><path d="M12 18a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm0 4a1 1 0 0 1-1-1v-1.06a9.01 9.01 0 0 1-6.94-6.94H3a1 1 0 1 1 0-2h1.06A9.01 9.01 0 0 1 11 4.06V3a1 1 0 1 1 2 0v1.06A9.01 9.01 0 0 1 19.94 11H21a1 1 0 1 1 0 2h-1.06A9.01 9.01 0 0 1 13 19.94V21a1 1 0 0 1-1 1z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="h-5 w-5 hidden dark:block"><path d="M21.64 13.02A9 9 0 1 1 10.98 2.36a1 1 0 0 1 1.3 1.3 7 7 0 1 0 9.05 9.05 1 1 0 0 1 1.3 1.3z"/></svg>
|
||||
</button>
|
||||
<a href="{{ route('workouts.builder') }}" class="inline-flex items-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500">Build a Workout</a>
|
||||
@auth
|
||||
<x-dropdown align="right" width="48">
|
||||
@@ -64,6 +68,12 @@
|
||||
<!-- Responsive Navigation Menu -->
|
||||
<div :class="{'block': open, 'hidden': ! open}" class="hidden sm:hidden">
|
||||
<div class="pt-2 pb-3 space-y-1 border-t border-gray-100 dark:border-gray-800">
|
||||
<div class="px-4 pb-2">
|
||||
<button type="button" aria-label="Toggle dark mode" class="inline-flex items-center gap-2 rounded-md border border-gray-200 dark:border-gray-700 px-3 py-2 text-sm text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-900" onclick="(function(){const c=document.documentElement.classList;const now=c.toggle('dark');try{localStorage.setItem('theme', now?'dark':'light');}catch(e){}})()">
|
||||
<span class="dark:hidden">Enable Dark Mode</span>
|
||||
<span class="hidden dark:inline">Disable Dark Mode</span>
|
||||
</button>
|
||||
</div>
|
||||
<x-responsive-nav-link :href="route('exercises.index')">Exercises</x-responsive-nav-link>
|
||||
<x-responsive-nav-link :href="route('workouts.index', [], false)">Workouts</x-responsive-nav-link>
|
||||
<x-responsive-nav-link :href="route('blog.index', [], false)">Blog</x-responsive-nav-link>
|
||||
|
||||
Reference in New Issue
Block a user