Refactored navigation code

This commit is contained in:
Kevin Veen-Birkenbach 2025-01-14 17:19:09 +01:00
parent 573a3be360
commit 7c51ac6bbc
5 changed files with 55 additions and 49 deletions

View File

@ -17,16 +17,27 @@ accounts:
url: https://microblog.veen.world/@kevinveenbirkenbach url: https://microblog.veen.world/@kevinveenbirkenbach
- name: Pictures - name: Pictures
description: View my photo gallery
icon: icon:
class: fa-solid fa-camera class: fa-solid fa-images
url: https://picture.veen.world/kevinveenbirkenbach subitems:
- name: Pixelfed
description: View my photo gallery
icon:
class: fa-solid fa-camera
url: https://s.veen.world/pictures
- name: Instagram
description: Follow me on Instagram
icon:
class: fa-brands fa-instagram
url: https://www.instagram.com/kevinveenbirkenbach/
identifier: kevinveenbirkenbach
warning: Using software and platforms from the Meta corporation (e.g., Facebook, Instagram, WhatsApp) may compromise your data privacy and digital freedom due to centralized control, extensive data collection practices, and inconsistent moderation policies. These platforms often fail to adequately address harmful content, misinformation, and abuse.
- name: Videos - name: Videos
description: Watch my videos description: Watch my videos
icon: icon:
class: fa-solid fa-video class: fa-solid fa-video
url: https://video.veen.world/a/kevinveenbirkenbach url: https://s.veen.world/videos
- name: Blog - name: Blog
description: Read my blog description: Read my blog
@ -56,13 +67,6 @@ accounts:
class: fa-brands fa-meta class: fa-brands fa-meta
url: url:
subitems: subitems:
- name: Instagram
description: Follow me on Instagram
icon:
class: fa-brands fa-instagram
url: https://www.instagram.com/kevinveenbirkenbach/
identifier: kevinveenbirkenbach
warning: Using software and platforms from the Meta corporation (e.g., Facebook, Instagram, WhatsApp) may compromise your data privacy and digital freedom due to centralized control, extensive data collection practices, and inconsistent moderation policies. These platforms often fail to adequately address harmful content, misinformation, and abuse.
- name: Facebook - name: Facebook
description: Like my Facebook page description: Like my Facebook page
icon: icon:

View File

@ -1,3 +1,5 @@
@import url("navigation.css");
/* General link styles */ /* General link styles */
a { a {
text-decoration: none; text-decoration: none;
@ -77,40 +79,4 @@ h3.card-title {
h3.footer-title { h3.footer-title {
font-size: 1.3em; font-size: 1.3em;
} }
/* Dropdown-Menüs verstecken */
.dropdown-menu {
display: none;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
}
/* Dropdown-Menü beim Hover anzeigen */
.nav-item.dropdown:hover > .dropdown-menu,
.dropdown-submenu:hover > .dropdown-menu {
display: block;
opacity: 1;
visibility: visible;
}
/* Dropdown-Menü bei der Klasse "open" anzeigen */
.nav-item.dropdown.open > .dropdown-menu,
.dropdown-submenu.open > .dropdown-menu {
display: block;
opacity: 1;
visibility: visible;
}
/* Positionierung von Submenüs */
.dropdown-submenu > .dropdown-menu {
position: absolute;
top: 0;
left: 100%; /* Rechts ausklappen */
}
.dropdown-submenu.open > .dropdown-menu {
display: block;
opacity: 1;
visibility: visible;
}

View File

@ -0,0 +1,36 @@
/* Dropdown-Menüs verstecken */
.dropdown-menu {
display: none;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
}
/* Dropdown-Menü beim Hover anzeigen */
.nav-item.dropdown:hover > .dropdown-menu,
.dropdown-submenu:hover > .dropdown-menu {
display: block;
opacity: 1;
visibility: visible;
}
/* Dropdown-Menü bei der Klasse "open" anzeigen */
.nav-item.dropdown.open > .dropdown-menu,
.dropdown-submenu.open > .dropdown-menu {
display: block;
opacity: 1;
visibility: visible;
}
/* Positionierung von Submenüs */
.dropdown-submenu > .dropdown-menu {
position: absolute;
top: 0;
left: 100%; /* Rechts ausklappen */
}
.dropdown-submenu.open > .dropdown-menu {
display: block;
opacity: 1;
visibility: visible;
}

View File

@ -41,7 +41,7 @@
<!-- Include modal --> <!-- Include modal -->
{% include "moduls/modal.html.j2" %} {% include "moduls/modal.html.j2" %}
<script src="{{ url_for('static', filename='js/modal.js') }}"></script> <script src="{{ url_for('static', filename='js/modal.js') }}"></script>
<script src="{{ url_for('static', filename='js/submenus.js') }}"></script> <script src="{{ url_for('static', filename='js/navigation.js') }}"></script>
<script src="{{ url_for('static', filename='js/tooltip.js') }}"></script> <script src="{{ url_for('static', filename='js/tooltip.js') }}"></script>
</body> </body>
</html> </html>