Introduce block and inline callout components

This is a nicer way of showing current updates.
This commit is contained in:
Yannik Rödel 2022-12-01 07:42:23 +01:00
parent 036c6989a7
commit 3bcd963851
6 changed files with 35 additions and 4 deletions

View file

@ -66,6 +66,12 @@
</nav> </nav>
</header> </header>
{% if callout %}
<div class='page-callout'>
{{ callout }}
</div>
{% endif %}
<main id="content" {% if contentClass %} class="{{ contentClass }}"{% endif %}> <main id="content" {% if contentClass %} class="{{ contentClass }}"{% endif %}>
{% block content %} {% block content %}
{{ content | safe }} {{ content | safe }}

View file

@ -4,6 +4,7 @@ useForms: true
eleventyNavigation: eleventyNavigation:
key: Computer beantragen key: Computer beantragen
order: 50 order: 50
callout: "Hinweis: Wir bekommen gerade sehr viele Anfragen und können daher keine neuen Laptops ausgeben!"
--- ---
# Computer beantragen # Computer beantragen
@ -11,8 +12,6 @@ eleventyNavigation:
Damit wir dir einen Computer geben können, musst du uns einige Fragen beantworten. Damit wir dir einen Computer geben können, musst du uns einige Fragen beantworten.
Danach können wir den Antrag prüfen und uns bei dir melden. Danach können wir den Antrag prüfen und uns bei dir melden.
_Hinweis: Wir bekommen gerade sehr viele Anfragen und können daher keine neuen Laptops ausgeben!_
Für wen brauchst du den Computer? Für wen brauchst du den Computer?

View file

@ -1,6 +1,7 @@
--- ---
layout: layouts/page.njk layout: layouts/page.njk
useForms: true useForms: true
callout: "Hinweis: Wir bekommen gerade sehr viele Anfragen und können daher keine neuen Laptops ausgeben!"
--- ---
# Privat einen Computer beantragen # Privat einen Computer beantragen

View file

@ -22,7 +22,10 @@ Wir schaffen Zugang in die digitale Welt
</div> </div>
<a href="/computer-beantragen"> <a href="/computer-beantragen">
<h3>Computer bekommen</h3> <div>
<h3>Computer bekommen</h3>
<em class="inline-callout">Aktuell keine Laptops</em>
</div>
<svg class="action-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 219 175"> <svg class="action-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 219 175">
<linearGradient id="emphasis-gradient-sun" class="emphasis-gradient"> <linearGradient id="emphasis-gradient-sun" class="emphasis-gradient">
<stop offset="0%" /> <stop offset="0%" />

View file

@ -39,11 +39,16 @@
@include colors.card-shadow; @include colors.card-shadow;
transition: motion.$subtle background-color, motion.$subtle transform; transition: motion.$subtle background-color, motion.$subtle transform;
> h3 { > h3,
> div > h3 {
margin: 0; margin: 0;
text-transform: uppercase; text-transform: uppercase;
} }
> div > .inline-callout {
margin-top: layout.$normal-gap;
}
> svg { > svg {
align-self: center; align-self: center;
margin-bottom: layout.$normal-gap; margin-bottom: layout.$normal-gap;

View file

@ -81,3 +81,20 @@
} }
} }
} }
%callout {
background-color: colors.$yellow-300;
color: colors.$blue-800;
}
.page-callout {
@extend %callout;
padding: layout.$normal-gap;
}
.inline-callout {
@extend %callout;
display: inline-block;
font-style: normal;
padding: layout.$small-gap layout.$normal-gap;
}