diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1b8a3317..2a28ab54 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,8 +10,10 @@ Der Self-Updater zeigt diese Abschnitte bei neuen Versionen an.
- Anmeldung mit E-Mail und Passwort, „Passwort vergessen“ und Passwort ändern
- Eigenes Profil mit Profilbild, Funktion, Abteilung, Standort und Kontaktdaten
- Profilseiten von Kolleginnen und Kollegen
+- Neuigkeiten mit Kategorien, Titelbild, Lesezeit und geplanter Veröffentlichung
+- Termine mit Ort, Online-Link und Export in den eigenen Kalender (.ics)
- Personenverzeichnis mit Suche und Filter nach Abteilung
-- Startseite mit Begrüßung, Schnellzugriffen und neuen Kolleginnen und Kollegen
+- Startseite mit Slider für hervorgehobene Beiträge, Neuigkeiten, Terminen, Schnellzugriffen und neuen Kolleginnen und Kollegen
- Kopfbereich mit Suche, Hauptnavigation und Profilmenü; Darstellung hell, dunkel oder wie im System
-- Admin-Bereich mit Benutzerverwaltung und Schnellzugriffen
+- Admin-Bereich mit Benutzerverwaltung, Neuigkeiten, Kategorien, Terminen und Schnellzugriffen
- Erscheinungsbild: Name des Portals, Logo und Markenfarbe – wirkt im Portal und im Admin-Bereich
diff --git a/app/Filament/Resources/Events/EventResource.php b/app/Filament/Resources/Events/EventResource.php
new file mode 100644
index 00000000..833860e2
--- /dev/null
+++ b/app/Filament/Resources/Events/EventResource.php
@@ -0,0 +1,140 @@
+columns(3)
+ ->components([
+ Section::make('Termin')
+ ->columnSpan(2)
+ ->columns(2)
+ ->schema([
+ TextInput::make('title')->label('Titel')->required()->maxLength(160)->columnSpanFull(),
+ Toggle::make('all_day')->label('Ganztägig')->live()->columnSpanFull(),
+ DateTimePicker::make('starts_at')
+ ->label('Beginn')
+ ->required()
+ ->seconds(false)
+ ->native(false)
+ ->time(fn (Get $get) => ! $get('all_day'))
+ ->displayFormat(fn (Get $get) => $get('all_day') ? 'd.m.Y' : 'd.m.Y H:i'),
+ DateTimePicker::make('ends_at')
+ ->label('Ende')
+ ->seconds(false)
+ ->native(false)
+ ->time(fn (Get $get) => ! $get('all_day'))
+ ->displayFormat(fn (Get $get) => $get('all_day') ? 'd.m.Y' : 'd.m.Y H:i')
+ ->afterOrEqual('starts_at'),
+ TextInput::make('location')->label('Ort')->maxLength(255),
+ TextInput::make('online_url')->label('Online-Link')->url()->maxLength(500)->placeholder('https://…'),
+ RichEditor::make('description')
+ ->label('Beschreibung')
+ ->toolbarButtons([
+ ['bold', 'italic', 'link'],
+ ['bulletList', 'orderedList'],
+ ['undo', 'redo'],
+ ])
+ ->columnSpanFull(),
+ ]),
+ Section::make('Anzeige')
+ ->columnSpan(1)
+ ->schema([
+ Toggle::make('is_published')->label('Veröffentlicht')->default(true),
+ FileUpload::make('image_path')
+ ->label('Bild')
+ ->helperText('Optional, Querformat.')
+ ->image()
+ ->disk('uploads')
+ ->directory('events')
+ ->visibility('public')
+ ->imageAspectRatio('16:9')
+ ->automaticallyCropImagesToAspectRatio()
+ ->maxSize(10 * 1024),
+ ]),
+ ]);
+ }
+
+ public static function table(Table $table): Table
+ {
+ return $table
+ ->defaultSort('starts_at')
+ ->columns([
+ TextColumn::make('starts_at')
+ ->label('Datum')
+ ->formatStateUsing(fn (Event $record) => $record->starts_at->format($record->all_day ? 'd.m.Y' : 'd.m.Y H:i'))
+ ->sortable(),
+ TextColumn::make('title')->label('Titel')->searchable()->limit(60)->weight('medium'),
+ TextColumn::make('location')->label('Ort')->limit(40)->toggleable(),
+ IconColumn::make('is_published')->label('Veröffentlicht')->boolean(),
+ ])
+ ->filters([
+ TernaryFilter::make('upcoming')
+ ->label('Zeitraum')
+ ->placeholder('Alle')
+ ->trueLabel('Anstehende')
+ ->falseLabel('Vergangene')
+ ->default(true)
+ ->queries(
+ true: fn (Builder $query) => $query->where(fn ($q) => $q->where('ends_at', '>=', now())->orWhere(fn ($q) => $q->whereNull('ends_at')->where('starts_at', '>=', now()->startOfDay()))),
+ false: fn (Builder $query) => $query->where(fn ($q) => $q->where('ends_at', '<', now())->orWhere(fn ($q) => $q->whereNull('ends_at')->where('starts_at', '<', now()->startOfDay()))),
+ ),
+ ])
+ ->recordActions([
+ EditAction::make(),
+ DeleteAction::make(),
+ ]);
+ }
+
+ public static function getPages(): array
+ {
+ return [
+ 'index' => ListEvents::route('/'),
+ 'create' => CreateEvent::route('/neu'),
+ 'edit' => EditEvent::route('/{record}/bearbeiten'),
+ ];
+ }
+}
diff --git a/app/Filament/Resources/Events/Pages/CreateEvent.php b/app/Filament/Resources/Events/Pages/CreateEvent.php
new file mode 100644
index 00000000..84793412
--- /dev/null
+++ b/app/Filament/Resources/Events/Pages/CreateEvent.php
@@ -0,0 +1,18 @@
+id();
+
+ return $data;
+ }
+}
diff --git a/app/Filament/Resources/Events/Pages/EditEvent.php b/app/Filament/Resources/Events/Pages/EditEvent.php
new file mode 100644
index 00000000..6b28f4c3
--- /dev/null
+++ b/app/Filament/Resources/Events/Pages/EditEvent.php
@@ -0,0 +1,11 @@
+label('Neuer Termin'),
+ ];
+ }
+}
diff --git a/app/Filament/Resources/NewsCategories/NewsCategoryResource.php b/app/Filament/Resources/NewsCategories/NewsCategoryResource.php
new file mode 100644
index 00000000..a0c06dfe
--- /dev/null
+++ b/app/Filament/Resources/NewsCategories/NewsCategoryResource.php
@@ -0,0 +1,78 @@
+components([
+ TextInput::make('name')
+ ->label('Name')
+ ->required()
+ ->maxLength(60)
+ ->live(onBlur: true)
+ ->afterStateUpdated(fn (?string $state, Set $set, string $operation) => $operation === 'create' ? $set('slug', Str::slug((string) $state, language: 'de')) : null),
+ TextInput::make('slug')
+ ->label('Kürzel in der Adresse')
+ ->required()
+ ->maxLength(80)
+ ->alphaDash()
+ ->unique(ignoreRecord: true),
+ TextInput::make('description')->label('Beschreibung')->maxLength(500)->columnSpanFull(),
+ TextInput::make('sort')->label('Reihenfolge')->numeric()->default(0),
+ ]);
+ }
+
+ public static function table(Table $table): Table
+ {
+ return $table
+ ->defaultSort('sort')
+ ->reorderable('sort')
+ ->columns([
+ TextColumn::make('name')->label('Name')->searchable(),
+ TextColumn::make('slug')->label('Kürzel')->color('gray'),
+ TextColumn::make('posts_count')->label('Beiträge')->counts('posts'),
+ ])
+ ->recordActions([
+ EditAction::make(),
+ DeleteAction::make(),
+ ]);
+ }
+
+ public static function getPages(): array
+ {
+ return [
+ 'index' => ManageNewsCategories::route('/'),
+ ];
+ }
+}
diff --git a/app/Filament/Resources/NewsCategories/Pages/ManageNewsCategories.php b/app/Filament/Resources/NewsCategories/Pages/ManageNewsCategories.php
new file mode 100644
index 00000000..9d4a6f52
--- /dev/null
+++ b/app/Filament/Resources/NewsCategories/Pages/ManageNewsCategories.php
@@ -0,0 +1,19 @@
+columns(3)
+ ->components([
+ Section::make('Beitrag')
+ ->columnSpan(2)
+ ->schema([
+ TextInput::make('title')->label('Titel')->required()->maxLength(160),
+ Textarea::make('teaser')
+ ->label('Kurztext')
+ ->helperText('Erscheint in Listen und auf der Startseite. 1–2 Sätze.')
+ ->rows(2)
+ ->maxLength(300),
+ RichEditor::make('body')
+ ->label('Text')
+ ->toolbarButtons([
+ ['bold', 'italic', 'underline', 'link'],
+ ['h2', 'h3'],
+ ['bulletList', 'orderedList', 'blockquote'],
+ ['attachFiles', 'table'],
+ ['undo', 'redo'],
+ ])
+ ->fileAttachmentsDisk('uploads')
+ ->fileAttachmentsDirectory('news/inline')
+ ->fileAttachmentsVisibility('public')
+ ->fileAttachmentsAcceptedFileTypes(['image/jpeg', 'image/png', 'image/webp'])
+ ->fileAttachmentsMaxSize(8 * 1024),
+ ]),
+ Section::make('Veröffentlichung')
+ ->columnSpan(1)
+ ->schema([
+ Select::make('category_id')
+ ->label('Kategorie')
+ ->relationship('category', 'name')
+ ->preload()
+ ->searchable(),
+ DateTimePicker::make('published_at')
+ ->label('Veröffentlichen am')
+ ->helperText('Leer lassen = Entwurf. Ein Datum in der Zukunft plant den Beitrag.')
+ ->seconds(false)
+ ->native(false)
+ ->displayFormat('d.m.Y H:i'),
+ Toggle::make('is_featured')
+ ->label('Auf der Startseite hervorheben')
+ ->helperText('Hervorgehobene Beiträge mit Titelbild erscheinen groß im Slider.'),
+ FileUpload::make('cover_path')
+ ->label('Titelbild')
+ ->helperText('Querformat, mindestens 1600 × 900 Pixel.')
+ ->image()
+ ->disk('uploads')
+ ->directory('news')
+ ->visibility('public')
+ ->imageAspectRatio('16:9')
+ ->automaticallyCropImagesToAspectRatio()
+ ->maxSize(10 * 1024),
+ ]),
+ ]);
+ }
+
+ public static function table(Table $table): Table
+ {
+ return $table
+ ->defaultSort('created_at', 'desc')
+ ->columns([
+ ImageColumn::make('cover_path')->label('')->disk('uploads')->width(80)->height(45),
+ TextColumn::make('title')->label('Titel')->searchable()->limit(60)->weight('medium'),
+ TextColumn::make('category.name')->label('Kategorie')->badge()->color('gray'),
+ TextColumn::make('status')
+ ->label('Status')
+ ->badge()
+ ->state(fn (NewsPost $record) => match (true) {
+ $record->published_at === null => 'Entwurf',
+ $record->published_at->isFuture() => 'Geplant',
+ default => 'Veröffentlicht',
+ })
+ ->color(fn (string $state) => match ($state) {
+ 'Veröffentlicht' => 'success',
+ 'Geplant' => 'warning',
+ default => 'gray',
+ }),
+ IconColumn::make('is_featured')->label('Hervorgehoben')->boolean()->trueIcon(Heroicon::Star)->falseIcon(false)->trueColor('warning'),
+ TextColumn::make('published_at')->label('Veröffentlicht')->dateTime('d.m.Y H:i')->sortable(),
+ ])
+ ->filters([
+ SelectFilter::make('category_id')->label('Kategorie')->relationship('category', 'name'),
+ ])
+ ->recordActions([
+ Action::make('view')
+ ->label('Ansehen')
+ ->icon(Heroicon::OutlinedEye)
+ ->url(fn (NewsPost $record) => route('news.show', $record))
+ ->openUrlInNewTab()
+ ->visible(fn (NewsPost $record) => $record->isPublished()),
+ EditAction::make(),
+ DeleteAction::make(),
+ ]);
+ }
+
+ public static function getPages(): array
+ {
+ return [
+ 'index' => ListNewsPosts::route('/'),
+ 'create' => CreateNewsPost::route('/neu'),
+ 'edit' => EditNewsPost::route('/{record}/bearbeiten'),
+ ];
+ }
+}
diff --git a/app/Filament/Resources/NewsPosts/Pages/CreateNewsPost.php b/app/Filament/Resources/NewsPosts/Pages/CreateNewsPost.php
new file mode 100644
index 00000000..530a3a36
--- /dev/null
+++ b/app/Filament/Resources/NewsPosts/Pages/CreateNewsPost.php
@@ -0,0 +1,18 @@
+id();
+
+ return $data;
+ }
+}
diff --git a/app/Filament/Resources/NewsPosts/Pages/EditNewsPost.php b/app/Filament/Resources/NewsPosts/Pages/EditNewsPost.php
new file mode 100644
index 00000000..40b1336b
--- /dev/null
+++ b/app/Filament/Resources/NewsPosts/Pages/EditNewsPost.php
@@ -0,0 +1,19 @@
+label('Neuer Beitrag'),
+ ];
+ }
+}
diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php
index 852b1e64..856efc96 100644
--- a/app/Http/Controllers/DashboardController.php
+++ b/app/Http/Controllers/DashboardController.php
@@ -2,7 +2,11 @@
namespace App\Http\Controllers;
+use App\Http\Resources\EventResource;
+use App\Http\Resources\NewsPostResource;
use App\Http\Resources\PersonResource;
+use App\Models\Event;
+use App\Models\NewsPost;
use App\Models\User;
use App\Support\QuickLinks;
use Illuminate\Http\Request;
@@ -15,6 +19,20 @@ class DashboardController extends Controller
{
$user = $request->user();
+ // Hervorgehobene Beiträge für den Slider; ohne Hervorhebung die neuesten mit Bild.
+ $featured = NewsPost::query()->published()->with('category')
+ ->where('is_featured', true)->whereNotNull('cover_path')
+ ->latest('published_at')->limit(5)->get();
+
+ if ($featured->isEmpty()) {
+ $featured = NewsPost::query()->published()->with('category')
+ ->whereNotNull('cover_path')->latest('published_at')->limit(3)->get();
+ }
+
+ $recent = NewsPost::query()->published()->with('category')
+ ->whereKeyNot($featured->modelKeys())
+ ->latest('published_at')->limit(8)->get();
+
return Inertia::render('Dashboard', [
'profile' => [
'job_title' => $user->job_title,
@@ -23,6 +41,10 @@ class DashboardController extends Controller
'avatar_url' => $user->avatarUrl(256),
],
'quickLinks' => $quickLinks->all(),
+ 'featuredNews' => NewsPostResource::collection($featured),
+ 'latestNews' => NewsPostResource::collection($recent->take(4)->values()),
+ 'moreNews' => NewsPostResource::collection($recent->slice(4)->values()),
+ 'upcomingEvents' => EventResource::collection(Event::query()->upcoming()->limit(4)->get()),
'newColleagues' => PersonResource::collection(
User::query()
->active()
diff --git a/app/Http/Controllers/EventController.php b/app/Http/Controllers/EventController.php
new file mode 100644
index 00000000..6ce1cdb5
--- /dev/null
+++ b/app/Http/Controllers/EventController.php
@@ -0,0 +1,45 @@
+ EventResource::collection(
+ Event::query()->upcoming()->limit(200)->get()
+ ),
+ ]);
+ }
+
+ public function show(Event $event): Response
+ {
+ abort_unless($event->is_published, 404);
+
+ return Inertia::render('Events/Show', [
+ 'event' => [
+ ...(new EventResource($event))->resolve(),
+ 'description_html' => $event->description_html,
+ ],
+ ]);
+ }
+
+ public function ics(Event $event, Calendar $calendar, Branding $branding): HttpResponse
+ {
+ abort_unless($event->is_published, 404);
+
+ return response($calendar->toIcs($event, $branding->portalName()), 200, [
+ 'Content-Type' => 'text/calendar; charset=utf-8',
+ 'Content-Disposition' => 'attachment; filename="termin-'.$event->id.'.ics"',
+ ]);
+ }
+}
diff --git a/app/Http/Controllers/NewsController.php b/app/Http/Controllers/NewsController.php
new file mode 100644
index 00000000..1bbf9ba9
--- /dev/null
+++ b/app/Http/Controllers/NewsController.php
@@ -0,0 +1,64 @@
+orderBy('sort')->orderBy('name')->get(['id', 'name', 'slug']);
+ $category = $categories->firstWhere('slug', $request->query('kategorie'));
+
+ $posts = NewsPost::query()
+ ->published()
+ ->with('category')
+ ->when($category, fn ($query) => $query->where('category_id', $category->id))
+ ->latest('published_at')
+ ->paginate(12)
+ ->withQueryString();
+
+ return Inertia::render('News/Index', [
+ 'posts' => NewsPostResource::collection($posts),
+ 'categories' => $categories->map(fn (NewsCategory $c) => ['name' => $c->name, 'slug' => $c->slug]),
+ 'activeCategory' => $category?->slug,
+ ]);
+ }
+
+ public function show(NewsPost $post): Response
+ {
+ abort_unless($post->isPublished(), 404);
+
+ $post->load(['category', 'author']);
+
+ return Inertia::render('News/Show', [
+ 'post' => [
+ ...(new NewsPostResource($post))->resolve(),
+ 'body_html' => $post->body_html,
+ 'author' => $post->author ? [
+ 'id' => $post->author->id,
+ 'name' => $post->author->name,
+ 'initials' => $post->author->initials,
+ 'job_title' => $post->author->job_title,
+ 'avatar_url' => $post->author->avatarUrl(96),
+ ] : null,
+ ],
+ 'related' => NewsPostResource::collection(
+ NewsPost::query()
+ ->published()
+ ->with('category')
+ ->whereKeyNot($post->id)
+ ->when($post->category_id, fn ($query) => $query->where('category_id', $post->category_id))
+ ->latest('published_at')
+ ->limit(3)
+ ->get()
+ ),
+ ]);
+ }
+}
diff --git a/app/Http/Resources/EventResource.php b/app/Http/Resources/EventResource.php
new file mode 100644
index 00000000..34ed0f6b
--- /dev/null
+++ b/app/Http/Resources/EventResource.php
@@ -0,0 +1,31 @@
+
+ */
+ public function toArray(Request $request): array
+ {
+ return [
+ 'id' => $this->id,
+ 'title' => $this->title,
+ 'location' => $this->location,
+ 'online_url' => $this->online_url,
+ 'starts_at' => $this->starts_at->toIso8601String(),
+ 'ends_at' => $this->ends_at?->toIso8601String(),
+ 'all_day' => $this->all_day,
+ 'image_url' => $this->imageUrl('large'),
+ 'thumb_url' => $this->imageUrl('thumb'),
+ ];
+ }
+}
diff --git a/app/Http/Resources/NewsPostResource.php b/app/Http/Resources/NewsPostResource.php
new file mode 100644
index 00000000..2a7acbcd
--- /dev/null
+++ b/app/Http/Resources/NewsPostResource.php
@@ -0,0 +1,34 @@
+
+ */
+ public function toArray(Request $request): array
+ {
+ return [
+ 'id' => $this->id,
+ 'title' => $this->title,
+ 'slug' => $this->slug,
+ 'teaser' => $this->teaser,
+ 'category' => $this->whenLoaded('category', fn () => $this->category ? [
+ 'name' => $this->category->name,
+ 'slug' => $this->category->slug,
+ ] : null),
+ 'cover_url' => $this->coverUrl('large'),
+ 'thumb_url' => $this->coverUrl('thumb'),
+ 'published_at' => $this->published_at?->toIso8601String(),
+ 'reading_minutes' => $this->reading_minutes,
+ ];
+ }
+}
diff --git a/app/Models/Event.php b/app/Models/Event.php
new file mode 100644
index 00000000..59487bff
--- /dev/null
+++ b/app/Models/Event.php
@@ -0,0 +1,85 @@
+isDirty('description') || $event->description_html === null) {
+ $event->description_html = app(RichText::class)->toSafeHtml($event->description);
+ }
+ });
+
+ // Bildvarianten erzeugen bzw. beim Austausch die alten Dateien entfernen.
+ static::saved(function (Event $event): void {
+ if (! $event->wasRecentlyCreated && ! $event->wasChanged('image_path')) {
+ return;
+ }
+
+ $previous = $event->wasRecentlyCreated ? null : $event->getOriginal('image_path');
+
+ if ($previous && $previous !== $event->image_path) {
+ app(Images::class)->deleteWithVariants($previous);
+ }
+
+ if ($event->image_path) {
+ app(Images::class)->createVariants($event->image_path);
+ }
+ });
+
+ static::deleted(fn (Event $event) => app(Images::class)->deleteWithVariants($event->image_path));
+ }
+
+ protected function casts(): array
+ {
+ return [
+ 'starts_at' => 'datetime',
+ 'ends_at' => 'datetime',
+ 'all_day' => 'boolean',
+ 'is_published' => 'boolean',
+ ];
+ }
+
+ /**
+ * @return BelongsTo
'.fake()->paragraph().'
', + 'location' => fake()->city(), + 'starts_at' => $start, + 'ends_at' => $start->copy()->addHours(2), + 'all_day' => false, + 'is_published' => true, + ]; + } +} diff --git a/database/factories/NewsCategoryFactory.php b/database/factories/NewsCategoryFactory.php new file mode 100644 index 00000000..25a232c3 --- /dev/null +++ b/database/factories/NewsCategoryFactory.php @@ -0,0 +1,24 @@ + + */ +class NewsCategoryFactory extends Factory +{ + public function definition(): array + { + $name = fake()->unique()->words(2, true); + + return [ + 'name' => Str::title($name), + 'slug' => Str::slug($name), + 'sort' => 0, + ]; + } +} diff --git a/database/factories/NewsPostFactory.php b/database/factories/NewsPostFactory.php new file mode 100644 index 00000000..40006782 --- /dev/null +++ b/database/factories/NewsPostFactory.php @@ -0,0 +1,32 @@ + + */ +class NewsPostFactory extends Factory +{ + public function definition(): array + { + return [ + 'title' => fake()->sentence(6), + 'teaser' => fake()->sentence(15), + 'body' => ''.fake()->paragraph(5).'
', + 'published_at' => now()->subDay(), + ]; + } + + public function draft(): static + { + return $this->state(fn () => ['published_at' => null]); + } + + public function scheduled(): static + { + return $this->state(fn () => ['published_at' => now()->addDay()]); + } +} diff --git a/database/migrations/2026_09_26_000001_create_news_tables.php b/database/migrations/2026_09_26_000001_create_news_tables.php new file mode 100644 index 00000000..b6907758 --- /dev/null +++ b/database/migrations/2026_09_26_000001_create_news_tables.php @@ -0,0 +1,47 @@ +id(); + $table->string('name'); + $table->string('slug')->unique(); + $table->string('description', 500)->nullable(); + $table->unsignedInteger('sort')->default(0); + $table->timestamps(); + }); + + Schema::create('news_posts', function (Blueprint $table) { + $table->id(); + $table->foreignId('category_id')->nullable()->constrained('news_categories')->nullOnDelete(); + $table->foreignId('author_id')->nullable()->constrained('users')->nullOnDelete(); + $table->string('title'); + $table->string('slug')->unique(); + $table->text('teaser')->nullable(); + $table->longText('body')->nullable(); + // Beim Speichern gerendert und bereinigt – die Ausgabe kostet keine Rechenzeit. + $table->longText('body_html')->nullable(); + $table->unsignedSmallInteger('reading_minutes')->default(1); + $table->string('cover_path')->nullable(); + $table->boolean('is_featured')->default(false); + $table->timestamp('published_at')->nullable(); + $table->timestamps(); + + $table->index('published_at'); + $table->index(['category_id', 'published_at']); + $table->index(['is_featured', 'published_at']); + }); + } + + public function down(): void + { + Schema::dropIfExists('news_posts'); + Schema::dropIfExists('news_categories'); + } +}; diff --git a/database/migrations/2026_09_26_000002_create_events_table.php b/database/migrations/2026_09_26_000002_create_events_table.php new file mode 100644 index 00000000..4d8b243c --- /dev/null +++ b/database/migrations/2026_09_26_000002_create_events_table.php @@ -0,0 +1,35 @@ +id(); + $table->foreignId('author_id')->nullable()->constrained('users')->nullOnDelete(); + $table->string('title'); + $table->longText('description')->nullable(); + $table->longText('description_html')->nullable(); + $table->string('location')->nullable(); + $table->string('online_url', 500)->nullable(); + $table->timestamp('starts_at'); + $table->timestamp('ends_at')->nullable(); + $table->boolean('all_day')->default(false); + $table->string('image_path')->nullable(); + $table->boolean('is_published')->default(true); + $table->timestamps(); + + $table->index(['is_published', 'starts_at']); + $table->index(['is_published', 'ends_at']); + }); + } + + public function down(): void + { + Schema::dropIfExists('events'); + } +}; diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index a985a717..5e79e305 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -37,5 +37,7 @@ class DatabaseSeeder extends Seeder ['label' => 'Ideenbox', 'url' => 'https://example.com/ideen', 'icon' => 'lightbulb', 'new_tab' => true], ['label' => 'Personen', 'url' => '/personen', 'icon' => 'users', 'new_tab' => false], ]); + + $this->call(DemoContentSeeder::class); } } diff --git a/database/seeders/DemoContentSeeder.php b/database/seeders/DemoContentSeeder.php new file mode 100644 index 00000000..c3722104 --- /dev/null +++ b/database/seeders/DemoContentSeeder.php @@ -0,0 +1,145 @@ +inRandomOrder()->limit(5)->get(); + + $categories = collect([ + 'Unternehmen', 'Arbeit & Bildung', 'Menschen', 'Nachhaltigkeit', 'Freizeit & Kultur', 'Verwaltung', + ])->mapWithKeys(fn (string $name, int $i) => [$name => NewsCategory::query()->create([ + 'name' => $name, + 'slug' => Str::slug($name, language: 'de'), + 'sort' => $i, + ])]); + + $posts = [ + ['Unternehmen', 'Gemeinsam Zukunft gestalten: Strategie 2030 gestartet', 'Mit der neuen Unternehmensstrategie richten wir uns auf Teilhabe, Qualität und nachhaltige Entwicklung aus.', true, 'strategie'], + ['Menschen', 'Herzlich willkommen im Team! Unsere neuen Kolleginnen und Kollegen', 'Im Mai haben zwölf neue Mitarbeitende bei uns angefangen – wir stellen sie vor.', true, 'team'], + ['Arbeit & Bildung', 'CNC-Schulung erfolgreich abgeschlossen', 'Herzlichen Glückwunsch an alle Teilnehmenden der dreimonatigen Weiterbildung.', true, 'werkstatt'], + ['Unternehmen', 'Rückblick: Mitarbeitendenversammlung 2025', 'Die wichtigsten Themen, Zahlen und Fragen aus der Versammlung im Überblick.', false, 'versammlung'], + ['Nachhaltigkeit', 'Photovoltaik auf dem Dach der Werkstatt in Betrieb', 'Seit dieser Woche erzeugen wir einen großen Teil unseres Stroms selbst.', false, 'solar'], + ['Verwaltung', 'Digitalisierung: Neue Software für die Dienstplanung', 'Ab Juni planen alle Bereiche ihre Dienste in einer gemeinsamen Anwendung.', false, 'buero'], + ['Freizeit & Kultur', 'Inklusives Fußballturnier – ein voller Erfolg!', 'Fairer Sport, tolle Stimmung und viele strahlende Gesichter beim Sommerturnier.', false, 'fussball'], + ['Arbeit & Bildung', 'Neue Maßnahmen im Arbeitsbereich Holz gestartet', 'Drei neue Angebote erweitern die berufliche Bildung ab dem Herbst.', false, 'holz'], + ['Nachhaltigkeit', 'Blühwiese statt Rasen: Artenvielfalt am Standort', 'Auf 800 Quadratmetern summt und blüht es jetzt – ein Projekt der Gartengruppe.', false, 'wiese'], + ['Menschen', '25 Jahre dabei: Ein Gespräch mit Maria Hoffmann', 'Wie sich die Arbeit verändert hat und was gleich geblieben ist.', false, 'portrait'], + ['Verwaltung', 'Informationen zur Entgeltabrechnung Mai', 'Was sich durch die neue Tarifrunde auf Ihrer Abrechnung ändert.', false, null], + ['Freizeit & Kultur', 'Betriebsfest 2025: Jetzt anmelden', 'Musik, Essen und Programm für die ganze Familie – wir freuen uns auf Sie.', false, 'fest'], + ]; + + foreach ($posts as $i => [$category, $title, $teaser, $featured, $image]) { + NewsPost::query()->create([ + 'category_id' => $categories[$category]->id, + 'author_id' => $authors->random()->id, + 'title' => $title, + 'teaser' => $teaser, + 'body' => $this->body($teaser), + 'is_featured' => $featured, + 'cover_path' => $image ? $this->image("news/demo-{$image}.jpg", $image) : null, + 'published_at' => now()->subHours(3 + $i * 19), + ]); + } + + NewsPost::query()->create([ + 'category_id' => $categories['Unternehmen']->id, + 'title' => 'Entwurf: Ausblick auf das zweite Halbjahr', + 'teaser' => 'Dieser Beitrag ist noch nicht veröffentlicht.', + 'body' => 'Entwurf.
', + ]); + + $events = [ + ['Betriebsfest 2025', 'Außenbereich Hauptstandort', 12, 14, 18, false, 'fest'], + ['Fortbildung: Unterstützte Kommunikation', 'Bildungswerk, Seminarraum 2', 5, 9, 16, false, null], + ['Teamschulung Führungskräfte', 'Seminarraum 1, Verwaltung', 9, 10, 15, false, null], + ['Inklusionstag', 'Marktplatz', 20, 0, 0, true, 'inklusion'], + ['Sprechstunde der Mitarbeitervertretung', 'MAV-Büro, Raum 1.12', 2, 13, 15, false, null], + ['Erste-Hilfe-Auffrischung', 'Schulungsraum Werkstatt', 16, 8, 12, false, null], + ]; + + foreach ($events as [$title, $location, $inDays, $from, $to, $allDay, $image]) { + $day = now()->addDays($inDays)->startOfDay(); + + Event::query()->create([ + 'author_id' => $authors->random()->id, + 'title' => $title, + 'description' => 'Weitere Informationen folgen. Bei Fragen wenden Sie sich bitte an die Organisatorinnen und Organisatoren.
', + 'location' => $location, + 'starts_at' => $allDay ? $day : $day->copy()->setHour($from), + 'ends_at' => $allDay ? null : $day->copy()->setHour($to), + 'all_day' => $allDay, + 'image_path' => $image ? $this->image("events/demo-{$image}.jpg", $image) : null, + ]); + } + } + + private function body(string $teaser): string + { + return "{$teaser}
" + .'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Donec ullamcorper nulla non metus auctor fringilla. Cras mattis consectetur purus sit amet fermentum.
' + .'Maecenas sed diam eget risus varius blandit sit amet non magna. Vestibulum id ligula porta felis euismod semper. Aenean lacinia bibendum nulla sed consectetur.
' + .'' + .'„Gemeinsam erreichen wir mehr – das zeigt dieses Projekt.“
Nullam quis risus eget urna mollis ornare vel eu leo. Fragen beantwortet gern das Redaktionsteam.
'; + } + + private function image(string $path, string $seed): string + { + $disk = Storage::disk('uploads'); + + if ($disk->exists($path)) { + return $path; + } + + try { + $response = Http::timeout(10)->get("https://picsum.photos/seed/inhaus-{$seed}/1600/900"); + + if ($response->successful() && str_starts_with((string) $response->header('Content-Type'), 'image/')) { + $disk->put($path, $response->body()); + + return $path; + } + } catch (Throwable) { + // Kein Netz – Farbfläche als Ersatz. + } + + $disk->put($path, $this->placeholder($seed)); + + return $path; + } + + private function placeholder(string $seed): string + { + $palette = app(Branding::class)->palette(); + $shades = [$palette[700], $palette[800], $palette[900], $palette[600]]; + [$r, $g, $b] = sscanf($shades[crc32($seed) % count($shades)], '#%02x%02x%02x'); + + $image = imagecreatetruecolor(1600, 900); + imagefill($image, 0, 0, imagecolorallocate($image, $r, $g, $b)); + imagefilledellipse($image, 1300, 200, 1100, 1100, imagecolorallocatealpha($image, 255, 255, 255, 115)); + + ob_start(); + imagejpeg($image, null, 85); + + return (string) ob_get_clean(); + } +} diff --git a/docs/PLAN.md b/docs/PLAN.md index f8d13613..fd12fac8 100644 --- a/docs/PLAN.md +++ b/docs/PLAN.md @@ -474,10 +474,11 @@ Kantinenplan, Ideenbox, Urlaubsanträge. | Phase | Inhalt | |---|---| | **0 – Fundament** | Laravel-Skeleton, Docker-Dev, CI-Matrix, `VERSION` + `CHANGELOG.md` + Build-Workflow (Assets/`vendor` mitversioniert), lokaler Login, User & Profil, Header mit Avatar, Design-System (Tailwind/shadcn-vue) mit Design-Tokens, **Basis-Branding (Portalname, Logo, Markenfarbe)**, Personenverzeichnis, Schnellzugriffe, Filament-Grundgerüst | +| **0b – News & Termine (vorgezogen)** | Neuigkeiten mit Kategorien, Titelbild, Planung, Hervorhebung (Slider); Termine mit .ics-Export; Startseite nach Intranet-Vorbild. Redaktion vorerst nur im Admin-Backend – Rechte pro Kategorie, Redaktion im Portal und Umzug in Plugins folgen mit Phase 2 | | **1 – Betrieb & Lizenz** | **Self-Updater** (inkl. Wartungsmodus, Auto-Migration, Kanäle), **Lizenz-Speicher & -Client** (rotierendes Token), Seite „Aktualisierung“, **Rückmeldungen**, Web-Installer, Site Health, Cron-Varianten | | **2 – Plugin-System & Rechte** | Plugin-Loader, Hooks/Filter, Registries, Recovery-Modus, Import-Map-Frontend; Rollen, Grants, Zielgruppen, Rechte-Cache, Rechte-Prüfer | | **3 – Entra ID** | OIDC-Login, JIT, Gruppen-/App-Rollen-Mapping (additiv), Graph-Profil- & Foto-Sync, Delta-Sync | -| **4 – CMS** | Seitenbaum, Pagebuilder, Versionen; News mit Kategorien & Freigabe | +| **4 – CMS** | Seitenbaum, Pagebuilder, Versionen; News-Freigabe-Workflow und Redaktion im Portal | | **5 – Branding & Theming** | Vollständige Seite „Erscheinungsbild“: Logo-Varianten, Farben inkl. Farbtreue & Kontrastprüfung, Schriften, Form, Login-Seite, E-Mails, Live-Vorschau, Entwurf/Veröffentlichen, Export/Import | | **6 – Weitere Plugins & IdPs** | Verzeichnis/Organigramm, Dokumente, Events …; OIDC generisch, LDAP, SAML; Lasttests 5.000 User | | **7 – Plugin-SDK öffentlich** | Doku, Generator, Beispiel-Plugins (kein Plugin-Verzeichnis) | diff --git a/package-lock.json b/package-lock.json index 48dfe526..bd9d08d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "@fontsource-variable/inter": "^5.3.0", "@inertiajs/vue3": "^3.7.1", "@lucide/vue": "^1.48.0", + "@tailwindcss/typography": "^0.5.20", "@tailwindcss/vite": "^4.3.3", "@vitejs/plugin-vue": "^6.0.9", "@vueuse/core": "^15.0.0", @@ -1108,6 +1109,19 @@ "node": ">= 20" } }, + "node_modules/@tailwindcss/typography": { + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.20.tgz", + "integrity": "sha512-hwbzQuNUfcPvbegQFatVPl/MY/tcM9KLl963hQ5laJKPh81TEZ1+dNG9PirGvcaDBkp+BCshExAyKVPW91dozw==", + "dev": true, + "license": "MIT", + "dependencies": { + "postcss-selector-parser": "6.0.10" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || >=4.0.0 || insiders" + } + }, "node_modules/@tailwindcss/vite": { "version": "4.3.3", "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.3.tgz", @@ -1368,6 +1382,19 @@ "node": ">=6" } }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/csstype": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", @@ -1892,6 +1919,20 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/postcss-selector-parser": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", + "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/reka-ui": { "version": "2.10.5", "resolved": "https://registry.npmjs.org/reka-ui/-/reka-ui-2.10.5.tgz", @@ -2083,6 +2124,13 @@ "node": ">=14.17" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, "node_modules/vite": { "version": "8.3.1", "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.1.tgz", diff --git a/package.json b/package.json index 5c253164..bbc24154 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "@fontsource-variable/inter": "^5.3.0", "@inertiajs/vue3": "^3.7.1", "@lucide/vue": "^1.48.0", + "@tailwindcss/typography": "^0.5.20", "@tailwindcss/vite": "^4.3.3", "@vitejs/plugin-vue": "^6.0.9", "@vueuse/core": "^15.0.0", diff --git a/public/build/assets/AppLayout-F8bBmCnJ.js b/public/build/assets/AppLayout-F8bBmCnJ.js new file mode 100644 index 00000000..ac657641 --- /dev/null +++ b/public/build/assets/AppLayout-F8bBmCnJ.js @@ -0,0 +1 @@ +import{_ as e,c as t,d as n,f as r,g as i,h as a,l as o,m as s,o as c,p as l,t as u,u as d}from"./RovingFocusGroup-B46-IPpj.js";import{$t as f,At as p,D as m,Dt as h,E as g,Et as _,F as v,G as y,Gn as b,Hn as x,J as S,K as C,Lt as w,Nt as T,O as E,Pn as D,Sn as O,Tn as ee,Ut as k,Vt as A,Xn as te,Xt as j,Y as M,Yn as N,Yt as ne,_n as P,a as re,cn as ie,cr as ae,er as oe,i as se,it as F,k as ce,kt as I,lr as le,mt as L,n as ue,nt as R,or as z,q as B,qn as V,rr as H,sr as U,t as de,tr as fe,tt as W,vn as G,wn as K,yn as pe,z as me,zn as he}from"./app-CsynT-MH.js";import{A as q,C as ge,D as _e,E as ve,S as ye,T as be,_ as xe,a as Se,b as Ce,d as J,g as we,k as Te,p as Y,t as Ee,u as X,v as De,w as Oe,x as ke,y as Ae}from"./BrandLogo-BTmxPYut.js";var je=q({name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]}),Me=q({name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]}),Ne=q({name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]}),Pe=q({name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]}),Fe=q({name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]}),Ie=q({name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]}),Le=q({name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]}),Re=q({name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]}),ze=q({name:`octagon-x`,size:24,node:[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-octagon`]}),Be=q({name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]}),Ve=q({name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]}),He=q({name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]}),Ue=q({name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]}),We=q({name:`user-round-pen`,size:24,node:[[`path`,{d:`M2 21a8 8 0 0 1 10.821-7.487`,key:`1c8h7z`}],[`path`,{d:`M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z`,key:`1817ys`}],[`circle`,{cx:`10`,cy:`8`,r:`5`,key:`o932ke`}]]}),Ge=q({name:`user-round`,size:24,node:[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]],aliases:[`user-2`]}),Ke=q({name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]});function qe(e,t,n){let r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}var Je=[`INPUT`,`TEXTAREA`];function Ye(e,t,n,r={}){if(!t||r.enableIgnoredElement&&Je.includes(t.nodeName))return null;let{arrowKeyOptions:i=`both`,attributeName:a=`[data-reka-collection-item]`,itemsArray:o=[],loop:s=!0,dir:c=`ltr`,preventScroll:l=!0,focus:u=!1}=r,[d,f,p,m,h,g]=[e.key===`ArrowRight`,e.key===`ArrowLeft`,e.key===`ArrowUp`,e.key===`ArrowDown`,e.key===`Home`,e.key===`End`],_=p||m,v=d||f;if(!h&&!g&&(!_&&!v||i===`vertical`&&v||i===`horizontal`&&_))return null;let y=n?Array.from(n.querySelectorAll(a)):o;if(!y.length)return null;l&&e.preventDefault();let b=null;return v||_?b=Xe(y,t,{goForward:_?m:c===`ltr`?d:f,loop:s}):h?b=y.at(0)||null:g&&(b=y.at(-1)||null),u&&b?.focus(),b}function Xe(e,t,n,r=e.includes(t)?e.length:e.length+1){if(--r===0)return null;let i=e.indexOf(t),a;if(a=i===-1?n.goForward?0:e.length-1:n.goForward?i+1:i-1,!n.loop&&(a<0||a>=e.length))return null;let o=e[(a+e.length)%e.length];return o?o.hasAttribute(`disabled`)&&o.getAttribute(`disabled`)!==`false`?Xe(e,o,n,r):o:null}var Z=b({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set});function Ze(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function Qe(e,t,n=`.`,r){if(!Ze(t))return Qe(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(i[t]=Array.isArray(a)&&Array.isArray(i[t])?[...a,...i[t]]:Ze(a)&&Ze(i[t])?Qe(a,i[t],(n?`${n}.`:``)+t.toString(),r):a))}return i}function $e(e){return(...t)=>t.reduce((t,n)=>Qe(t,n,``,e),{})}var et=$e(),tt=ye(()=>{let e=V(new Map),t=V(),n=y(()=>{for(let t of e.value.values())if(t)return!0;return!1}),r=s({scrollBody:V(!0)}),i=null,a=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,Z.layersWithOutsidePointerEventsDisabled.size===0&&(document.body.style.pointerEvents=``),document.documentElement.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=t.value??``,Oe&&i?.(),t.value=void 0};return P(n,(e,o)=>{if(!ge)return;if(!e){o&&a();return}t.value===void 0&&(t.value=document.body.style.overflow);let s=window.innerWidth-document.documentElement.clientWidth,c={padding:s,margin:0},l=r.scrollBody?.value?typeof r.scrollBody.value==`object`?et({padding:r.scrollBody.value.padding===!0?s:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?s:r.scrollBody.value.margin},c):c:{padding:0,margin:0};s>0&&(document.body.style.paddingRight=typeof l.padding==`number`?`${l.padding}px`:String(l.padding),document.body.style.marginRight=typeof l.margin==`number`?`${l.margin}px`:String(l.margin),document.documentElement.style.setProperty(`--scrollbar-width`,`${s}px`),document.body.style.overflow=`hidden`),Oe&&(i=De(document,`touchmove`,e=>it(e),{passive:!1})),p(()=>{n.value&&(document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`)})},{immediate:!0,flush:`sync`}),e});function nt(e){let t=Math.random().toString(36).substring(2,7),n=tt();n.value.set(t,e??!1);let r=y({get:()=>n.value.get(t)??!1,set:e=>n.value.set(t,e)});return _e(()=>{n.value.delete(t)}),r}function rt(e){let t=window.getComputedStyle(e);if(t.overflowX===`scroll`||t.overflowY===`scroll`||t.overflowX===`auto`&&e.clientWidth{let{slotScopeIds:c}=t;c&&(i=i?i.concat(c):c);let d=s(e),f=m(o(e),t,d,n,r,i,a);return f&&gi(f)&&f.data===`]`?o(t.anchor=f):(fi(),l(t.anchor=u(`]`),d,f),f)},g=(e,t,r,i,a,l)=>{if(wi(e,t)||fi(),t.el=null,l){let t=_(e);for(;;){let n=o(e);if(n&&n!==t)c(n);else break}}let u=o(e),d=s(e);return c(e),n(null,t,d,u,r,i,hi(d),a),r&&(r.vnode.el=t.el,_o(r,t.el)),u},_=(e,t=`[`,n=`]`)=>{let r=0;for(;e;)if(e=o(e),e&&gi(e)&&(e.data===t&&r++,e.data===n)){if(r===0)return o(e);r--}return e},v=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},y=e=>e.nodeType===1&&e.tagName===`TEMPLATE`;return[d,f]}var vi=new Set([`src`,`srcset`,`href`,`poster`]);function yi(e,t,n){return vi.has(t)?e.getAttribute(t)===(n==null?null:`${n}`):!1}var bi=`data-allow-mismatch`,xi={0:`text`,1:`children`,2:`class`,3:`style`,4:`attribute`};function Si(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(bi);)e=e.parentElement;return Ci(e&&e.getAttribute(bi),t)}function Ci(e,t){if(e==null)return!1;if(e===``)return!0;{let n=e.split(`,`);return t===0&&n.includes(`children`)?!0:n.includes(xi[t])}}function wi(e,t){return Si(e.parentElement,1)||Ti(e)||Ei(t)}function Ti(e){return e.nodeType===1&&Ci(e.getAttribute(bi),1)}function Ei({props:e}){let t=e&&e[bi];return typeof t==`string`&&Ci(t,1)}var Di=ce().requestIdleCallback||(e=>setTimeout(e,1)),Oi=ce().cancelIdleCallback||(e=>clearTimeout(e)),ki=(e=1e4)=>t=>{let n=Di(t,{timeout:e});return()=>Oi(n)};function Ai(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=window;return(t>0&&t0&&r0&&n {{ title }} {{ text }} {{ formatEventRange(event) }} {{ event.location }}{{ event.title }}
+