44 lines
1.2 KiB
PHP
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
|