Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Laravel Metronic 8.1.5 Dark Mode not working.


Hi,

I have a base metronic 8.1.5 laravel.

I have added the option dark mode in settings


// Layout
"layout" => array(
"main" => [
"dark-mode-enabled" => true,
]
),


Als have read the following page : <a>https://preview.keenthemes.com/metronic8/laravel/documentation/getting-started/dark-mode</a>

have run
npm run dev


But nothing changed if i switch to dark mode.
Nothing is dark, everything stays "light".

Is there a step i'm missing?

Thanks


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)


Hi Tieme Alberts

Sorry for the delay. Glad you found the solution. We will check it.

Thanks



i think i found the problem in resources/views/partials/theme-mode/_init.blade.php


Changed

const name = document.body.getAttribute("data-kt-name");
let themeMode = localStorage.getItem("kt_" + (name !== null ? name + "_" : "") + "theme_mode_value");

into

let themeMode = localStorage.getItem("data-theme-mode");



Hello, Tieme Alberts!

Thanks for posting your solution, it worked for me too happy

Have a nice day.



i use Demo3.
The system option works, the dark option does not work.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(