improvements on faq page
This commit is contained in:
1 parent
1e4da2c8cc
commit
b2f53ea952
6 files changed
+11
-10
No files matched your search
@@ -34,7 +34,7 @@
|
||||
|
||||
'arrow-down' => '<path fill="none" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M12 5V19M12 19L6 13M12 19L18 13"/>',
|
||||
|
||||
'chevron-down' => '<path fill="none" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" d="M6 9L12 15L18 9"/>',
|
||||
'chevron-down' => '<path fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M6 9L12 15L18 9"/>',
|
||||
|
||||
'facebook' => '<path d="M14 13.5H16.5L17.5 9.5H14V7.5C14 6.47062 14 5.5 16 5.5H17.5V2.1401C17.1743 2.09685 15.943 2 14.6429 2C11.9284 2 10 3.65686 10 6.69971V9.5H7V13.5H10V22H14V13.5Z"/>',
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
@php $number = 0; @endphp
|
||||
|
||||
<section class="grid grid-cols-1 lg:grid-cols-2">
|
||||
<section class="grid grid-cols-1 lg:grid-cols-[2fr_3fr]">
|
||||
|
||||
{{-- Photo: left column on desktop (sticky while the questions scroll),
|
||||
after the questions on mobile so the answers come first. --}}
|
||||
@@ -38,7 +38,7 @@
|
||||
<x-ui.stoic-image
|
||||
src="{{ $page->image }}"
|
||||
preset="large"
|
||||
sizes="(min-width: 1024px) 50vw, 100vw"
|
||||
sizes="(min-width: 1024px) 40vw, 100vw"
|
||||
:alt="$page->image_alt ?? ''"
|
||||
:aria-hidden="blank($page->image_alt) ? 'true' : null"
|
||||
loading="eager"
|
||||
@@ -57,7 +57,8 @@ class="w-full h-auto lg:sticky lg:top-42"
|
||||
</h1>
|
||||
|
||||
@if (filled($page->intro))
|
||||
<p class="max-w-xl" data-stoic="pages/faq#intro">{{ $page->intro }}</p>
|
||||
{{-- Inline markdown, so the editor can add links. --}}
|
||||
<p class="max-w-xl [&_a]:underline" data-stoic="pages/faq#intro">{!! Str::inlineMarkdown($page->intro) !!}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@@ -75,10 +76,10 @@ class="w-full h-auto lg:sticky lg:top-42"
|
||||
<summary class="flex cursor-pointer list-none items-center gap-4 border-b border-transparent py-4 font-display text-2xl font-bold group-open:border-black [&::-webkit-details-marker]:hidden">
|
||||
<span class="w-8 shrink-0 tabular-nums" aria-hidden="true">{{ str_pad($number, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span class="flex-1" data-stoic="faqs/{{ $faq->slug }}#name">{{ $faq->name }}</span>
|
||||
<x-ui.icon name="chevron-down" size="22" class="transition-transform duration-300 group-open:rotate-180" />
|
||||
<x-ui.icon name="chevron-down" size="40" class="transition-transform duration-300 group-open:rotate-180" />
|
||||
</summary>
|
||||
|
||||
<div class="legal-content pt-4 pb-6 pl-12 text-base" data-stoic="faqs/{{ $faq->slug }}#body">
|
||||
<div class="legal-content pt-4 pb-6 pl-12" data-stoic="faqs/{{ $faq->slug }}#body">
|
||||
{!! $faq->answer !!}
|
||||
</div>
|
||||
</details>
|
||||
|
||||
Reference in new issue
Block a user