mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
split into modules
This commit is contained in:
52
resources/views/livewire/library/library-table.blade.php
Normal file
52
resources/views/livewire/library/library-table.blade.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<div class="bg-21gray flex flex-col h-screen justify-between">
|
||||
{{-- HEADER --}}
|
||||
<livewire:frontend.header :country="$country"/>
|
||||
{{-- MAIN --}}
|
||||
<section class="w-full mb-12">
|
||||
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10" id="table">
|
||||
|
||||
<div class="relative border-b border-gray-200 pb-5 sm:pb-0">
|
||||
<div class="md:flex md:items-center md:justify-between">
|
||||
@if(request()->route()->getName() === 'library.table.lecturer')
|
||||
<h3 class="text-2xl font-medium leading-6 text-gray-200">Dozenten-Bibliotheken</h3>
|
||||
@else
|
||||
<h3 class="text-2xl font-medium leading-6 text-gray-200">Bibliotheken</h3>
|
||||
@endif
|
||||
</div>
|
||||
<div class="mt-4">
|
||||
<!-- Dropdown menu on small screens -->
|
||||
{{--<div class="sm:hidden">
|
||||
<label for="current-tab" class="sr-only">Select a tab</label>
|
||||
<select id="current-tab" name="current-tab" class="block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-amber-500 focus:outline-none focus:ring-amber-500 sm:text-sm">
|
||||
<option>Applied</option>
|
||||
<option>Phone Screening</option>
|
||||
<option>Interview</option>
|
||||
<option>Offer</option>
|
||||
<option>Hired</option>
|
||||
</select>
|
||||
</div>--}}
|
||||
<!-- Tabs at small breakpoint and up -->
|
||||
<div class="hidden sm:block">
|
||||
<nav class="-mb-px flex space-x-8">
|
||||
@foreach($libraries as $library)
|
||||
@php
|
||||
$currentLibraryClass = $currentTab === $library['name'] ? 'border-amber-500 text-amber-600' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300';
|
||||
@endphp
|
||||
<a href="{{ route(request()->route()->getName(), ['country' => $country, 'currentTab' => $library['name']]) }}"
|
||||
class="{{ $currentLibraryClass }} whitespace-nowrap pb-4 px-1 border-b-2 font-medium text-sm">{{ $library['name'] }}</a>
|
||||
@endforeach
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<livewire:library.search-by-tag-component/>
|
||||
<div class="my-12">
|
||||
|
||||
<livewire:tables.library-item-table :currentTab="$currentTab"/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{-- FOOTER --}}
|
||||
<livewire:frontend.footer/>
|
||||
</div>
|
||||
@@ -0,0 +1,54 @@
|
||||
<div
|
||||
class="flex overflow-auto relative flex-wrap gap-x-5 gap-y-6 justify-center p-0 mx-auto mt-8 mb-3 w-full font-normal leading-6 text-white align-baseline border-0 border-solid md:mx-auto md:mb-0 md:max-w-screen-md"
|
||||
style="max-width: 1350px; font-size: 128%; background-position: 0px center; max-height: 500px; list-style: outside;"
|
||||
>
|
||||
@foreach($tags->sortBy('name') as $tag)
|
||||
<div
|
||||
class="flex flex-1 justify-center p-0 m-0 leading-6 text-center align-baseline border-0 border-solid"
|
||||
style="font-size: 128%; background-position: 0px center; list-style: outside;"
|
||||
>
|
||||
@php
|
||||
$isActive = collect($table)->pluck('tag')->collapse()->contains($tag->name);
|
||||
$activeClass = $isActive ? 'text-amber-500 bg-amber-500' : 'bg-blue-50 text-white hover:text-amber-500';
|
||||
@endphp
|
||||
<a
|
||||
class="{{ $activeClass }} flex relative flex-col flex-shrink-0 justify-between py-1 px-3 w-full h-20 border-0 border-solid duration-300 ease-in-out cursor-pointer bg-opacity-[0.07]"
|
||||
href="{{ route(request()->route()->getName(), ['country' => $country, 'table' => ['filters' => ['tag' => [$tag->id]]]]) }}"
|
||||
>
|
||||
<div
|
||||
class="flex flex-1 items-center p-0 m-0 text-center align-baseline border-0 border-solid"
|
||||
>
|
||||
<div
|
||||
class="flex flex-shrink-0 justify-center p-0 my-0 mr-4 ml-0 align-baseline border-0 border-solid"
|
||||
>
|
||||
<i class="fa fa-thin fa-{{ $tag->icon }} text-4xl"></i>
|
||||
</div>
|
||||
<div
|
||||
class="flex justify-between p-0 m-0 w-full align-baseline border-0 border-solid md:block lg:w-auto"
|
||||
>
|
||||
<h2
|
||||
class="p-0 m-0 font-sans text-base font-semibold tracking-wide leading-tight text-left align-baseline border-0 border-solid"
|
||||
style="background-position: 0px center; list-style: outside;"
|
||||
>
|
||||
{{ $tag->name }}
|
||||
</h2>
|
||||
<div
|
||||
class="hidden p-0 m-0 text-sm leading-3 text-left text-blue-100 align-baseline border-0 border-solid md:block md:text-blue-100 whitespace-nowrap"
|
||||
>
|
||||
{{ $tag->libraryItems->pluck('lecturer.name')->unique()->count() }}
|
||||
Dozenten
|
||||
<span
|
||||
class="inline-block relative top-px py-0 px-1 m-0 text-xs leading-4 align-baseline border-0 border-solid"
|
||||
>
|
||||
•
|
||||
</span>
|
||||
{{ $tag->library_items_count }}
|
||||
Inhalte
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a
|
||||
>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
Reference in New Issue
Block a user