This commit is contained in:
SG
2025-06-16 17:55:58 +03:00
parent 87484fe341
commit cfe8e9a799
7 changed files with 32 additions and 25 deletions

View File

@@ -1,5 +0,0 @@
---
title: "About"
omit_second_title: True
---

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

View File

@@ -0,0 +1,20 @@
console.log('Default theme loaded.')
const saved_color_theme = localStorage.getItem('saved_color_theme');
if (saved_color_theme) {
document.documentElement.setAttribute('data-bs-theme', saved_color_theme);
}
document.getElementById("categories_toggle").onclick = function() {
categories_menu_item = document.getElementById("categories_menu");
categories_menu_item.style.display = categories_menu_item.style.display === "none" ? "block" : "none"
}
document.getElementById("dark_theme_toggle").onclick = function() {
html = document.documentElement;
current_color_theme = html.getAttribute('data-bs-theme');
new_color_theme = current_color_theme === 'dark' ? 'light' : 'dark';
html.setAttribute('data-bs-theme', new_color_theme);
localStorage.setItem('saved_color_theme', new_color_theme);
}