mirror of
https://github.com/fruworg/themu.git
synced 2025-06-14 02:30:25 +03:00
Committer: root <root@fruw.org>
On branch master Your branch is up to date with 'origin/master'. Changes to be committed: deleted: exampleSite/archetypes/default.md deleted: exampleSite/config.toml deleted: exampleSite/content/_index.md deleted: exampleSite/content/about.md deleted: exampleSite/content/archives.md deleted: exampleSite/content/homepage/about.md deleted: exampleSite/content/homepage/index.md deleted: exampleSite/content/homepage/work.md deleted: exampleSite/content/posts/post-1.md deleted: exampleSite/content/posts/post-2.md deleted: exampleSite/content/posts/post-3.md deleted: exampleSite/content/posts/post-4.md deleted: exampleSite/content/posts/post-5.md deleted: exampleSite/content/posts/post-6.md deleted: exampleSite/content/posts/post-7.md deleted: exampleSite/content/posts/tg-gh.md deleted: images/archie-dark.png deleted: images/screenshot.png deleted: images/theme.png deleted: images/tn.png deleted: layouts/partials/disqus.html deleted: static/js/feather.min.js deleted: static/js/main.js deleted: static/js/themetoggle.js modified: theme.toml
This commit is contained in:
13
static/js/feather.min.js
vendored
13
static/js/feather.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,23 +0,0 @@
|
||||
function setTheme(mode) {
|
||||
localStorage.setItem("theme-storage", mode);
|
||||
if (mode === "dark") {
|
||||
document.getElementById("darkModeStyle").disabled=false;
|
||||
document.getElementById("dark-mode-toggle").innerHTML = "<i data-feather=\"sun\"></i>";
|
||||
feather.replace()
|
||||
} else if (mode === "light") {
|
||||
document.getElementById("darkModeStyle").disabled=true;
|
||||
document.getElementById("dark-mode-toggle").innerHTML = "<i data-feather=\"moon\"></i>";
|
||||
feather.replace()
|
||||
}
|
||||
}
|
||||
|
||||
function toggleTheme() {
|
||||
if (localStorage.getItem("theme-storage") === "light") {
|
||||
setTheme("dark");
|
||||
} else if (localStorage.getItem("theme-storage") === "dark") {
|
||||
setTheme("light");
|
||||
}
|
||||
}
|
||||
|
||||
var savedTheme = localStorage.getItem("theme-storage") || "light";
|
||||
setTheme(savedTheme);
|
Reference in New Issue
Block a user