|
| 1 | +<div class="flex flex-col h-full"> |
| 2 | + <flux:breadcrumbs class="mb-6"> |
| 3 | + <flux:breadcrumbs.item :href="route('dashboard')" wire:navigate class="hidden md:flex"> |
| 4 | + {{ __('Home') }} |
| 5 | + </flux:breadcrumbs.item> |
| 6 | + <flux:breadcrumbs.item :href="route('decks.index')" wire:navigate class="hidden md:flex"> |
| 7 | + {{ __('My Decks') }} |
| 8 | + </flux:breadcrumbs.item> |
| 9 | + <flux:breadcrumbs.item :href="route('cards.index', $deck)" wire:navigate class="hidden md:flex"> |
| 10 | + {{ $deck->name }} |
| 11 | + </flux:breadcrumbs.item> |
| 12 | + <flux:breadcrumbs.item> |
| 13 | + {{ __('Study Deck') }} |
| 14 | + </flux:breadcrumbs.item> |
| 15 | + </flux:breadcrumbs> |
| 16 | + |
| 17 | + <flux:separator variant="subtle" class="mb-6"/> |
| 18 | + |
| 19 | + <div class="flex-1 flex justify-center"> |
| 20 | + <div class="max-w-md w-full flex-1 flex flex-col justify-between"> |
| 21 | + @if($currentCardIndex < $totalCards) |
| 22 | + <div class="flex flex-col space-y-6"> |
| 23 | + <div> |
| 24 | + {{ $currentCardIndex + 1 }} / {{ $totalCards }} Cards |
| 25 | + </div> |
| 26 | + |
| 27 | + <div class="w-full bg-gray-200 rounded-full h-4 overflow-hidden"> |
| 28 | + <div class="bg-blue-600 h-4" style="width: {{ $this->progress }}%"></div> |
| 29 | + </div> |
| 30 | + |
| 31 | + <div class="text-center"> |
| 32 | + {{ $this->currentCard['question'] }} |
| 33 | + </div> |
| 34 | + |
| 35 | + @if($this->currentCard['answerRevealed']) |
| 36 | + <div class="text-center"> |
| 37 | + {{ $this->currentCard['answer'] }} |
| 38 | + </div> |
| 39 | + @else |
| 40 | + <div class="text-center"> |
| 41 | + <flux:button variant="primary" class="w-min" wire:click="revealAnswer()"> |
| 42 | + {{ __('Reveal Answer') }} |
| 43 | + </flux:button> |
| 44 | + </div> |
| 45 | + @endif |
| 46 | + </div> |
| 47 | + |
| 48 | + @if($this->currentCard['answerRevealed']) |
| 49 | + <div class="flex flex-col gap-4 justify-center items-center"> |
| 50 | + <flux:button |
| 51 | + icon="hand-thumb-up" |
| 52 | + variant="primary" |
| 53 | + class="w-min" |
| 54 | + wire:click="setAnsweredCorrectly(true)" |
| 55 | + > |
| 56 | + {{ __('I got it right!') }} |
| 57 | + </flux:button> |
| 58 | + <flux:button |
| 59 | + icon="hand-thumb-down" |
| 60 | + variant="primary" |
| 61 | + color="red" |
| 62 | + class="w-min" |
| 63 | + wire:click="setAnsweredCorrectly(false)" |
| 64 | + > |
| 65 | + {{ __('Maybe next time...') }} |
| 66 | + </flux:button> |
| 67 | + </div> |
| 68 | + @endif |
| 69 | + @else |
| 70 | + <div class="flex flex-col gap-6 justify-center items-center h-full"> |
| 71 | + <div> |
| 72 | + Score: {{ $this->score }} / {{ $totalCards }} |
| 73 | + </div> |
| 74 | + <flux:button |
| 75 | + icon="arrow-uturn-left" |
| 76 | + variant="primary" |
| 77 | + :href="route('cards.index', $deck)" |
| 78 | + wire:navigate |
| 79 | + > |
| 80 | + {{ $deck->name }} |
| 81 | + </flux:button> |
| 82 | + </div> |
| 83 | + @endif |
| 84 | + </div> |
| 85 | + </div> |
| 86 | +</div> |
0 commit comments