@props([ 'industries' => null, ]) @php $industries = $industries ?? [ ['name' => 'Technologie', 'count' => 142, 'delta' => 12, 'href' => route('kategorien')], ['name' => 'Finanzen', 'count' => 98, 'delta' => 5, 'href' => route('kategorien')], ['name' => 'Industrie', 'count' => 87, 'delta' => -2, 'href' => route('kategorien')], ['name' => 'Energie', 'count' => 64, 'delta' => 18, 'href' => route('kategorien')], ['name' => 'Gesundheit', 'count' => 51, 'delta' => 3, 'href' => route('kategorien')], ['name' => 'Mobilität', 'count' => 44, 'delta' => 9, 'href' => route('kategorien')], ['name' => 'Handel', 'count' => 38, 'delta' => -1, 'href' => route('kategorien')], ['name' => 'Immobilien', 'count' => 32, 'delta' => 4, 'href' => route('kategorien')], ]; $maxCount = max(1, collect($industries)->max('count')); $industries = array_slice($industries, 0, 8); @endphp

Branchen-Index

Letzte 7 Tage

@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
{{ $industry['name'] }} @if ($delta > 0) +{{ $delta }} @elseif ($delta < 0) {{ $delta }} @else ±0 @endif
{{ $industry['count'] }} Meldungen
@endforeach