WIP
This commit is contained in:
@@ -1,35 +1,20 @@
|
||||
@push('menu')
|
||||
<x-menu-action tooltip="Einstellungen">
|
||||
<svg class="w-5 h-5 mb-1 text-gray-500 dark:text-gray-400 group-hover:text-blue-600 dark:group-hover:text-blue-500" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 12.25V1m0 11.25a2.25 2.25 0 0 0 0 4.5m0-4.5a2.25 2.25 0 0 1 0 4.5M4 19v-2.25m6-13.5V1m0 2.25a2.25 2.25 0 0 0 0 4.5m0-4.5a2.25 2.25 0 0 1 0 4.5M10 19V7.75m6 4.5V1m0 11.25a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5ZM16 19v-2"/>
|
||||
</svg>
|
||||
</x-menu-action>
|
||||
<div class="flex items-center justify-center">
|
||||
<x-drawer-trigger target="image-add" action="open">
|
||||
<button data-tooltip-target="tooltip-new" type="button" class="inline-flex items-center justify-center w-10 h-10 font-medium bg-blue-600 rounded-full hover:bg-blue-700 group focus:ring-4 focus:ring-blue-300 focus:outline-none dark:focus:ring-blue-800">
|
||||
<svg class="w-4 h-4 text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 18">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 1v16M1 9h16"/>
|
||||
</svg>
|
||||
<span class="sr-only">Add Images</span>
|
||||
</button>
|
||||
</x-drawer-trigger>
|
||||
</div>
|
||||
@if(!$album->hasProcessingMedia)
|
||||
<div id="tooltip-new" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700">
|
||||
Add images
|
||||
<div class="tooltip-arrow" data-popper-arrow></div>
|
||||
</div>
|
||||
@endif
|
||||
@endpush
|
||||
|
||||
<div>
|
||||
<x-hero-search></x-hero-search>
|
||||
<h1 class="mb-4 mx-8 text-4xl font-extrabold leading-none tracking-tight text-gray-900 md:text-5xl lg:text-6xl dark:text-white">
|
||||
{{ $album->name }}
|
||||
</h1>
|
||||
|
||||
<div id="album">
|
||||
<div class="m-8 flex flex-wrap flex-row gap-4" @if($album->hasProcessingMedia) wire:poll @endif>
|
||||
<div class="flex flex-wrap flex-row gap-4" @if($album->hasProcessingMedia) wire:poll @endif>
|
||||
<div class="relative rounded-lg overflow-hidden cursor-pointer h-80 flex-grow flex items-center justify-center sm:w-96 flex flex-col gap-1">
|
||||
@if(!$album->hasProcessingMedia)
|
||||
<x-drawer-trigger target="image-add" action="open" class="flex-grow w-full text-center bg-gray-300 dark:bg-gray-700 hover:opacity-80 flex items-center justify-center transition-opacity">
|
||||
<svg class="w-24 h-24 text-gray-200 dark:text-gray-600" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14m-7 7V5"/>
|
||||
</svg>
|
||||
</x-drawer-trigger>
|
||||
@endif
|
||||
<x-drawer-trigger target="image-add" action="open" class="flex-grow w-full text-center bg-gray-300 dark:bg-gray-700 hover:opacity-80 flex items-center justify-center transition-opacity">
|
||||
<svg class="w-24 h-24 text-gray-200 dark:text-gray-600" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M20 6H10m0 0a2 2 0 1 0-4 0m4 0a2 2 0 1 1-4 0m0 0H4m16 6h-2m0 0a2 2 0 1 0-4 0m4 0a2 2 0 1 1-4 0m0 0H4m16 6H10m0 0a2 2 0 1 0-4 0m4 0a2 2 0 1 1-4 0m0 0H4"/>
|
||||
</svg>
|
||||
</x-drawer-trigger>
|
||||
</div>
|
||||
@foreach ($images as $image)
|
||||
@if($image->isProcessing)
|
||||
<div wire:transition wire:key="placeholder_{{ $image->id }}" role="status" class="flex items-center justify-center h-80 flex-grow bg-gray-300 rounded-lg animate-pulse dark:bg-gray-700 min-w-80">
|
||||
@@ -48,6 +33,7 @@
|
||||
data-pswp-download="{{ $image->getDownload() }}"
|
||||
data-pswp-height="{{ $image->lightbox['height'] }}"
|
||||
data-cropped="true"
|
||||
data-is-cover="{{ $image->isCover ? 'true' : 'false' }}"
|
||||
data-id="{{ $image->id }}"
|
||||
wire:key="image_{{ $image->id }}"
|
||||
wire:transition
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="p-2 mt-8">
|
||||
<div class="text-center">
|
||||
<ul class="uppercase font-medium">
|
||||
<div>
|
||||
<div class="mb-8">
|
||||
<ul class="uppercase font-medium flex gap-12 justify-center">
|
||||
<x-category-filter-pill wire:click="setFilter(-1)" :active="$filter == null">
|
||||
Alle
|
||||
</x-category-filter-pill>
|
||||
@@ -13,19 +13,9 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="m-8 flex flex-wrap flex-row gap-4">
|
||||
@foreach ($categories as $category)
|
||||
@if($filter == null || $category->tags->contains($filter))
|
||||
<figure wire:transition wire:key="{{ $category->id }}" class="relative rounded-lg cursor-pointer h-80 flex-grow overflow-hidden">
|
||||
<a href="{{ route('category.show', $category) }}">
|
||||
<img class="max-h-full min-w-full align-bottom object-cover"
|
||||
src="{{ url($category->cover) }}" alt="{{ $category->name }} Cover">
|
||||
<figcaption class="absolute p-4 text-lg text-white top-1/2 bottom-0 bg-opacity-20 min-w-full bg-gradient-to-b from-transparent to-slate-900 flex flex-col-reverse">
|
||||
<span>{{ $category->name }}</span>
|
||||
</figcaption>
|
||||
</a>
|
||||
</figure>
|
||||
@endif
|
||||
<div class="flex flex-wrap flex-row gap-4 transition-opacity" wire:loading.class="opacity-0">
|
||||
@foreach ($this->categories as $category)
|
||||
<x-category.element :category="$category" wire:key="{{ $category->id }}"></x-category.element>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
43
resources/views/livewire/menu.blade.php
Normal file
43
resources/views/livewire/menu.blade.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<div class="w-full flex flex-row items-center justify-between mb-12">
|
||||
<div class="flex flex-row gap-4">
|
||||
<a href="javascript:history.back();">
|
||||
<svg class="w-8 h-8 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m15 19-7-7 7-7"/>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="/" wire:navigate>
|
||||
<svg class="w-8 h-8 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m4 12 8-8 8 8M6 10.5V19a1 1 0 0 0 1 1h3v-3a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3h3a1 1 0 0 0 1-1v-8.5"/>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
<h1 class="text-4xl font-extrabold leading-none tracking-tight text-gray-900 md:text-5xl lg:text-6xl dark:text-white inline-block relative after:absolute after:left-0 after:bottom-1 after:border-yellow-pfadi after:-z-10 after:border-4 dark:after:opacity-80 after:w-full text-black dark:text-white">
|
||||
{{ $title }}
|
||||
</h1>
|
||||
<div class="flex flex-row gap-4">
|
||||
<form class="relative text-right w-48">
|
||||
<input type="search" name="" placeholder="Search for..." class="peer absolute -top-1 right-0 block p-2.5 w-8 focus:w-48 text-sm text-gray-900 bg-gray-50 rounded-lg focus:ring-0 focus:border-2 focus:border-yellow-pfadi dark:bg-gray-700 dark:border-s-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white opacity-0 focus:opacity-100 transition-all">
|
||||
|
||||
<button type="submit" class="absolute top-0 right-0 pointer-events-none transition-colors peer-focus:opacity-0">
|
||||
<svg class="w-8 h-8 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"/>
|
||||
</svg>
|
||||
<span class="sr-only">Search</span>
|
||||
</button>
|
||||
</form>
|
||||
<div @click="darkMode = !darkMode"
|
||||
x-data="{darkMode: $persist(matchMedia('(prefers-color-scheme: dark)').matches).as('darkMode')}"
|
||||
x-init="$watch('darkMode', darkMode => document.documentElement.dataset.dark = darkMode)"
|
||||
class="w-8 h-8">
|
||||
<svg x-show="!darkMode" class="w-8 h-8 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" x-cloak>
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 21a9 9 0 0 1-.5-17.986V3c-.354.966-.5 1.911-.5 3a9 9 0 0 0 9 9c.239 0 .254.018.488 0A9.004 9.004 0 0 1 12 21Z"/>
|
||||
</svg>
|
||||
|
||||
<svg x-show="darkMode" class="w-8 h-8 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" x-cloak>
|
||||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 5V3m0 18v-2M7.05 7.05 5.636 5.636m12.728 12.728L16.95 16.95M5 12H3m18 0h-2M7.05 16.95l-1.414 1.414M18.364 5.636 16.95 7.05M16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z"/>
|
||||
</svg>
|
||||
<span x-show="!darkMode" class="sr-only">Dunkle Theme aktivieren</span>
|
||||
<span x-show="darkMode" class="sr-only">Helle Theme aktivieren</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user