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