Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

"Good Theme" - Dark/Light Mode


Good morning.
I recent buy the "Good theme" but i try to configure the Dark/Light mode like a live preview (change it in a button), but the documentation does not mention it, but the documentation does not mention it, it only mentions the Dark mode as static mode. And I would like to handle the theme as in the live preview.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)


Hi,

A dark mode switch is usually implemented in various ways depending on a project's requirements.

The live preview sends a request to a server-side script to regenerate the page's HTML with dark mode CSS files.

In your case, firstly you will need to generate the Dark mode CSS files referring to the documentation.

Then you can implement either using JS API of the Dark mode switch or page reload using your server-side languages by including required CSS files based on the user's selected mode.

If you need any further assistance please let us know more about your requirements and what you have implemented so far and we we will try to guide you further.

Regards.



I already followed the documentation, but I would like an example using the JS API of the Dark mode switch, because I can't make the Dark/Light mode switch.



Noted, we will provide working code here soon. Regards.



Just an update on this request. We were refactoring our dark mode solution and now we are using css dynamic variables to handle both light and dark versions within the same css file. So our dark mode improvement with major sass changes for Good will be released in a few weeks with some other big features such as django, .net, blazor and flask server side starter kit apps. Stay tuned!


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(