ldc-legaulois/resources/views/components/club/choice-recipe-section.blade.php
2026-05-13 16:23:48 +02:00

132 lines
4.9 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@props([
'alreadyParticipated' => false,
'readonly' => false,
])
@php
$choices = [
[
'value' => 1,
'image' => Vite::asset('resources/assets/images/golden-crush/recipe1.png'),
'title' => 'LOREM IPSUM DOLOR<br>SIT AMET',
'deco_left' => Vite::asset('resources/assets/images/golden-crush/left-nuggets.png'),
'deco_right' => Vite::asset('resources/assets/images/golden-crush/cb.png'),
],
[
'value' => 2,
'image' => Vite::asset('resources/assets/images/golden-crush/recipe2.png'),
'title' => 'LOREM IPSUM DOLOR<br>SIT AMET',
'deco_left' => Vite::asset('resources/assets/images/golden-crush/left-nuggets.png'),
'deco_right' => Vite::asset('resources/assets/images/golden-crush/cb.png'),
],
];
@endphp
<section id="vote-section" class="vote-section">
<div class="container">
{{-- MODAL (hors zone grisée) --}}
@if ($alreadyParticipated)
<div class="vote-already-modal">
<p class="vote-already-modal-text mb-0">
votre vote a déjà <br>été enregistré.
</p>
</div>
@endif
{{-- CONTENU grisé --}}
<div class="
vote-content
{{ $readonly ? 'vote-section--readonly' : '' }}
{{ $alreadyParticipated ? 'vote-is-locked' : '' }}
">
@if (!$readonly)
<form action="{{ route('club.golden-crush.store') }}" method="POST">
@csrf
@endif
<div class="line row justify-content-center g-4 g-xl-5">
@foreach ($choices as $choice)
<div class="col-12 col-md-6 col-xl-4 d-flex justify-content-center">
@if ($readonly)
<div class="vote-card vote-card--readonly">
@else
<label class="vote-card">
@endif
@if (!$readonly)
<input type="radio" name="choice" value="{{ $choice['value'] }}" class="vote-card-input">
@endif
<span class="vote-card-inner">
<img src="{{ $choice['image'] }}" class="vote-card-img" alt="">
<span class="vote-card-footer {{ $readonly ? 'vote-card-footer--readonly' : '' }}">
<span class="vote-card-title">
{!! $choice['title'] !!}
</span>
@if (!$readonly)
<span class="vote-card-check" aria-hidden="true">
<i class="fa-solid fa-check"></i>
</span>
@endif
</span>
</span>
<img src="{{ $choice['deco_left'] }}" class="vote-card-deco vote-card-deco--left"
aria-hidden="true" alt="">
<img src="{{ $choice['deco_right'] }}" class="vote-card-deco vote-card-deco--right"
aria-hidden="true" alt="">
@if ($readonly)
</div>
@else
</label>
@endif
</div>
@endforeach
</div>
@if (!$readonly)
<div class="vote-rules-wrap">
<label class="vote-rules">
<input type="checkbox" name="rules_accepted" class="vote-rules-input" value="1">
<span class="vote-rules-box" aria-hidden="true">
<i class="fa-solid fa-check"></i>
</span>
<span>
J’ai lu et j’accepte <a href="{{ route('fo.rules.show') }}" target="_blank">le règlement du jeu*</a>
</span>
</label>
</div>
<div class="text-center mt-5">
<button type="submit" class="vote-submit">
<span class="vote-submit-triangle vote-submit-triangle--blue"></span>
<span class="vote-submit-triangle vote-submit-triangle--white-left"></span>
<span class="vote-submit-triangle vote-submit-triangle--white-right"></span>
<span class="vote-submit-triangle vote-submit-triangle--yellow-left"></span>
<span class="vote-submit-triangle vote-submit-triangle--yellow-right"></span>
<span class="vote-submit-label">
VALIDER MA PARTICIPATION
</span>
</button>
</div>
@endif
@if (!$readonly)
</form>
@endif
</div>
</div>
</section>