Biete in der Merkmalszeile das Symbol links oder rechts neben dem Text an

Neue Einstellung "Lage des Symbols" (über dem Text als Vorgabe, links, rechts). Titel, Satz und Link stehen dazu in einer Spalte (lf-features__body); neben dem Text braucht ein Merkmal 18 rem Breite, "Sehr groß" wird auf schmalen Fenstern eine Stufe kleiner.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Sonnet 5.5 committed 2026-11-26 08:31:17 +01:00
1 parent 0ac70884cc
commit 27c1a52edf
8 files changed
+115 -17

No files matched your search

+43
View File
@@ -149,6 +149,49 @@ .lf-features--right .lf-features__item { text-align: right; }
.lf-features--right .lf-features__symbol { align-self: flex-end; }
.lf-features--right .lf-features__text { margin-inline-start: auto; }
/*
* Lage des Symbols (Einstellung „Lage des Symbols“): Vorgabe über dem Text. Links oder rechts steht das Symbol neben Titel,
* Satz und Link (Klassen nur bei Abweichung). Die Zeichnung sitzt oben, bündig mit der Oberkante des Titels, egal wie die
* Texte ausgerichtet sind. Neben dem Text braucht ein Merkmal mehr Breite, sonst bliebe für große Symbole kaum Zeile übrig.
*/
.lf-features__body {
display: flex;
flex-direction: column;
gap: var(--space-2);
min-inline-size: 0;
}
.lf-features--symbol-left,
.lf-features--symbol-right {
grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}
.lf-features--symbol-left.lf-features--1,
.lf-features--symbol-right.lf-features--1 {
grid-template-columns: minmax(0, 28rem);
}
.lf-features--symbol-left .lf-features__item,
.lf-features--symbol-right .lf-features__item {
flex-direction: row;
align-items: flex-start;
gap: var(--space-3);
}
.lf-features--symbol-right .lf-features__item { flex-direction: row-reverse; }
.lf-features--symbol-left .lf-features__symbol,
.lf-features--symbol-right .lf-features__symbol { align-self: flex-start; }
.lf-features--symbol-left .lf-features__body,
.lf-features--symbol-right .lf-features__body { flex: 1 1 0; }
/* Auf schmalen Fenstern steht „Sehr groß“ neben dem Text eine Stufe kleiner, damit für Titel und Satz genug Zeile bleibt. */
@media (max-width: 30rem) {
.lf-features--symbol-left.lf-features--size-xlarge .lf-features__symbol,
.lf-features--symbol-right.lf-features--size-xlarge .lf-features__symbol { --sym-s: var(--lf-symbol-large); }
}
/* Größe der Symbole (Einstellung „Größe der Symbole“): Kantenlänge des Quadrats, in das die Zeichnung passt. */
.lf-features--size-small .lf-features__symbol { --sym-s: var(--lf-symbol-small); }
.lf-features--size-large .lf-features__symbol { --sym-s: var(--lf-symbol-large); }
+12 -8
View File
@@ -2,7 +2,8 @@
Merkmalszeile: ein bis zwölf Merkmale mit Symbol, Kurztitel, Satz und optionalem Link. Die Spaltenzahl folgt der Anzahl
der Einträge und der tatsächlichen Breite (Raster mit Mindestbreite). Die Symbole sind Zierde; der Kurztitel trägt die
Aussage. Der Link erscheint als kleiner Textlink oder als Pille (Einstellung link_style); sein zugänglicher Name nennt
das Merkmal, damit mehrere „Mehr erfahren“ unterscheidbar bleiben. Layout (Ausrichtung, Symbolgröße, Trennstrich) kommt
das Merkmal, damit mehrere „Mehr erfahren“ unterscheidbar bleiben. Layout (Ausrichtung, Symbolgröße, Lage des Symbols,
Trennstrich) kommt
als Klassen an der Liste; ungültige Werte sind bereits auf die Vorgabe zurückgefallen (FeaturesWidget::layout).
--}}
@if ($items !== [])
@@ -11,6 +12,7 @@
'lf-features--'.count($items),
'lf-features--'.$layout['align'],
'lf-features--size-'.$layout['size'],
'lf-features--symbol-'.$layout['position'] => $layout['position'] !== 'top',
'lf-features--lines' => $layout['divider'],
])>
@foreach ($items as $item)
@@ -18,13 +20,15 @@
@if ($item['symbol'] !== null)
<x-brand.symbol :name="$item['symbol']" class="lf-features__symbol" preserveAspectRatio="xMinYMin meet" />
@endif
<p class="lf-features__title">{{ $item['title'] }}</p>
@if (filled($item['text']))
<p class="lf-features__text">{{ $item['text'] }}</p>
@endif
@if ($item['url'] !== null)
<p class="lf-features__more"><a class="lf-features__link lf-features__link--{{ $linkStyle }}" href="{{ $item['url'] }}" aria-label="{{ $item['linkLabel'] }}: {{ $item['title'] }}">{{ $item['linkLabel'] }}</a></p>
@endif
<div class="lf-features__body">
<p class="lf-features__title">{{ $item['title'] }}</p>
@if (filled($item['text']))
<p class="lf-features__text">{{ $item['text'] }}</p>
@endif
@if ($item['url'] !== null)
<p class="lf-features__more"><a class="lf-features__link lf-features__link--{{ $linkStyle }}" href="{{ $item['url'] }}" aria-label="{{ $item['linkLabel'] }}: {{ $item['title'] }}">{{ $item['linkLabel'] }}</a></p>
@endif
</div>
</li>
@endforeach
</ul>