Archived
1
0
Fork 0

initial commit

This commit is contained in:
Henrik Hautakoski 2021-06-28 17:33:29 +01:00
commit 1e1aa7d461
215 changed files with 35140 additions and 0 deletions

View file

@ -0,0 +1,38 @@
<x-form wire:submit.prevent="save">
<div class="grid grid-cols-2 gap-4">
<div>
<x-form.label for="name">{{ __('Name') }}</x-form.label>
<x-input wire:model="name" name="name" label="name" />
</div>
<div>
<x-form.label for="level">{{ __('Level') }}</x-form.label>
<x-input wire:model="level" name="level" label="level" />
</div>
</div>
<div class="grid grid-cols-3 gap-4 mt-2">
<div>
<x-form.label for="race">{{ __('Race') }}</x-form.label>
<x-select wire:model="race" name="race" :options="$races" />
</div>
<div>
<x-form.label for="gender">{{ __('Gender') }}</x-form.label>
<x-select name="gender" :options="$genders" />
</div>
<div>
<x-form.label for="class" >{{ __('Class') }}</x-form.label>
<x-select wire:model="class" name="class" :options="$classes" />
</div>
</div>
<div class="mt-2">
<x-button element="input" type="submit" value="Save" />
</div>
</x-form>

View file

@ -0,0 +1,50 @@
<div>
<div class="grid grid-cols-3 gap-4 mb-2">
<x-input wire:model="name" name="name" placeholder="Recipe" />
<x-input wire:model="crafter" name="crafter" placeholder="Crafter" />
<x-select wire:model="profession" name="profession" :options="$profession_options" />
</div>
@if ($recipes->count())
<table class="w-full whitespace-nowrap">
<thead>
<tr tabindex="0" class="focus:outline-none w-full text-sm leading-none text-gray-800">
<th class="text-left px-3 py-4">Recipe</th>
<th class="text-left px-3 py-4">Profession</th>
<th class="text-left px-3 py-4">Crafters</th>
</tr>
</thead>
<tbody class="w-full">
@foreach($recipes as $recipe)
<tr class="focus:outline-none text-sm leading-none text-gray-800 bg-white hover:bg-gray-100 border-b border-t border-gray-100">
<td class="px-3 py-4"><x-link href="{{ route('recipe.show', [ 'recipe' => $recipe ]) }}">{{ $recipe->name }}</x-link></td>
<td class="px-3 py-4 flex items-center">
<x-profession-icon class="w-4 h-4 mr-1" :name="$recipe->profession->name" />
{{ $recipe->profession->name }}
</td>
<td class="px-3 py-4">
@if ($recipe->crafters->count() > 0)
<ul class="flex flex-wrap gap-2">
@foreach($recipe->crafters as $crafter)
<li>
<x-character-link :character="$crafter" href="{{ route('character.profession.show', ['character' => $crafter, 'profession' => $recipe->profession ]) }}" />
</li>
@endforeach
</ul>
@else
<span class="text-gray-400">{{ __('None') }}</span>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4">
{{ $recipes->links() }}
</div>
@else
<x-empty-result>No recipes found</x-empty-result>
@endif
</div>