Zeige auf der Shopkachel Titelbild, Saeulen, Materialart mit Symbol und Marker
- ShopCatalog als gemeinsame Datenquelle der Kacheln, shop/kachel als Partial - Titelbild nur mit Website-Freigabe (PresentationMedia::coverPresentation), schmueckend mit leerem alt - Symbol je Materialart (Stammdaten), Marker Neu, Aktualisiert, Beliebt mit Einstellung am Artikel - Migration 2026_12_01_100000, rein ergaenzend - ADR-54, Plan, DEPLOYMENT.md Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
db3a6ba779
commit
0ac70884cc
18 files changed
+991
-88
No files matched your search
@@ -421,3 +421,145 @@ .mb-withdraw textarea {
|
||||
width: 100%;
|
||||
margin: var(--space-2) 0 var(--space-3);
|
||||
}
|
||||
|
||||
/*
|
||||
* Produktkachel (ADR-54): Titelbild oder Platzhalter mit Symbol der Materialart, Marker mit Wort, Art, Titel, Kurztext,
|
||||
* Themen und Preis. Bilder erscheinen nur mit Website-Freigabe; ohne Bild trägt eine helle Tafel das Symbol.
|
||||
*/
|
||||
.shop-tile {
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.shop-tile-media {
|
||||
position: relative;
|
||||
aspect-ratio: 16 / 9;
|
||||
background: var(--color-surface-subtle);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.shop-tile-media img {
|
||||
inline-size: 100%;
|
||||
block-size: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.shop-tile-symbol {
|
||||
--sym-s: 4.5rem;
|
||||
}
|
||||
|
||||
.shop-tile-body {
|
||||
padding: var(--space-4) var(--space-5) var(--space-5);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.shop-tile-kind {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
margin: 0 0 var(--space-2);
|
||||
color: var(--color-text-muted);
|
||||
font-size: var(--text-small);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.shop-tile-kind-symbol {
|
||||
--sym-s: 1.25rem;
|
||||
}
|
||||
|
||||
.shop-tile-body h2 {
|
||||
margin: 0 0 var(--space-2);
|
||||
}
|
||||
|
||||
.shop-tile-body h2 a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.shop-tile-body h2 a:hover,
|
||||
.shop-tile-body h2 a:focus-visible {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Die ganze Kachel ist klickbar; der Link im Titel bleibt der einzige Tabstopp. */
|
||||
.shop-tile {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.shop-tile-body h2 a::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
}
|
||||
|
||||
.shop-tile-teaser {
|
||||
margin: 0 0 var(--space-3);
|
||||
color: var(--color-text);
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.shop-tile-pillars {
|
||||
list-style: none;
|
||||
margin: 0 0 var(--space-3);
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
|
||||
.shop-tile-pillars li {
|
||||
padding: 0.1rem 0.6rem;
|
||||
border: 1px solid var(--color-border-strong);
|
||||
border-radius: var(--radius-pill);
|
||||
font-size: var(--text-small);
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.shop-tile-price {
|
||||
margin-top: auto;
|
||||
padding-top: var(--space-3);
|
||||
}
|
||||
|
||||
.shop-markers {
|
||||
position: absolute;
|
||||
inset-block-start: var(--space-3);
|
||||
inset-inline-start: var(--space-3);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
|
||||
.shop-marker {
|
||||
padding: 0.15rem 0.7rem;
|
||||
border-radius: var(--radius-pill);
|
||||
border: 2px solid var(--lf-navy);
|
||||
background: var(--color-surface);
|
||||
color: var(--lf-navy);
|
||||
font-weight: 700;
|
||||
font-size: var(--text-small);
|
||||
}
|
||||
|
||||
.shop-marker-neu {
|
||||
background: var(--color-accent);
|
||||
}
|
||||
|
||||
.shop-marker-aktualisiert {
|
||||
background: var(--color-info-surface);
|
||||
}
|
||||
|
||||
.shop-marker-beliebt {
|
||||
background: var(--color-success-surface);
|
||||
border-color: var(--color-success);
|
||||
color: var(--color-success);
|
||||
}
|
||||
@@ -108,6 +108,12 @@
|
||||
</ul>
|
||||
@endif
|
||||
<div><button type="button" class="vw-btn is-line" wire:click="mountAction('option')">@include('filament.verwaltung.icon', ['name' => 'plus'])Option hinzufügen</button></div>
|
||||
@php($marker = $this->markerRows())
|
||||
<div class="vw-spalte-kopf">
|
||||
<h3 id="artikel-marker">Marker auf der Kachel</h3>
|
||||
<span class="vw-feld-hilfe">Zurzeit: {{ $marker['sichtbar'] === [] ? 'kein Marker' : implode(', ', $marker['sichtbar']) }}. „Neu“ und „Aktualisiert“ richten sich automatisch nach den Daten, „Beliebt“ setzt du von Hand.</span>
|
||||
<span class="vw-zeilenaktionen"><button type="button" class="vw-link" wire:click="mountAction('markers')">Marker ändern</button></span>
|
||||
</div>
|
||||
@endif
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -24,11 +24,7 @@
|
||||
<p class="shop-count" role="status">{{ count($cards) }} {{ count($cards) === 1 ? 'Produkt' : 'Produkte' }}</p>
|
||||
<ul class="shop-tiles">
|
||||
@foreach ($cards as $card)
|
||||
<li class="shop-tile">
|
||||
<h2><a href="{{ $card['url'] }}">{{ $card['title'] }}</a></h2>
|
||||
@if ($card['teaser'] !== '')<p>{{ $card['teaser'] }}</p>@endif
|
||||
<p class="shop-tile-price">ab {{ $card['from'] }} · {{ $card['count'] }} {{ $card['count'] === 1 ? 'Lizenzoption' : 'Lizenzoptionen' }}</p>
|
||||
</li>
|
||||
@include('shop.kachel', ['card' => $card])
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
{{--
|
||||
Eine Produktkachel des Shops. Parameter: $card (ShopCatalog). Die Kachel trägt nur Öffentliches: Titelbild nur mit
|
||||
Website-Freigabe, Säulen nur veröffentlicht, die Materialart mit ihrem Symbol, die Marker mit Wort. Das Bild ist
|
||||
schmückend (leeres alt), der Titel ist der Link.
|
||||
--}}
|
||||
<li class="shop-tile">
|
||||
<div class="shop-tile-media @if ($card['image'] === null) is-placeholder @endif" aria-hidden="true">
|
||||
@if ($card['image'] !== null)
|
||||
<img src="{{ $card['image']['url'] }}" alt="" loading="lazy" decoding="async">
|
||||
@elseif ($card['symbol'] !== null)
|
||||
<x-brand.symbol :name="$card['symbol']" class="shop-tile-symbol" />
|
||||
@endif
|
||||
@if ($card['markers'] !== [])
|
||||
<span class="shop-markers">
|
||||
@foreach ($card['markers'] as $marker)
|
||||
<span class="shop-marker shop-marker-{{ $marker['key'] }}">{{ $marker['label'] }}</span>
|
||||
@endforeach
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="shop-tile-body">
|
||||
@if ($card['markers'] !== [])
|
||||
<p class="sr-only">{{ implode(', ', array_column($card['markers'], 'label')) }}</p>
|
||||
@endif
|
||||
@if ($card['kind_label'] !== '')
|
||||
<p class="shop-tile-kind">
|
||||
@if ($card['symbol'] !== null && $card['image'] !== null)<x-brand.symbol :name="$card['symbol']" class="shop-tile-kind-symbol" aria-hidden="true" />@endif
|
||||
<span>{{ $card['kind_label'] }}</span>
|
||||
</p>
|
||||
@endif
|
||||
<h2><a href="{{ $card['url'] }}">{{ $card['title'] }}</a></h2>
|
||||
@if ($card['teaser'] !== '')<p class="shop-tile-teaser">{{ $card['teaser'] }}</p>@endif
|
||||
@if ($card['pillars'] !== [])
|
||||
<ul class="shop-tile-pillars" aria-label="Themen">
|
||||
@foreach (array_slice($card['pillars'], 0, 3) as $pillar)
|
||||
<li>{{ $pillar }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
<p class="shop-tile-price">ab {{ $card['from'] }} · {{ $card['count'] }} {{ $card['count'] === 1 ? 'Lizenzoption' : 'Lizenzoptionen' }}</p>
|
||||
</div>
|
||||
</li>
|
||||
Reference in new issue
Block a user