Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
localzet committed Nov 23, 2023
1 parent 8d53c73 commit 3ffaf8e
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion public/js/scripts.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/scripts.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/widgets.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/widgets.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/plugins/custom/tinymce/tinymce.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/plugins/custom/tinymce/tinymce.js.map

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/js/layout/theme-mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ var KTThemeMode = function () {
menuMode = mode;
}

var metaThemeColor = document.querySelector("meta[name=theme-color]");

// Read active menu mode value
var activeMenuItem = menu ? menu.querySelector('[data-kt-element="mode"][data-kt-value="' + menuMode + '"]') : null;

Expand All @@ -41,6 +43,12 @@ var KTThemeMode = function () {
// Set mode to the target document.documentElement
document.documentElement.setAttribute("data-bs-theme", mode);

if(mode === 'dark') {
metaThemeColor.setAttribute("content", "#0f1014");
} else {
metaThemeColor.setAttribute("content", "#ffffff");
}

// Disable switching state
setTimeout(function() {
document.documentElement.removeAttribute("data-kt-theme-mode-switching");
Expand Down

0 comments on commit 3ffaf8e

Please sign in to comment.