feat: DropDown jetzt mit mehr hübsch.
This commit is contained in:
parent
b19740d7e4
commit
f990e99909
@ -122,11 +122,11 @@ body {
|
||||
|
||||
.primary_nav__sub_navlink {
|
||||
color: var(--wtf-nearly-white);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.primary_nav__navlink:hover {
|
||||
color: var(--wtf-mid-grey);
|
||||
text-decoration: underline;
|
||||
.primary_nav__sub_navlink:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.primary_nav__sub_navlist.-closed {
|
||||
@ -162,7 +162,7 @@ body {
|
||||
}
|
||||
|
||||
/* Malt bei vorhandenem Submenü den Pfeil */
|
||||
.primary_nav__navlist li a:first-child:nth-last-child(2):after {
|
||||
.primary_nav__navlist li span:first-child:nth-last-child(2):after {
|
||||
content: "";
|
||||
position: relative;
|
||||
top: -0.125rem;
|
||||
|
@ -10,7 +10,7 @@ document.getElementsByClassName('primary_nav__toggle')[0].addEventListener('clic
|
||||
let primary_menu_items = document.getElementsByClassName('primary_nav__navitem');
|
||||
for (let i = 0; i < primary_menu_items.length; i++) {
|
||||
primary_menu_items[i].addEventListener('click', function(event) {
|
||||
let dropdown = event.currentTarget.firstElementChild;
|
||||
let dropdown = event.currentTarget.children[1];
|
||||
if (dropdown.classList.contains('-closed')) {
|
||||
dropdown.classList.remove('-closed');
|
||||
dropdown.classList.add('-open');
|
||||
|
@ -13,11 +13,11 @@
|
||||
{% for title, mapping in bag("navigation").items() %}
|
||||
{% if mapping.visible|default(true) %}
|
||||
<li id="{{ mapping.slug }}" class="primary_nav__navitem">
|
||||
{{ title }}
|
||||
<span>{{ title }}</span>
|
||||
{% if mapping.list_childs %}
|
||||
<ul class="primary_nav__sub_navlist -closed">
|
||||
<li>
|
||||
<a class="primary_nav__navlink {% if this._path == mapping.href or
|
||||
<li class="primary_nav__sub_navitem">
|
||||
<a class="primary_nav__sub_navlink {% if this._path == mapping.href or
|
||||
this._path in mapping['items'].values() or
|
||||
title == 'Aktuelles' and
|
||||
('blog' in this._path or 'podcast' in this._path)
|
||||
|
Loading…
Reference in New Issue
Block a user