5.4 (Teil 6): page-header in payments/invoices/legal/coupons/reports/newsletter
Component minimal-additiv erweitert (Defaults unveraendert): - size=sm (28px) fuer legal-requests/show - description-width=720px fuer breite Fliesstexte Umgestellt (letzter grosser Batch): - payments/index, payments/plans (720px, Aktionen) - invoices/index, coupons/index (720px, Badge via :meta, keine Aktionen) - legal-requests/index (Standard), legal-requests/show (sm, Status-Badge) - reports/slow-requests (Logdatei-Zaehler-Badge als Aktion) - newsletter/sync (Sync-Status via :meta, Dry-Run/Test-Sync-Buttons) CSS-Hash unveraendert -> keine neuen Klassen. 74 Tests gruen. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
27a77bfc50
commit
feda8be4d3
9 changed files with 97 additions and 136 deletions
|
|
@ -12,18 +12,24 @@
|
|||
'description' => '',
|
||||
|
||||
/**
|
||||
* Titel-Größe: md (Standard, 30px) | lg (Landing/Hero-Listen, 34px).
|
||||
* Titel-Größe: sm (28px) | md (Standard, 30px) | lg (Landing/Hero-Listen, 34px).
|
||||
* lg vergrößert zusätzlich die Beschreibung und den Button-Abstand.
|
||||
*/
|
||||
'size' => 'md',
|
||||
|
||||
/** Maximale Breite der Beschreibung: 640px (Standard) | 720px (breite Fließtexte) */
|
||||
'descriptionWidth' => '640px',
|
||||
])
|
||||
|
||||
@php
|
||||
$size = in_array($size, ['md', 'lg'], true) ? $size : 'md';
|
||||
$titleClass = $size === 'lg'
|
||||
? 'text-[34px] tracking-[-0.7px] leading-[1.1]'
|
||||
: 'text-[30px] tracking-[-0.6px] leading-[1.15]';
|
||||
$size = in_array($size, ['sm', 'md', 'lg'], true) ? $size : 'md';
|
||||
$titleClass = match ($size) {
|
||||
'sm' => 'text-[28px] tracking-[-0.5px] leading-[1.15]',
|
||||
'lg' => 'text-[34px] tracking-[-0.7px] leading-[1.1]',
|
||||
default => 'text-[30px] tracking-[-0.6px] leading-[1.15]',
|
||||
};
|
||||
$descriptionClass = $size === 'lg' ? 'text-[13.5px]' : 'text-[13px]';
|
||||
$descriptionMaxWidth = $descriptionWidth === '720px' ? 'max-w-[720px]' : 'max-w-[640px]';
|
||||
$actionsGap = $size === 'lg' ? 'gap-3' : 'gap-2';
|
||||
@endphp
|
||||
|
||||
|
|
@ -52,7 +58,7 @@
|
|||
</h1>
|
||||
|
||||
@if (filled($description))
|
||||
<p class="{{ $descriptionClass }} leading-[1.55] mt-2 m-0 max-w-[640px] text-[color:var(--color-ink-2)]">
|
||||
<p class="{{ $descriptionClass }} leading-[1.55] mt-2 m-0 {{ $descriptionMaxWidth }} text-[color:var(--color-ink-2)]">
|
||||
{{ $description }}
|
||||
</p>
|
||||
@endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue