mirror of
https://github.com/openclassify/openclassify.git
synced 2026-04-14 11:12:09 -05:00
- Complete rewrite using Laravel 12 framework - Modular architecture with nwidart/laravel-modules v11 - Modules: Category, Listing, Location, Profile - 8 top-level categories with 33 subcategories seeded - 6 sample listings seeded - 5 countries, 13 cities, districts seeded - Multi-language support: en, tr, ar, zh, es, fr, de, pt, ru, ja - Auth scaffolding via Laravel Breeze - Partner dashboard for user listing management - Tailwind CSS via CDN for styling - SQLite database for development - RTL support for Arabic locale Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
36 lines
1.2 KiB
PHP
36 lines
1.2 KiB
PHP
@props(['align' => 'right', 'width' => '48', 'contentClasses' => 'py-1 bg-white'])
|
|
|
|
@php
|
|
$alignmentClasses = match ($align) {
|
|
'left' => 'ltr:origin-top-left rtl:origin-top-right start-0',
|
|
'top' => 'origin-top',
|
|
default => 'ltr:origin-top-right rtl:origin-top-left end-0',
|
|
};
|
|
|
|
$width = match ($width) {
|
|
'48' => 'w-48',
|
|
default => $width,
|
|
};
|
|
@endphp
|
|
|
|
<div class="relative" x-data="{ open: false }" @click.outside="open = false" @close.stop="open = false">
|
|
<div @click="open = ! open">
|
|
{{ $trigger }}
|
|
</div>
|
|
|
|
<div x-show="open"
|
|
x-transition:enter="transition ease-out duration-200"
|
|
x-transition:enter-start="opacity-0 scale-95"
|
|
x-transition:enter-end="opacity-100 scale-100"
|
|
x-transition:leave="transition ease-in duration-75"
|
|
x-transition:leave-start="opacity-100 scale-100"
|
|
x-transition:leave-end="opacity-0 scale-95"
|
|
class="absolute z-50 mt-2 {{ $width }} rounded-md shadow-lg {{ $alignmentClasses }}"
|
|
style="display: none;"
|
|
@click="open = false">
|
|
<div class="rounded-md ring-1 ring-black ring-opacity-5 {{ $contentClasses }}">
|
|
{{ $content }}
|
|
</div>
|
|
</div>
|
|
</div>
|