%PDF- %PDF-
Direktori : /mnt/tnb2/git/loslex/resources/views/contests/ |
Current File : //mnt/tnb2/git/loslex/resources/views/contests/show.blade.php |
<x-app-layout> <x-slot name="header"> <h2 class="font-semibold text-xl text-gray-800 leading-tight">{{ $contest->contestname }}</h2> </x-slot> <div class="w-full lg:w-3/4 m-auto"> <div class="justify-center items-baseline text-xl font-bold flex"> {{$contest->contestname}} <x-dropdown> <x-slot name="trigger"> <button class="ml-2"> <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 text-gray-400" viewBox="0 0 20 20" fill="currentColor"> <path d="M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z" /> </svg> </button> </x-slot> <x-slot name="content"> <x-dropdown-link :href="route('contest.edit', $contest->id)">{{ __('Edit contest') }}</x-dropdown-link> <x-dropdown-link :href="route('contest.maintain', $contest->id)">{{ __('Contest maintenance') }}</x-dropdown-link> <x-dropdown-link :href="route('contest.publish', $contest->id)">@if ($contest->published) {{ __('Unpublish contest') }} @else {{ __('Publish contest') }} @endif</x-dropdown-link> </x-slot> </x-dropdown> </div> @if (!$contest->published) <div class="justify-center items-baseline text-xl font-bold flex"> <span class="text-base">{{__('(Not published!)')}}</span> </div> @endif <div class="grid grid-cols-auto lg:grid-cols-fitfirst gap-x-2 lg:gap-x-4 gap-y-1"> <div class="text-right font-bold align-top">{{__('Range')}}:</div> <div>{{$contest->range->name}}</div> <div class="text-right font-bold align-top">{{__('Date')}}:</div> <div>{{$contest->date->isoFormat('LL')}}</div> <div class="text-right font-bold align-top">{{__('Contest director')}}:</div> <div>{{$contest->director->displayname}}</div> <div class="text-right font-bold align-top">{{__('Range master')}}:</div> <div>{{$contest->rangemaster->displayname}}</div> <div class="text-right font-bold align-top">{{__('Entry fees')}}</div> <div> <div>{{ __('Basic entry fee') }}: {{ $contest->feebasic }} Kč</div> @if($contest->feelex) <div>{{ __('LEX members entry fee') }}: {{ $contest->feelex }} Kč</div> @endif </div> <div class="text-right font-bold align-top">{{__('Number of stages')}}:</div> <div>{{$contest->stages}}</div> <div class="text-right font-bold align-top">{{__('Presentation')}}:</div> <div> @if ($contest->squadshootstyle == 'together') {{ $contest->presentation_start[0] }} - {{ $contest->presentation_end[0] }}<br/> @else @for ($i = 1; $i <= $contest->squads; $i++) Squad {{$i}}: {{ $contest->presentation_start[$i] }} - {{ $contest->presentation_end[$i] }}<br/> @endfor @endif </div> <div class="text-right font-bold align-top">{{__('Contest duration')}}:</div> <div> @if ($contest->squadshootstyle == 'together') {{ $contest->contest_start[0] }} - {{ $contest->contest_end[0] }}<br/> @else @for ($i = 1; $i <= $contest->squads; $i++) Squad {{$i}}: {{ $contest->contest_start[$i] }} - {{ $contest->contest_end[$i] }}<br/> @endfor @endif </div> <div class="text-right font-bold align-top">{{__('Capacity')}}:</div> <div>{{ $contest->capacity - $contest->registrations->count() }} / {{ $contest->capacity }} <span class="text-xs">{{__('(plus referees)')}}</span></div> <div class="text-right font-bold align-top">{{__('Registration')}}:</div> <div> @if ($contest->isBeforeReg) {{__('Registration will start on :date', ['date' => $contest->registration_start->isoFormat('LL HH:mm')])}} @elseif ($contest->isAfterReg) {{__('Registration finished.')}} @else {{__('Registration will end on :date', ['date' => $contest->registration_end->isoFormat('LL HH:mm')])}}<br/> (<x-countdown class="!inline text-xs" :expires="$contest->registration_end"/>) @endif @guest @if (!$contest->isAfterReg) <div class="text-sm">{!! __('To register for the contest you need to <a class="font-bold" href=":loginurl">log in</a> or <a class="font-bold" href=":registerurl">create new account</a>', ['loginurl' => route('login'), 'registerurl' => route('register')]) !!}</div> @endif @endguest </div> <div class="text-right font-bold align-top">{{__('Calibration weapon')}}:</div> <div>{{ $contest->calibrationwpn }}</div> <div class="font-bold col-span-2 lg:col-span-1 lg:text-right">{{__('Instructions')}}:</div> <div class="col-span-2 lg:col-span-1" x-data="{open : false}"> @if (substr_count($contest->instructions, "\n") <= 3 && Str::wordCount($contest->instructions) < 100) <div class="text-sm overflow-x-auto">{!! nl2br($contest->instructions) !!}</div> @else <div class="text-sm overflow-x-auto" :class="open ? 'line-clamp-none' : 'line-clamp-3'"> <div class="text-center lg:text-left italic cursor-pointer mt-2" x-show="!open" x-on:click="open = !open">{{__('Click to expand...')}}</div> {!! nl2br($contest->instructions) !!} <div class="text-center lg:text-left italic cursor-pointer mt-2" x-show="open" x-on:click="open = !open">{{__('Click to shrink...')}}</div> </div> @endif </div> <div class="text-right font-bold align-top">{{__('Secret stages')}}:</div> <div>{{ __('contest.' . \App\Enums\ContestOptionsEnum::from($contest->secretstages)->name) }}</div> <div class="text-right font-bold align-top">{{__('Flashlight needed')}}:</div> <div>{{ __('contest.' . \App\Enums\ContestOptionsEnum::from($contest->flashlight)->name) }}</div> <div class="font-bold col-span-2 lg:col-span-1 lg:text-right">{{__('Other requirements/restrictions')}}:</div> <div class="col-span-2 lg:col-span-1"> <div class="text-sm overflow-x-auto">{!! nl2br($contest->restrictionstext) !!}</div> </div> </div> </div> <div class="w-full lg:w-3/4 mt-6 m-auto"> @auth @if($contest->isRegActive) <div class="border-t pt-2">@include('contests.registration')</div> @elseif ($contest->isAfterReg) <div class="border-t pt-2">@include('contests.regoverview')</div> @endif @endauth @guest <div class="border-t pt-2">@include('contests.regoverview')</div> @endguest </div> </x-app-layout>