<div class="c-subscription-menu c-subscription-menu--standalone">
<input type="checkbox" id="subscriptionMenuStandaloneTrigger" class="c-subscription-menu__trigger" />
<label for="subscriptionMenuStandaloneTrigger" class="c-subscription-menu__label">
<span class="o-css-icon o-css-icon--haz"></span>
Abo
</label>
<div class="c-subscription-menu__actor">
<nav class="c-subscription-menu__section">
<ul class="c-subscription-menu__list c-subscription-menu__list--lvl1">
<li class="c-subscription-menu__item c-subscription-menu__item--lvl1">
<span class="c-subscription-menu__section-title">Abo</span>
<ul class="c-subscription-menu__list c-subscription-menu__list--lvl2">
<li class="c-subscription-menu__item c-subscription-menu__item--lvl2">
<a href="#" class="c-subscription-menu__anchor">Abo bestellen</a>
</li>
<li class="c-subscription-menu__item c-subscription-menu__item--lvl2">
<a href="#" class="c-subscription-menu__anchor">Abo mit Tablet bestellen</a>
</li>
<li class="c-subscription-menu__item c-subscription-menu__item--lvl2">
<a href="#" class="c-subscription-menu__anchor">Abo verwalten</a>
</li>
<li class="c-subscription-menu__item c-subscription-menu__item--lvl2">
<a href="#" class="c-subscription-menu__anchor">Reklamationsservice</a>
</li>
<li class="c-subscription-menu__item c-subscription-menu__item--lvl2">
<a href="#" class="c-subscription-menu__anchor">ABOEXTRA</a>
</li>
<li class="c-subscription-menu__item c-subscription-menu__item--lvl2">
<a href="#" class="c-subscription-menu__anchor">Vorteile</a>
</li>
</ul>
</ul>
</nav>
</div>
</div>
<div class="c-subscription-menu{% if modifier %} c-subscription-menu--{{ modifier }}{% endif %}">
<input type="checkbox" id="subscriptionMenu{{ modifier|capitalize }}Trigger" class="c-subscription-menu__trigger"/>
<label for="subscriptionMenu{{ modifier|capitalize }}Trigger" class="c-subscription-menu__label">
<span class="o-css-icon o-css-icon--haz"></span>
Abo
</label>
<div class="c-subscription-menu__actor">
<nav class="c-subscription-menu__section">
<ul class="c-subscription-menu__list c-subscription-menu__list--lvl1">
{% for section, items in sitemap.subscription %}
<li class="c-subscription-menu__item c-subscription-menu__item--lvl1">
<span class="c-subscription-menu__section-title">{{ section }}</span>
<ul class="c-subscription-menu__list c-subscription-menu__list--lvl2">
{% for node in items.nodes %}
<li class="c-subscription-menu__item c-subscription-menu__item--lvl2">
<a href="#" class="c-subscription-menu__anchor">{{ node }}</a>
</li>
{% endfor %}
</ul>
{% endfor %}
</ul>
</nav>
</div>
</div>
{
"modifier": "standalone",
"sitemap": {
"subscription": {
"Abo": {
"nodes": [
"Abo bestellen",
"Abo mit Tablet bestellen",
"Abo verwalten",
"Reklamationsservice",
"ABOEXTRA",
"Vorteile"
]
}
}
}
}
.c-subscription-menu {
&__trigger {
display: none;
}
&__label {
cursor: pointer;
font-size: rem-calc(18);
font-weight: 500;
line-height: 2;
padding-left: 40px;
position: relative;
}
&__actor {
background-color: $color-grey-lightest;
display: none;
position: absolute;
right: 0;
top: 100%;
width: 25%;
&::before {
border-bottom: 20px solid $color-grey-lightest;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
content: '';
height: 0;
left: 35%;
position: absolute;
top: -20px;
transform: translateX(-50%);
width: 0;
}
}
&__section {
padding: rem-calc(10) 0;
}
&__list {
list-style: none;
margin: 0;
padding: 0;
}
&__section-title {
color: inherit;
display: block;
font-size: 1.4em;
font-weight: 500;
line-height: 1;
//border-bottom: rem-calc(2) solid;
margin: 0 0 rem-calc(20) 0 !important;
padding-bottom: rem-calc(8);
position: relative;
// BEN: border-color gets inherited from color BUT you CAN'T do sth. like "border-bottom: rem-calc(2) solid rgba(currentColor, 0.15)"...
// (Short reasoning for the pseudo-element)
&::before {
border-bottom: rem-calc(2) solid;
bottom: 0;
content: '';
left: 0;
opacity: .15;
position: absolute;
right: 0;
top: 0;
}
}
&__anchor {
border-bottom: 3px solid transparent;
color: inherit;
transition: border ease-in-out 150ms;
&:hover {
border-bottom: 1px solid currentColor;
}
}
&__list--lvl1 {
display: flex;
}
&__item--lvl1 {
box-sizing: border-box;
flex: 1 1 calc(100% / 6);
padding: rem-calc(15);
}
&__list--lvl2 {
line-height: 1.8;
}
}
// Behaviour
.c-subscription-menu__trigger:checked ~ .c-subscription-menu__actor {
display: block;
}
.c-subscription-menu__trigger:checked ~ .c-subscription-menu__label {
//text-shadow: 0 0 1px $color-white;
}
.c-subscription-menu__item--lvl1:hover .c-subscription-menu__section-title::before,
.c-subscription-menu__item--lvl1.is-active .c-subscription-menu__section-title::before {
border-color: $color-yellow;
opacity: 1;
}
// Contexts via modifier
// Standalone (for usage directly in topbar, big screens)
.c-subscription-menu--standalone {
@include breakpoint(medium down) {
display: none;
}
}
// Integrated (for usage inside of main menu, small screens)
.c-subscription-menu--integrated {
.c-subscription-menu__label {
display: block;
margin: rem-calc(10) 0 rem-calc(10) rem-calc(20);
}
.c-subscription-menu__section-title {
display: none;
}
.c-subscription-menu__actor {
background-color: $color-grey-lightest;
margin-top: 10px;
position: relative;
right: auto;
top: 0;
width: 200%;
&::before {
border-bottom-width: 13px;
border-left-width: 13px;
border-right-width: 13px;
left: 50px;
top: -13px;
}
}
.c-subscription-menu__anchor {
font-size: 1.2em;
font-weight: 500;
margin-left: rem-calc(30);
}
}
There are no notes for this item.