Dark mode switcher is not displaying in Metronic demo 8
https://snipboard.io/S4Crmf.jpg
I didn't change anything in the code:
@if (theme()->isDarkModeEnabled())
<!--begin::Menu item-->
<div class="menu-item px-5">
<div class="menu-content px-5">
<label class="form-check form-switch form-check-custom form-check-solid pulse pulse-success" for="kt_user_menu_dark_mode_toggle">
<input class="form-check-input w-30px h-20px" type="checkbox" value="1" name="skin" id="kt_user_menu_dark_mode_toggle" {{ theme()->isDarkMode() ? "checked" : "" }} data-kt-url="{{ theme()->getPageUrl("", "", theme()->isDarkMode() ? "" : "dark") }}"/>
<span class="pulse-ring ms-n1"></span>
<span class="form-check-label text-gray-600 fs-7">
{{ __("Dark Mode") }}
</span>
</label>
</div>
</div>
<!--end::Menu item-->
@endif
Hi
I also found this out.
In the file "config/global/general.php" add
"main" => [
"dark-mode-enabled" => true
]
Hi DevMushref,
Please check this file views/partials/topbar/_user-menu.blade.php
There is a sample code for the dark mode switcher which is located on the topbar.
Thanks