Web: Boost-Platzierung auf Start- und Branchenseite ausspielen

Geboostete PMs besetzen Lead- und Top-Slots vor der Chronologie
(HomePageData/CategoryPageData ueber boosted()-Scope) und tragen das
Badge "Top-Platzierung". Abgelaufene Boosts wirken nicht.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-07-10 17:05:10 +00:00
parent 744e87d008
commit bbcdc72e2f
10 changed files with 183 additions and 19 deletions

View file

@ -1,10 +1,12 @@
@props([
'leadRelease' => null,
'sideReleases' => [],
'boostedIds' => [],
])
@php
$sideReleases = collect($sideReleases)->take(4)->values();
$boostedIds = collect($boostedIds)->all();
if ($leadRelease) {
$leadCategoryName = $leadRelease->localizedCategoryName();
@ -50,6 +52,9 @@
<div class="absolute top-6 left-6 flex gap-2">
<span class="bp-tag">{{ __('web.hero.top_story') }}</span>
@if (in_array($leadRelease->id, $boostedIds, true))
<span class="bp-tag">{{ __('web.shared.boosted_placement') }}</span>
@endif
</div>
<div class="absolute left-0 right-0 bottom-0 px-9 pb-8 pt-[60px] text-white"
@ -86,7 +91,8 @@
<div class="eyebrow muted mb-3.5">{{ __('web.hero.sidebar_title') }}</div>
@foreach ($sideReleases as $index => $release)
<x-web.focus-side-item :release="$release" :index="$index + 1" :first="$loop->first" />
<x-web.focus-side-item :release="$release" :index="$index + 1" :first="$loop->first"
:boosted="in_array($release->id, $boostedIds, true)" />
@endforeach
<x-web.ad-slot variant="sidebar" />

View file

@ -2,6 +2,7 @@
'release' => null,
'index' => 1,
'first' => false,
'boosted' => false,
])
@php
@ -44,6 +45,11 @@
<div>
<h3 class="font-serif text-[15.5px] leading-[1.3] m-0 font-medium tracking-[-0.1px] text-ink group-hover:text-brand transition-colors">
{{ $title }}
@if ($boosted)
<span class="inline-flex items-center whitespace-nowrap align-middle border border-brand/30 bg-brand/[0.04] px-1.5 py-px font-mono text-[9.5px] font-bold uppercase tracking-[0.1em] text-brand">
{{ __('web.shared.boosted_placement') }}
</span>
@endif
</h3>
<div class="text-[11.5px] text-ink-3 mt-1.5 flex items-center gap-1.5">
<svg width="10" height="10" viewBox="0 0 11 11" class="text-ok flex-shrink-0" aria-hidden="true">

View file

@ -24,7 +24,8 @@
<main class="bg-bg text-ink">
<x-web.focus-hero
:lead-release="$leadRelease ?? null"
:side-releases="$sideReleases ?? []" />
:side-releases="$sideReleases ?? []"
:boosted-ids="$boostedIds ?? []" />
<section class="max-w-layout mx-auto px-8 mt-16">
<div class="grid gap-9 grid-cols-1 lg:grid-cols-[1.7fr_1fr]">

View file

@ -130,6 +130,9 @@
@endif
<div class="absolute top-5 left-5 flex gap-2">
<span class="bp-tag">{{ __('web.hero.top_story') }}</span>
@if (in_array($leadRelease->id, $boostedIds ?? [], true))
<span class="bp-tag">{{ __('web.shared.boosted_placement') }}</span>
@endif
</div>
<div class="absolute left-0 right-0 bottom-0 px-6 sm:px-9 pb-8 pt-[70px] text-white" style="background:linear-gradient(180deg,transparent,rgba(0,0,0,0.92));">
@if ($leadCatName)
@ -172,7 +175,14 @@
<span class="bp-cat">{{ $topCat?->name ?? $catName }}</span>
<span class="font-mono text-[11px] text-ink-3 whitespace-nowrap">{{ $top->published_at?->translatedFormat('j. M') }}</span>
</div>
<h3 class="font-serif text-[17px] leading-[1.28] m-0 font-semibold tracking-[-0.2px] text-ink group-hover:text-brand transition-colors">{{ $top->title }}</h3>
<h3 class="font-serif text-[17px] leading-[1.28] m-0 font-semibold tracking-[-0.2px] text-ink group-hover:text-brand transition-colors">
{{ $top->title }}
@if (in_array($top->id, $boostedIds ?? [], true))
<span class="inline-flex items-center whitespace-nowrap align-middle border border-brand/30 bg-brand/[0.04] px-1.5 py-px font-mono text-[9.5px] font-bold uppercase tracking-[0.1em] text-brand">
{{ __('web.shared.boosted_placement') }}
</span>
@endif
</h3>
@if ($top->company?->name)
<div class="mt-2.5 text-[11.5px] text-ink-3 flex items-center gap-2">
<svg width="11" height="11" viewBox="0 0 11 11" class="text-ok" aria-hidden="true"><circle cx="5.5" cy="5.5" r="5" fill="currentColor"/><path d="M3 5.5l1.8 1.8L8 4" stroke="white" stroke-width="1.4" fill="none" stroke-linecap="round"/></svg>

View file

@ -24,7 +24,8 @@
<main class="bg-bg text-ink">
<x-web.focus-hero
:lead-release="$leadRelease ?? null"
:side-releases="$sideReleases ?? []" />
:side-releases="$sideReleases ?? []"
:boosted-ids="$boostedIds ?? []" />
<section class="max-w-layout mx-auto px-8 mt-16">
<div class="grid gap-9 grid-cols-1 lg:grid-cols-[1.7fr_1fr]">