myvideogamelist.com/resources/views/partials/theme-mode/__menu.blade.php

34 lines
1.1 KiB
PHP
Raw Permalink Normal View History

@php
$darkMode = (isset($_COOKIE['dark_mode']) && $_COOKIE['dark_mode'] == 'yes') ? 'yes' : 'no';
@endphp
<!--begin::Menu-->
<div class="menu menu-sub menu-sub-dropdown menu-column menu-rounded menu-title-gray-700 menu-icon-muted menu-active-bg menu-state-primary fw-bold py-4 fs-6 w-200px" data-kt-menu="true">
<!--begin::Menu item-->
<div class="menu-item px-3 my-1">
<a href="#" id="theme_mode_light" class="menu-link px-3 {{ $darkMode === 'no' ? 'active' : '' }}">
<span class="menu-icon">
<i class="fas fa-brightness-low fs-2"></i>
</span>
<span class="menu-title">
Light
</span>
</a>
</div>
<!--end::Menu item-->
<!--begin::Menu item-->
<div class="menu-item px-3 my-1">
<a href="#" id="theme_mode_dark" class="menu-link px-3 {{ $darkMode === 'yes' ? 'active' : '' }}">
<span class="menu-icon">
<i class="fas fa-moon fs-2"></i>
</span>
<span class="menu-title">
Dark
</span>
</a>
</div>
<!--end::Menu item-->
</div>
<!--end::Menu-->