movie-night-nuevo/resources/views/livewire/lists.blade.php

41 lines
1.7 KiB
PHP
Raw Permalink Normal View History

2025-12-13 19:33:52 -06:00
<div class="mt-5 w-full mx-auto flex flex-col gap-5">
<h1 class="font-bold text-3xl mx-2 sm:mx-0">Lists</h1>
<x-ui.card>
2025-12-12 23:07:04 -06:00
<div class="w-full flex flex-col gap-2">
@if ($errors->any())
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li class="text-red-500">{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
2025-12-13 19:33:52 -06:00
<form class="flex flex-col max-w-lg gap-2" wire:submit.prevent="addList">
<label class="font-bold" for="list_name">Add List</label>
2025-12-12 23:07:04 -06:00
<div class="flex">
2025-12-13 19:33:52 -06:00
<input name="list_name" placeholder="List Name"
class="flex-1 w-full text-black bg-white p-2 rounded rounded-r-none"
type="text"
2025-12-15 23:53:07 -06:00
wire:model.live="form.name">
2025-12-12 23:07:04 -06:00
<button type="submit" class="bg-green-400 text-white px-4 py-2 rounded rounded-l-none">Add</button>
</div>
</form>
</div>
2025-12-13 19:33:52 -06:00
<ul class="w-full flex flex-col gap-5">
2025-12-12 23:07:04 -06:00
@foreach($lists as $list)
2025-12-26 13:07:15 -06:00
<li class="flex py-5 justify-between text-center">
<a class="font-bold text-2xl" href="/lists/{{$list->id}}" wire:navigate>{{$list->name}}</a>
@if((bool)$list->is_public === true)
<i class="fa fa-earth" title="Public" aria-label="Public"></i>
@else
<i class="fa fa-lock" title="Private" aria-label="Private"></i>
@endif
2025-12-12 23:07:04 -06:00
</li>
@endforeach
</ul>
2025-12-13 19:33:52 -06:00
</x-ui.card>
2025-12-12 23:07:04 -06:00
</div>