<p class="badge">
<span class="badge__icon">
<svg class="icon icon--bell" viewBox="0 0 200 200" aria-hidden="true">
<use xlink:href="/assets/icons/icons.3bafb6df0d.svg#bell"></use>
</svg> </span>
<span class="badge__text">Tipp aus der Redaktion</span>
</p>
{% set icon = icon ?? false %}
<p {{ html_attributes({
class: {
'badge': true,
},
}, attrs ?? {}) }}>
{% if icon|default %}
<span class="badge__icon">
{% include '@icon' with { icon: icon } only %}
</span>
{% endif %}
{% if text|default %}
<span class="badge__text">{{ text }}</span>
{% endif %}
</p>
{
"icon": "bell",
"text": "Tipp aus der Redaktion"
}
:root {
--badge-background-color: var(--color-white);
--badge-icon-color: var(--color-orange);
--badge-icon-size: 0.2em;
--badge-rotation: 15deg;
--badge-size: 11.2rem;
--badge-text-color: var(--text-color);
--badge-text-line-height: var(--line-height-small);
--badge-text-size: 0.125em;
--badge-text-weight: var(--font-weight-semibold);
}
.badge {
align-items: center;
aspect-ratio: 1;
background-color: var(--badge-background-color);
block-size: 1em;
border-radius: 50%;
display: flex;
flex-direction: column;
font-size: var(--badge-size);
inline-size: 1em;
justify-content: center;
transform: rotate(var(--badge-rotation));
}
.badge__icon {
color: var(--badge-icon-color);
font-size: var(--badge-icon-size);
&:only-child {
font-size: calc(var(--badge-icon-size) * 1.8);
line-height: 0;
}
&:not(:only-child) {
margin-block-end: 0.3em;
margin-block-start: -0.3em;
}
}
.badge__text {
color: var(--badge-text-color);
font-size: var(--badge-text-size);
font-weight: var(--badge-text-weight);
letter-spacing: -0.05em;
line-height: var(--badge-text-line-height);
padding-inline: 0.7em;
text-align: center;
}
No notes defined.