ldc-theme-default/views/pages/participation/won.blade.php
2023-12-05 18:41:45 +01:00

44 lines
1.2 KiB
PHP

@extends('theme::layout')
@section('title', __('Vous avez gagné !'))
@section('description', __('Vous avez gagné un Lot cliquez sur la roue pour découvrir lequel'))
@section('main-class', 'won-page')
@section('content')
{{-- SPIN WHEEL --}}
@include('theme::pages.participation.parts.animation', [
'sectionId' => 'spin-animation',
'winDiscount' => !empty($prizeModel) ? false : true,
'prizeModel' => $prizeModel ?? null,
])
@if (!empty($prizeModel))
{{-- LOT --}}
@include('theme::pages.participation.parts.prize', [
'sectionId' => 'prize-section',
'prizeModel' => $prizeModel,
])
@elseif (!empty($discount))
{{-- COUPON --}}
@include('theme::pages.participation.parts.discount', [
'sectionId' => 'discount-section',
'discount' => $discount,
])
@else
@php
throw new \RuntimeException('Unhandled win case');
@endphp
@endif
@endsection
@push('scripts')
<script>
//set default degree (360*5)
var degree = 1800;
//number of clicks = 0
var clicks = 0;
var thisWinAngle = 1400;
</script>
@endpush