mirror of
https://github.com/nfonteyne/octane-website.git
synced 2026-09-03 23:24:48 +02:00
update: change theme
This commit is contained in:
parent
aca521b54f
commit
9426b73940
17 changed files with 326 additions and 21 deletions
10
public/js/theme-init.js
Normal file
10
public/js/theme-init.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
(function () {
|
||||
try {
|
||||
var saved = localStorage.getItem('octane-theme');
|
||||
if (saved === 'light' || saved === 'dark') {
|
||||
document.documentElement.setAttribute('data-theme', saved);
|
||||
}
|
||||
} catch (e) {
|
||||
/* localStorage unavailable (private mode etc.) — fall back to OS theme */
|
||||
}
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue