presseportale/resources/views/components/web/industry-index.blade.php
Kevin Adametz dec524989b web: Responsive-/Mobile-Fixes fürs öffentliche Frontend
Behebt strukturelle Mobile-Bugs (320/390px) über presseecho,
businessportal24 und den pressekonto-Hub hinweg:

- Focus-/Kategorie-/Newsroom-Hero: Text im Flow (min-h + flex) statt
  fester Höhe, responsive Typo — Overlay überläuft nicht mehr nach oben.
- Quality-Summary: Grid stackt auf Mobile (behebt Seiten-Overflow).
- Hub: Utility-Bar mit Wrap, Header mit Mobile-Burger, Footer stackt,
  Architektur-Diagramm als gestapelte Mobile-Variante.
- Sticky-Header (Portal): fehlende .header-sticky-CSS ergänzt und Script
  mit Platzhalter, damit der Header beim Scrollen sichtbar bleibt.
- Header-Overflow bei 320px entschärft (Portal + Hub); Hub-Hero-H1
  verkleinert, damit die Wortmarke "businessportal24" umbricht.
- Mobile-Nav um Preise/FAQ/API ergänzt; Industry-Index-Dichte,
  Touch-Targets und Preise-Einzel-PM-Block für kleine Screens verbessert.
- Homepages/Shared: px-8 → px-4 sm:px-6 lg:px-8.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-16 09:33:49 +00:00

62 lines
2.9 KiB
PHP

@props([
'industries' => null,
])
@php
$industries = $industries ?? \App\Support\CategoryNavigation::items(8)
->map(fn (array $category): array => [
'name' => $category['label'],
'count' => 0,
'delta' => 0,
'href' => $category['href'],
])
->all();
$maxCount = max(1, collect($industries)->max('count'));
$industries = array_slice($industries, 0, 8);
@endphp
@if (! empty($industries))
<section class="max-w-layout mx-auto px-4 sm:px-6 lg:px-8 mt-16">
<header class="flex items-baseline justify-between mb-4 flex-wrap gap-3">
<h2 class="font-serif text-[28px] font-semibold m-0 tracking-[-0.3px] text-ink">{{ __('web.industry_index.title') }}</h2>
<span class="eyebrow muted">{{ __('web.industry_index.window') }}</span>
</header>
<hr class="rule-strong">
<div class="grid border-b border-bg-rule grid-cols-2 md:grid-cols-4">
@foreach ($industries as $idx => $industry)
@php
$delta = (int) ($industry['delta'] ?? 0);
$direction = $delta > 0 ? 'gain' : ($delta < 0 ? 'loss' : 'flat');
$percent = max(20, (int) round(($industry['count'] ?? 0) / $maxCount * 100));
$isTopRow = $idx < 4;
$isLastInRow = ($idx + 1) % 4 === 0;
$barClass = $delta < 0 ? 'bg-brand' : 'bg-gain';
@endphp
<a href="{{ $industry['href'] ?? route('web.home') }}"
class="block px-4 sm:px-5 py-4 sm:py-[18px] {{ $isLastInRow ? '' : 'md:border-r border-bg-rule' }} {{ $isTopRow ? '' : 'border-t border-bg-rule' }} cursor-pointer hover:bg-bg-elev transition-colors group">
<div class="flex justify-between items-baseline mb-2 gap-2">
<span class="text-[13px] sm:text-[14px] font-semibold text-ink group-hover:text-brand transition-colors">{{ $industry['name'] }}</span>
<span class="font-mono text-[12px] font-semibold
@if ($direction === 'gain') text-gain
@elseif ($direction === 'loss') text-loss
@else text-ink-3 @endif">
@if ($delta > 0) +{{ $delta }}
@elseif ($delta < 0) {{ $delta }}
@else ±0
@endif
</span>
</div>
<div class="flex items-baseline gap-2 mb-2">
<span class="font-serif text-[22px] font-semibold tracking-[-0.3px] text-ink">{{ $industry['count'] }}</span>
<span class="text-[11px] text-ink-3">{{ __('web.industry_index.releases') }}</span>
</div>
<div class="h-[3px] bg-bg-rule">
<div class="h-full {{ $barClass }}" style="width: {{ $percent }}%;"></div>
</div>
</a>
@endforeach
</div>
</section>
@endif