presseportale/resources/views/components/portal/page-header.blade.php
Kevin Adametz 0c373f5963 5.4 (Teil 3): page-header in users/* + contacts/* umgestellt
Sieben weitere Header auf <x-portal.page-header>:
- users (index), users/create, contacts/index, contacts/create (Standard;
  contacts/create mit bedingtem 'Firma vorausgewaehlt'-Badge via :meta)
- users/show, users/edit (ID + Portal + Aktiv/Inaktiv-Badges via :meta,
  dynamischer Titel/Beschreibung aus User-Daten)
- contacts/edit (ID + Portal-Label via :meta, ohne Beschreibung)

Component: break-words am H1 ergaenzt (fuer lange Namen/E-Mails in show/edit;
bei kurzen Titeln ein No-op). User-/Contact-Tests (129) gruen.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 09:08:06 +00:00

51 lines
1.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@props([
/** Seitentitel (H1). Bereits übersetzt übergeben: :title="__('…')" */
'title' => '',
/** Eyebrow-Text rechts neben dem Hub-Badge, z. B. "Administration · Kategorien" */
'eyebrow' => '',
/** Label des Hub-Badges links oben (Standard: Admin Backend) */
'badge' => 'Admin Backend',
/** Optionaler Beschreibungstext unter dem Titel */
'description' => '',
])
{{--
Einheitlicher Seitenkopf des Admin-Backends. Ersetzt den 35-fach kopierten
page-header-Block. Variable Teile über Slots:
<x-slot:meta> – zusätzliche Badges hinter dem Eyebrow (ID, Zähler …)
<x-slot:actions> – Buttons rechts (Zurück, Speichern …)
--}}
<header {{ $attributes->class('page-header') }}>
<div class="min-w-0">
<div class="flex items-center gap-3 mb-3 flex-wrap">
@if (filled($badge))
<span class="badge hub dot">{{ $badge }}</span>
@endif
@if (filled($eyebrow))
<span class="eyebrow muted">{{ $eyebrow }}</span>
@endif
{{ $meta ?? '' }}
</div>
<h1 class="text-[30px] font-bold tracking-[-0.6px] leading-[1.15] m-0 text-[color:var(--color-ink)] break-words">
{{ $title }}
</h1>
@if (filled($description))
<p class="text-[13px] leading-[1.55] mt-2 m-0 max-w-[640px] text-[color:var(--color-ink-2)]">
{{ $description }}
</p>
@endif
</div>
@isset($actions)
<div class="flex items-center gap-2 flex-shrink-0">
{{ $actions }}
</div>
@endisset
</header>