fix: avoid visible leading space in whitespace-pre-line blocks
Render hero subheadline and expired message on one line so Blade indentation is not preserved by whitespace-pre-line. Made-with: Cursor
This commit is contained in:
@@ -16,6 +16,8 @@
|
|||||||
};
|
};
|
||||||
$eyebrow = data_get($c, 'eyebrow_text');
|
$eyebrow = data_get($c, 'eyebrow_text');
|
||||||
$eyebrowStyle = (string) data_get($c, 'eyebrow_style', 'badge');
|
$eyebrowStyle = (string) data_get($c, 'eyebrow_style', 'badge');
|
||||||
|
$subheadlineRaw = data_get($c, 'subheadline');
|
||||||
|
$subheadline = is_string($subheadlineRaw) ? trim($subheadlineRaw) : '';
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<div class="flex w-full flex-col {{ $alignClass }} space-y-4">
|
<div class="flex w-full flex-col {{ $alignClass }} space-y-4">
|
||||||
@@ -35,9 +37,8 @@
|
|||||||
</h1>
|
</h1>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($pageState !== 'expired' && filled(data_get($c, 'subheadline')))
|
{{-- Subheadline must sit on one line inside the div: whitespace-pre-line turns Blade indentation into visible leading space. --}}
|
||||||
<div class="w-full max-w-none whitespace-pre-line text-[15px] leading-[1.65] text-white sm:text-base sm:leading-relaxed">
|
@if ($pageState !== 'expired' && $subheadline !== '')
|
||||||
{{ trim((string) data_get($c, 'subheadline')) }}
|
<div class="w-full max-w-none whitespace-pre-line text-[15px] leading-[1.65] text-white sm:text-base sm:leading-relaxed">{{ $subheadline }}</div>
|
||||||
</div>
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -85,9 +85,8 @@
|
|||||||
@if ($pageState === 'expired')
|
@if ($pageState === 'expired')
|
||||||
<div class="space-y-6">
|
<div class="space-y-6">
|
||||||
@if (filled($page->expired_message))
|
@if (filled($page->expired_message))
|
||||||
<div class="whitespace-pre-line text-center text-[15px] leading-[1.65] text-white/92 sm:text-base sm:leading-relaxed">
|
{{-- Same as text/hero blocks: no line breaks inside whitespace-pre-line wrapper. --}}
|
||||||
{{ $page->expired_message }}
|
<div class="whitespace-pre-line text-center text-[15px] leading-[1.65] text-white/92 sm:text-base sm:leading-relaxed">{{ trim((string) $page->expired_message) }}</div>
|
||||||
</div>
|
|
||||||
@else
|
@else
|
||||||
<p class="text-center text-[15px] leading-relaxed text-white/92 sm:text-base">{{ __('This pre-registration period has ended.') }}</p>
|
<p class="text-center text-[15px] leading-relaxed text-white/92 sm:text-base">{{ __('This pre-registration period has ended.') }}</p>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
Reference in New Issue
Block a user