33 lines
1.5 KiB
PHP
33 lines
1.5 KiB
PHP
<div>
|
|
@if ($pollId)
|
|
<div class="border-b border-theme-primary bg-theme-background p-6 sm:px-20">
|
|
@include('post-header', ['title' => __('Poll')])
|
|
<div class="my-6 space-y-4">
|
|
<div>
|
|
<a href="{{ route('poll.show', ['slug' => $slug]) }}" class="text-xl font-semibold text-theme-primary hover:text-theme-secondary">
|
|
{{ $title }}
|
|
</a>
|
|
@if ($excerpt)
|
|
<p class="mt-2 text-base text-theme-primary">{{ $excerpt }}</p>
|
|
@endif
|
|
</div>
|
|
@if ($questionCount > 1)
|
|
{{-- Several questions: answered on the poll page --}}
|
|
<div>
|
|
<x-jetstream.button onclick="window.location.href = '{{ route('poll.show', ['slug' => $slug]) }}'" class="bg-theme-brand hover:bg-opacity-80">
|
|
{{ __('Take part') }}
|
|
</x-jetstream.button>
|
|
</div>
|
|
@else
|
|
@if ($hasContent)
|
|
<a href="{{ route('poll.show', ['slug' => $slug]) }}" class="inline-block text-sm text-theme-primary underline hover:text-theme-secondary">
|
|
{{ __('Read more') }}...
|
|
</a>
|
|
@endif
|
|
<livewire:polls.poll-form :pollId="$pollId" context="card" :wire:key="'main-poll-'.$pollId" />
|
|
@endif
|
|
</div>
|
|
</div>
|
|
@endif
|
|
</div>
|