mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2025-12-14 12:06:46 +00:00
✨ Implement SeoTrait across components for improved SEO integration.
This commit is contained in:
@@ -2,10 +2,13 @@
|
||||
|
||||
use App\Models\Meetup;
|
||||
use App\Models\MeetupEvent;
|
||||
use App\Traits\SeoTrait;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Volt\Component;
|
||||
|
||||
new class extends Component {
|
||||
use SeoTrait;
|
||||
|
||||
public Meetup $meetup;
|
||||
public ?MeetupEvent $event = null;
|
||||
|
||||
@@ -56,7 +59,8 @@ new class extends Component {
|
||||
session()->flash('status', __('Event erfolgreich erstellt!'));
|
||||
}
|
||||
|
||||
$this->redirect(route('meetups.landingpage', ['meetup' => $this->meetup, 'country' => $this->country]), navigate: true);
|
||||
$this->redirect(route('meetups.landingpage', ['meetup' => $this->meetup, 'country' => $this->country]),
|
||||
navigate: true);
|
||||
}
|
||||
|
||||
public function delete(): void
|
||||
@@ -64,7 +68,8 @@ new class extends Component {
|
||||
if ($this->event) {
|
||||
$this->event->delete();
|
||||
session()->flash('status', __('Event erfolgreich gelöscht!'));
|
||||
$this->redirect(route('meetups.landingpage', ['meetup' => $this->meetup, 'country' => $this->country]), navigate: true);
|
||||
$this->redirect(route('meetups.landingpage', ['meetup' => $this->meetup, 'country' => $this->country]),
|
||||
navigate: true);
|
||||
}
|
||||
}
|
||||
}; ?>
|
||||
@@ -114,12 +119,14 @@ new class extends Component {
|
||||
<!-- Form Actions -->
|
||||
<div class="flex items-center justify-between pt-8 border-t border-gray-200 dark:border-gray-700">
|
||||
<div class="flex items-center gap-4">
|
||||
<flux:button variant="ghost" type="button" :href="route_with_country('meetups.edit', ['meetup' => $meetup])">
|
||||
<flux:button variant="ghost" type="button"
|
||||
:href="route_with_country('meetups.edit', ['meetup' => $meetup])">
|
||||
{{ __('Abbrechen') }}
|
||||
</flux:button>
|
||||
|
||||
@if($event)
|
||||
<flux:button variant="danger" type="button" wire:click="delete" wire:confirm="{{ __('Bist du sicher, dass du dieses Event löschen möchtest?') }}">
|
||||
<flux:button variant="danger" type="button" wire:click="delete"
|
||||
wire:confirm="{{ __('Bist du sicher, dass du dieses Event löschen möchtest?') }}">
|
||||
{{ __('Event löschen') }}
|
||||
</flux:button>
|
||||
@endif
|
||||
|
||||
@@ -3,12 +3,14 @@
|
||||
use App\Models\City;
|
||||
use App\Models\Country;
|
||||
use App\Models\Meetup;
|
||||
use App\Traits\SeoTrait;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Volt\Component;
|
||||
use Livewire\WithFileUploads;
|
||||
|
||||
new class extends Component {
|
||||
use WithFileUploads;
|
||||
use SeoTrait;
|
||||
|
||||
#[Validate('image|max:10240')] // 10MB Max
|
||||
public $logo;
|
||||
@@ -327,10 +329,12 @@ new class extends Component {
|
||||
<flux:spacer/>
|
||||
|
||||
<flux:modal.close>
|
||||
<flux:button class="cursor-pointer" type="button" variant="ghost">{{ __('Abbrechen') }}</flux:button>
|
||||
<flux:button class="cursor-pointer" type="button"
|
||||
variant="ghost">{{ __('Abbrechen') }}</flux:button>
|
||||
</flux:modal.close>
|
||||
|
||||
<flux:button class="cursor-pointer" type="submit" variant="primary">{{ __('Stadt erstellen') }}</flux:button>
|
||||
<flux:button class="cursor-pointer" type="submit"
|
||||
variant="primary">{{ __('Stadt erstellen') }}</flux:button>
|
||||
</div>
|
||||
</form>
|
||||
</flux:modal>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
use App\Models\City;
|
||||
use App\Models\Country;
|
||||
use App\Models\Meetup;
|
||||
use App\Traits\SeoTrait;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Volt\Component;
|
||||
@@ -10,6 +11,7 @@ use Livewire\WithFileUploads;
|
||||
|
||||
new class extends Component {
|
||||
use WithFileUploads;
|
||||
use SeoTrait;
|
||||
|
||||
#[Validate('image|max:10240')] // 10MB Max
|
||||
public $logo;
|
||||
@@ -420,10 +422,12 @@ new class extends Component {
|
||||
<flux:spacer/>
|
||||
|
||||
<flux:modal.close>
|
||||
<flux:button class="cursor-pointer" type="button" variant="ghost">{{ __('Abbrechen') }}</flux:button>
|
||||
<flux:button class="cursor-pointer" type="button"
|
||||
variant="ghost">{{ __('Abbrechen') }}</flux:button>
|
||||
</flux:modal.close>
|
||||
|
||||
<flux:button class="cursor-pointer" type="submit" variant="primary">{{ __('Stadt erstellen') }}</flux:button>
|
||||
<flux:button class="cursor-pointer" type="submit"
|
||||
variant="primary">{{ __('Stadt erstellen') }}</flux:button>
|
||||
</div>
|
||||
</form>
|
||||
</flux:modal>
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
|
||||
use App\Models\MeetupEvent;
|
||||
use App\Models\User;
|
||||
use App\Traits\SeoTrait;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Livewire\Volt\Component;
|
||||
|
||||
new class extends Component {
|
||||
use SeoTrait;
|
||||
|
||||
public MeetupEvent $event;
|
||||
public $country = 'de';
|
||||
|
||||
|
||||
@@ -2,9 +2,12 @@
|
||||
|
||||
use App\Models\Meetup;
|
||||
use App\Models\MeetupEvent;
|
||||
use App\Traits\SeoTrait;
|
||||
use Livewire\Volt\Component;
|
||||
|
||||
new class extends Component {
|
||||
use SeoTrait;
|
||||
|
||||
public Meetup $meetup;
|
||||
|
||||
public $country = 'de';
|
||||
@@ -39,7 +42,9 @@ new class extends Component {
|
||||
<flux:subheading class="text-gray-600 dark:text-gray-400">
|
||||
{{ $meetup->city->name }}, {{ $meetup->city->country->name }}
|
||||
</flux:subheading>
|
||||
<flux:button class="cursor-pointer" x-copy-to-clipboard="'{{ route('ics', ['meetup' => $meetup]) }}'" icon="calendar-date-range">{{ __('Kalender-Stream-URL kopieren') }}</flux:button>
|
||||
<flux:button class="cursor-pointer"
|
||||
x-copy-to-clipboard="'{{ route('ics', ['meetup' => $meetup]) }}'"
|
||||
icon="calendar-date-range">{{ __('Kalender-Stream-URL kopieren') }}</flux:button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -194,11 +199,13 @@ new class extends Component {
|
||||
<div class="flex items-center space-x-4 mb-6">
|
||||
<flux:heading size="xl">{{ __('Kommende Veranstaltungen') }}</flux:heading>
|
||||
@if(auth()->user() && auth()->user()->meetups()->find($meetup->id)?->exists)
|
||||
<flux:button :href="route_with_country('meetups.events.create', ['meetup' => $meetup])" variant="primary" icon="calendar">
|
||||
<flux:button :href="route_with_country('meetups.events.create', ['meetup' => $meetup])"
|
||||
variant="primary" icon="calendar">
|
||||
{{ __('Neues Event erstellen') }}
|
||||
</flux:button>
|
||||
@endif
|
||||
<flux:button class="cursor-pointer" x-copy-to-clipboard="'{{ route('ics', ['meetup' => $meetup]) }}'" icon="calendar-date-range">{{ __('Kalender-Stream-URL kopieren') }}</flux:button>
|
||||
<flux:button class="cursor-pointer" x-copy-to-clipboard="'{{ route('ics', ['meetup' => $meetup]) }}'"
|
||||
icon="calendar-date-range">{{ __('Kalender-Stream-URL kopieren') }}</flux:button>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
@@ -260,7 +267,8 @@ new class extends Component {
|
||||
<div class="mt-16">
|
||||
<div class="flex items-center space-x-4 mb-6">
|
||||
@if(auth()->user() && auth()->user()->meetups()->find($meetup->id)?->exists)
|
||||
<flux:button :href="route_with_country('meetups.events.create', ['meetup' => $meetup])" variant="primary" icon="calendar">
|
||||
<flux:button :href="route_with_country('meetups.events.create', ['meetup' => $meetup])"
|
||||
variant="primary" icon="calendar">
|
||||
{{ __('Neues Event erstellen') }}
|
||||
</flux:button>
|
||||
@endif
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Meetup;
|
||||
use App\Traits\SeoTrait;
|
||||
use Livewire\Volt\Component;
|
||||
|
||||
new class extends Component {
|
||||
use SeoTrait;
|
||||
|
||||
public function with(): array
|
||||
{
|
||||
return [
|
||||
@@ -22,7 +25,7 @@ new class extends Component {
|
||||
<style>
|
||||
#map {
|
||||
height: 90vh;
|
||||
z-index: 0!important;
|
||||
z-index: 0 !important;
|
||||
}
|
||||
|
||||
#map:focus {
|
||||
|
||||
Reference in New Issue
Block a user