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> <!doctype html>
<html> <html data-bs-theme="light">
<head> <head>
{% set base = "" %} {% set base = "" %}
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -39,7 +39,7 @@
border-radius: 10px; border-radius: 10px;
} }
/*
.top_menu a { .top_menu a {
font-weight: bold; font-weight: bold;
color: #333; color: #333;
@@ -53,6 +53,7 @@
.top_menu a:hover { .top_menu a:hover {
background: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.3);
} }
*/
@media (min-width: 768px) { @media (min-width: 768px) {
.top_header_text { .top_header_text {
@@ -75,14 +76,17 @@
</head> </head>
<body> <body>
<div class="top_header"> <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> <h1 class="top_header_text"><a style="border-radius: 5px; padding: 10px; opacity: 0.7; background: black">{{ page_title }}</a></h1>
</div> </div>
</div> </div>
<div class="top_menu d-flex justify-content-end" > <div class="row justify-content-end pe-2 py-2" >
<a href="{{ parent_path }}index.html">Home</a> <div class="col-auto fw-bold">
<a id="categories_toggle" href="#">Categories</a> <a class="link-body-emphasis mx-2 text-decoration-none" href="{{ parent_path }}index.html">Home</a>
<a href="{{ parent_path }}static/about.html">About</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>
<div id="categories_container" class="container"> <div id="categories_container" class="container">
<div id="categories_menu" class="row justify-content-center mx-auto mb-2" style="display: none"> <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 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> <script defer>
document.getElementById("categories_toggle").onclick = function() { 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") { if (categories_menu_item.style.display == "none") {
categories_menu_item.style.display = "block" categories_menu_item.style.display = "block"
} }
else { else {
categories_menu_item.style.display = "none" 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> </script>
</body> </body>

View File

@@ -8,7 +8,7 @@
{% block content %} {% block content %}
<div class="row d-flex justify-content-start g-4 py-4"> <div class="row d-flex justify-content-start g-4 py-4">
{% for content_item in content_items %} {% for content_item in content_items %}
<div class="col mx-2" style="max-width: 400px;"> <div class="col-auto mx-2" style="max-width: 400px;">
<div class="card h-100 px-0 rounded mx-1 my-3" style="width: 100%; width: 350px;"> <div class="card h-100 px-0 rounded mx-1 my-3" style="width: 100%; width: 350px;">
<div class="card-header"> <div class="card-header">
{% if content_item.image_file %} {% if content_item.image_file %}