This commit is contained in:
SG
2025-06-12 19:51:26 +03:00
parent 08caaba9ee
commit 51b7cd586b
2 changed files with 18 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
<!doctype html>
<html>
<html data-bs-theme="light">
<head>
{% set base = "" %}
<meta name="viewport" content="width=device-width, initial-scale=1">
@@ -39,7 +39,7 @@
border-radius: 10px;
}
/*
.top_menu a {
font-weight: bold;
color: #333;
@@ -53,6 +53,7 @@
.top_menu a:hover {
background: rgba(255, 255, 255, 0.3);
}
*/
@media (min-width: 768px) {
.top_header_text {
@@ -75,14 +76,17 @@
</head>
<body>
<div class="top_header">
<div >
<div class="col-auto">
<h1 class="top_header_text"><a style="border-radius: 5px; padding: 10px; opacity: 0.7; background: black">{{ page_title }}</a></h1>
</div>
</div>
<div class="top_menu d-flex justify-content-end" >
<a href="{{ parent_path }}index.html">Home</a>
<a id="categories_toggle" href="#">Categories</a>
<a href="{{ parent_path }}static/about.html">About</a>
<div class="row justify-content-end pe-2 py-2" >
<div class="col-auto fw-bold">
<a class="link-body-emphasis mx-2 text-decoration-none" href="{{ parent_path }}index.html">Home</a>
<a class="link-body-emphasis mx-2 text-decoration-none" id="categories_toggle" href="#none">Categories</a>
<a class="link-body-emphasis mx-2 text-decoration-none" href="{{ parent_path }}static/about.html">About</a>
<a class="link-body-emphasis mx-2 text-decoration-none" id="dark_theme_toggle" href="#none">🌓︎</a>
</div>
</div>
<div id="categories_container" class="container">
<div id="categories_menu" class="row justify-content-center mx-auto mb-2" style="display: none">
@@ -112,13 +116,18 @@
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/js/bootstrap.min.js" integrity="sha384-RuyvpeZCxMJCqVUGFI0Do1mQrods/hhxYlcVfGPOfQtPJh0JCw12tUAZ/Mv10S7D" crossorigin="anonymous"></script>
<script defer>
document.getElementById("categories_toggle").onclick = function() {
categories_menu_item = document.getElementById("categories_menu")
categories_menu_item = document.getElementById("categories_menu");
if (categories_menu_item.style.display == "none") {
categories_menu_item.style.display = "block"
}
else {
categories_menu_item.style.display = "none"
}
};
document.getElementById("dark_theme_toggle").onclick = function() {
html = document.documentElement;
html_color_theme = html.getAttribute('data-bs-theme');
html.setAttribute('data-bs-theme', html_color_theme === 'dark' ? 'light' : 'dark')
}
</script>
</body>