39 lines
1.6 KiB
PHP
39 lines
1.6 KiB
PHP
<div class="m-5 py-10">
|
|
<p class="text-3xl mb-5 text-center">Lists</p>
|
|
<div class="bg-gray-800 p-5 flex flex-col gap-5 items-center rounded">
|
|
<div class="w-full flex flex-col gap-2">
|
|
<h2 class="text-xl font-bold">Add List</h2>
|
|
@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
|
|
|
|
<form class="flex flex-col mx-auto" wire:submit.prevent="addList">
|
|
<label for="list_name">Name</label>
|
|
<div class="flex">
|
|
<input name="list_name" class="text-black bg-white p-3 rounded rounded-r-none" type="text"
|
|
wire:model="form.name">
|
|
<button type="submit" class="bg-green-400 text-white px-4 py-2 rounded rounded-l-none">Add</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<ul class="w-full flex flex-col gap-5 justify-between">
|
|
@foreach($lists as $list)
|
|
<li class="grid grid-cols-2 gap-5 text-center">
|
|
<div><a href="/lists/{{$list->id}}" wire:navigate>{{$list->name}}</a></div>
|
|
<div>
|
|
<label for="is_public">Public</label>
|
|
<input name="is_public" type="checkbox" value="is_public" wire:model="form.is_public"/>
|
|
</div>
|
|
</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|