initial commit
This commit is contained in:
commit
1e1aa7d461
215 changed files with 35140 additions and 0 deletions
5
resources/views/components/alert.blade.php
Normal file
5
resources/views/components/alert.blade.php
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
@props(['type', 'message'])
|
||||
|
||||
<div class="px-4 py-2 rounded border text-{{ $type }}-800 bg-{{ $type }}-200 border-{{ $type }}-300">
|
||||
{!! $message !!}
|
||||
</div>
|
||||
3
resources/views/components/button.blade.php
Normal file
3
resources/views/components/button.blade.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
@props(['element' => 'button'])
|
||||
|
||||
<{{ $element }} {{ $attributes->merge(['class' => 'cursor-pointer inline-block text-white bg-indigo-400 px-3 py-1 rounded transition-colors hover:bg-indigo-500']) }}>{{ $slot}}</{{ $element }}>
|
||||
27
resources/views/components/character-card.blade.php
Normal file
27
resources/views/components/character-card.blade.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
@props(['character', 'destroy' => false])
|
||||
|
||||
<div class="flex justify-between rounded p-2 bg-class-{{ $character->class }}">
|
||||
<div>
|
||||
<div class="flex items-center">
|
||||
<x-class-icon class="w-8 h-8" :name="$character->class" />
|
||||
<a href="{{ route('character.show', ['character' => $character ]) }}" class="text-2xl ml-2">{{ $character->level }} {{ $character->name }}</a>
|
||||
</div>
|
||||
<p>{{ Str::ucfirst($character->class) }}</p>
|
||||
</div>
|
||||
|
||||
<div class="flex gap-1">
|
||||
@foreach($character->professions as $ch_prof)
|
||||
<a href="{{ route('character.profession.show', [ 'character' => $character, 'profession' => $ch_prof->profession ]) }}">
|
||||
<x-profession-icon class="border border-black rounded-full w-6 h-6" :name="$ch_prof->name" />
|
||||
</a>
|
||||
@endforeach
|
||||
|
||||
@if ($destroy)
|
||||
<x-form :action="$destroy" method="DELETE">
|
||||
<a href="#" onclick="this.closest('form').submit();return false;">
|
||||
<x-icon name="cross" class="h-6 h-6 text-gray-100 rounded bg-black bg-opacity-25 hover:text-gray-200 hover:bg-opacity-30 "/>
|
||||
</a>
|
||||
</x-form>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
6
resources/views/components/character-link.blade.php
Normal file
6
resources/views/components/character-link.blade.php
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
@props(['href', 'character', 'iconsize' => 5])
|
||||
|
||||
<x-link {{ $attributes->merge(['class' => 'flex items-center', 'href' => $href ]) }}>
|
||||
<x-class-icon class="w-{{ $iconsize }} h-{{ $iconsize }} mr-1" :name="$character->class" />
|
||||
<span>{{ $character->name }}</span>
|
||||
</x-link>
|
||||
1
resources/views/components/class-icon.blade.php
Normal file
1
resources/views/components/class-icon.blade.php
Normal file
|
|
@ -0,0 +1 @@
|
|||
<img {{ $attributes->merge(['src' => $url, 'class' => 'border border-black rounded-full']) }}/>
|
||||
7
resources/views/components/empty-result.blade.php
Normal file
7
resources/views/components/empty-result.blade.php
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
@props(['title' => false])
|
||||
<div {{ $attributes->merge(['class' => 'select-none text-center py-6 border rounded text-gray-500 bg-gray-100 border-gray-200']) }}>
|
||||
@if ($title)
|
||||
<h2 class="text-3xl mb-2">{{ $title }}</h2>
|
||||
@endif
|
||||
<p>{{ $slot }}</p>
|
||||
</div>
|
||||
11
resources/views/components/form/form.blade.php
Normal file
11
resources/views/components/form/form.blade.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<form {!! $attributes->merge(['method' => $method]) !!}>
|
||||
@unless(in_array($method, ['HEAD', 'GET', 'OPTIONS']))
|
||||
@csrf
|
||||
@endunless
|
||||
|
||||
@if($spoofMethod)
|
||||
@method($spoofMethod)
|
||||
@endif
|
||||
|
||||
{!! $slot !!}
|
||||
</form>
|
||||
7
resources/views/components/form/inputs/input.blade.php
Normal file
7
resources/views/components/form/inputs/input.blade.php
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
<input type="{{ $type }}" name="{{ $name }}" value="{{ $value }}"
|
||||
{{ $attributes->merge(['class' => ($errors->has($name) ? 'border-red-400 ' : '') . 'w-full border rounded px-2 py-1 focus:ring-2']) }} {{ $disabled }} />
|
||||
|
||||
@error($name)
|
||||
<p class="ml-2 text-red-400 text-sm">{{ $message }}</p>
|
||||
@enderror
|
||||
9
resources/views/components/form/inputs/select.blade.php
Normal file
9
resources/views/components/form/inputs/select.blade.php
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<select {!! $attributes->merge(['class' => 'w-full border rounded p-1 focus:ring-2']) !!}>
|
||||
@forelse($options as $key => $option)
|
||||
<option value="{{ $key }}">
|
||||
{{ $option }}
|
||||
</option>
|
||||
@empty
|
||||
{!! $slot !!}
|
||||
@endforelse
|
||||
</select>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
<textarea name="{{ $name }}"
|
||||
{{ $attributes->merge(['class' => ($errors->has($name) ? 'border-red-400 ' : '') . 'w-full border rounded px-2 py-1 focus:ring-2']) }} {{ $disabled }}>{{ $value }}</textarea>
|
||||
|
||||
@error($name)
|
||||
<p class="ml-2 text-red-400 text-sm">{{ $message }}</p>
|
||||
@enderror
|
||||
1
resources/views/components/form/label.blade.php
Normal file
1
resources/views/components/form/label.blade.php
Normal file
|
|
@ -0,0 +1 @@
|
|||
<label {{ $attributes->merge(['class' => 'text-sm']) }}>{{ $slot }}</label>
|
||||
1
resources/views/components/link.blade.php
Normal file
1
resources/views/components/link.blade.php
Normal file
|
|
@ -0,0 +1 @@
|
|||
<a {{ $attributes->merge(['class' => 'text-indigo-400 hover:underline']) }}>{{ $slot}}</a>
|
||||
14
resources/views/components/nav-link.blade.php
Normal file
14
resources/views/components/nav-link.blade.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
@props(['active' => false])
|
||||
@php
|
||||
|
||||
$classes = 'cursor-pointer px-2 py-1 rounded xl:flex items-center text-sm tracking-normal hidden';
|
||||
|
||||
if ($active) {
|
||||
$classes .= ' bg-gray-900 text-indigo-300';
|
||||
} else {
|
||||
$classes .= ' text-white hover:text-indigo-300 hover:bg-gray-900';
|
||||
}
|
||||
|
||||
@endphp
|
||||
|
||||
<li><a {{ $attributes->merge(['class' => $classes]) }}>{{ $slot }}</a></li>
|
||||
7
resources/views/components/notifications.blade.php
Normal file
7
resources/views/components/notifications.blade.php
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
@if ($messages)
|
||||
<div class="px-4 pt-4 space-y-2">
|
||||
@foreach($messages as $type => $message)
|
||||
<x-alert :type="$type" :message=$message />
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
3
resources/views/components/profession-icon.blade.php
Normal file
3
resources/views/components/profession-icon.blade.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<div>
|
||||
<!-- The only way to do great work is to love what you do. - Steve Jobs -->
|
||||
</div>
|
||||
3
resources/views/components/section-heading.blade.php
Normal file
3
resources/views/components/section-heading.blade.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<div class="flex items-end justify-between px-2 py-2 mb-2 border-b">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
Reference in a new issue