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,5 @@
@props(['type', 'message'])
<div class="px-4 py-2 rounded border text-{{ $type }}-800 bg-{{ $type }}-200 border-{{ $type }}-300">
{!! $message !!}
</div>

View 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 }}>

View 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>

View 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>

View file

@ -0,0 +1 @@
<img {{ $attributes->merge(['src' => $url, 'class' => 'border border-black rounded-full']) }}/>

View 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>

View 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>

View 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

View 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>

View file

@ -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

View file

@ -0,0 +1 @@
<label {{ $attributes->merge(['class' => 'text-sm']) }}>{{ $slot }}</label>

View file

@ -0,0 +1 @@
<a {{ $attributes->merge(['class' => 'text-indigo-400 hover:underline']) }}>{{ $slot}}</a>

View 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>

View 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

View file

@ -0,0 +1,3 @@
<div>
<!-- The only way to do great work is to love what you do. - Steve Jobs -->
</div>

View file

@ -0,0 +1,3 @@
<div class="flex items-end justify-between px-2 py-2 mb-2 border-b">
{{ $slot }}
</div>