This commit is contained in:
Benjamin Takats
2023-01-21 18:29:01 +01:00
parent d8a1b5e629
commit 829784e532
2 changed files with 29 additions and 43 deletions

View File

@@ -35,7 +35,7 @@ class LibraryItemObserver
// http://localhost/de/library/library-item?l=de&table[filters][id]=2 // http://localhost/de/library/library-item?l=de&table[filters][id]=2
if ($libraryItem->type !== 'markdown_article') { if ($libraryItem->type !== 'markdown_article') {
$text = sprintf("Es gibt was Neues zum Lesen oder Anhören:\n\n%s\n\n%s\n\n#Bitcoin #Event #Einundzwanzig #gesundesgeld", $text = sprintf("Es gibt was Neues zum Lesen oder Anhören:\n\n%s\n\n%s\n\n#Bitcoin #Wissen #Einundzwanzig #gesundesgeld",
$libraryItemName, $libraryItemName,
url()->route('article.view', url()->route('article.view',
['libraryItem' => $libraryItem->slug]), ['libraryItem' => $libraryItem->slug]),

View File

@@ -1,54 +1,40 @@
<div <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" class="flex overflow-auto relative flex-wrap gap-x-5 gap-y-1 justify-center p-0 mx-auto mt-2 mb-2 w-full font-normal 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 as $tag) @foreach($tags as $tag)
<div <div
class="flex flex-1 justify-center p-0 m-0 leading-6 text-center align-baseline border-0 border-solid" class="flex flex-wrap justify-center p-0 m-0 text-center align-baseline border-0 border-solid"
style="font-size: 128%; background-position: 0px center; list-style: outside;" style="font-size: 128%; background-position: 0px center; list-style: outside;"
> >
@php
$isActive = in_array($tag->id, $filters['tag'] ?? [], false);
$activeClass = $isActive ? 'text-amber-500 bg-amber-500' : 'bg-blue-50 text-white hover:text-amber-500';
@endphp
<a <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, 'filters' => ['tag' => [$tag->id]]]) }}" href="{{ route(request()->route()->getName(), ['country' => $country, 'filters' => ['tag' => [$tag->id]]]) }}"
> >
<div @if(in_array($tag->id, $filters['tag'] ?? [], false))
class="flex flex-1 items-center p-0 m-0 text-center align-baseline border-0 border-solid" <x-badge squared amber>
> <i class="fa fa-thin fa-{{ $tag->icon }}"></i>
<div {{ $tag->name }}
class="flex flex-shrink-0 justify-center p-0 my-0 mr-4 ml-0 align-baseline border-0 border-solid" {{ $tag->libraryItems->pluck('lecturer.name')->unique()->count() }}
> {{ __('Creator') }}
<i class="fa fa-thin fa-{{ $tag->icon }} text-4xl"></i> <span
</div> class="inline-block relative top-px py-0 px-1 m-0 text-xs leading-4 align-baseline border-0 border-solid"
<div ></span>
class="flex justify-between p-0 m-0 w-full align-baseline border-0 border-solid md:block lg:w-auto" {{ $tag->library_items_count }}
> {{ __('Entries') }}
<h2 </x-badge>
class="p-0 m-0 font-sans text-base font-semibold tracking-wide leading-tight text-left align-baseline border-0 border-solid" @else
style="background-position: 0px center; list-style: outside;" <x-badge squared gray>
> <i class="fa fa-thin fa-{{ $tag->icon }}"></i>
{{ $tag->name }} {{ $tag->name }}
</h2> {{ $tag->libraryItems->pluck('lecturer.name')->unique()->count() }}
<div {{ __('Creator') }}
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" <span
> class="inline-block relative top-px py-0 px-1 m-0 text-xs leading-4 align-baseline border-0 border-solid"
{{ $tag->libraryItems->pluck('lecturer.name')->unique()->count() }} ></span>
{{ __('Creator') }} {{ $tag->library_items_count }}
<span {{ __('Entries') }}
class="inline-block relative top-px py-0 px-1 m-0 text-xs leading-4 align-baseline border-0 border-solid" </x-badge>
> @endif
</a>
</span>
{{ $tag->library_items_count }}
{{ __('Entries') }}
</div>
</div>
</div>
</a
>
</div> </div>
@endforeach @endforeach
</div> </div>