mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2025-12-14 12:06:46 +00:00
🛠️ Refactor dashboard components for improved code formatting and readability
- Updated HTML indentation and alignment across `top-countries`, `activities`, and `top-meetups` components. - Applied consistent formatting to dynamic content (e.g., map links, charts). - Corrected key usage in `NostrTrait` for route parameters related to `meetups`.
This commit is contained in:
@@ -68,7 +68,7 @@ trait NostrTrait
|
|||||||
$model->start->asDateTime(),
|
$model->start->asDateTime(),
|
||||||
$model->location,
|
$model->location,
|
||||||
url()->route('meetups.landingpage-event',
|
url()->route('meetups.landingpage-event',
|
||||||
['country' => str(session('lang_country', 'de'))->after('-')->lower(), 'meetup' => $model, 'event' => $model]),
|
['country' => str(session('lang_country', 'de'))->after('-')->lower(), 'meetup' => $model->meetup, 'event' => $model]),
|
||||||
str($model->meetup->slug)->replace('-', '_'),
|
str($model->meetup->slug)->replace('-', '_'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,10 @@ class extends Component {
|
|||||||
->get();
|
->get();
|
||||||
|
|
||||||
// Kombiniere und sortiere Activities
|
// Kombiniere und sortiere Activities
|
||||||
$activities = collect($recentMeetups->map(fn($m) => ['type' => 'meetup', 'data' => $m, 'created_at' => $m->created_at]))
|
$activities = collect($recentMeetups->map(fn($m)
|
||||||
|
=> [
|
||||||
|
'type' => 'meetup', 'data' => $m, 'created_at' => $m->created_at,
|
||||||
|
]))
|
||||||
->merge($recentEvents->map(fn($e) => ['type' => 'event', 'data' => $e, 'created_at' => $e->created_at]))
|
->merge($recentEvents->map(fn($e) => ['type' => 'event', 'data' => $e, 'created_at' => $e->created_at]))
|
||||||
->sortByDesc('created_at')
|
->sortByDesc('created_at')
|
||||||
->take(10);
|
->take(10);
|
||||||
@@ -35,17 +38,17 @@ class extends Component {
|
|||||||
public function placeholder(): string
|
public function placeholder(): string
|
||||||
{
|
{
|
||||||
return <<<'HTML'
|
return <<<'HTML'
|
||||||
<div class="relative overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-700">
|
<div class="relative overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-700">
|
||||||
<div class="p-6">
|
<div class="p-6">
|
||||||
<flux:heading size="lg" class="mb-4">{{ __('Aktivitäten') }}</flux:heading>
|
<flux:heading size="lg" class="mb-4">{{ __('Aktivitäten') }}</flux:heading>
|
||||||
<flux:text class="text-sm text-zinc-500 mb-4">{{ __('Neue Meetups und Termine') }}</flux:text>
|
<flux:text class="text-sm text-zinc-500 mb-4">{{ __('Neue Meetups und Termine') }}</flux:text>
|
||||||
<flux:separator class="my-4"/>
|
<flux:separator class="my-4"/>
|
||||||
<div class="flex items-center justify-center py-8">
|
<div class="flex items-center justify-center py-8">
|
||||||
<flux:icon.arrow-path class="animate-spin size-6 text-zinc-400" />
|
<flux:icon.arrow-path class="animate-spin size-6 text-zinc-400" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
HTML;
|
||||||
HTML;
|
|
||||||
}
|
}
|
||||||
}; ?>
|
}; ?>
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,8 @@ class extends Component {
|
|||||||
<flux:separator class="my-4"/>
|
<flux:separator class="my-4"/>
|
||||||
<div class="space-y-3">
|
<div class="space-y-3">
|
||||||
@foreach($topCountries as $country)
|
@foreach($topCountries as $country)
|
||||||
<div class="flex items-center justify-between gap-3 p-2 hover:bg-zinc-50 dark:hover:bg-zinc-800 rounded-lg transition-colors">
|
<div
|
||||||
|
class="flex items-center justify-between gap-3 p-2 hover:bg-zinc-50 dark:hover:bg-zinc-800 rounded-lg transition-colors">
|
||||||
<a href="{{ route('meetups.map', ['country' => $country->code]) }}">
|
<a href="{{ route('meetups.map', ['country' => $country->code]) }}">
|
||||||
<div class="flex items-center gap-3 flex-1">
|
<div class="flex items-center gap-3 flex-1">
|
||||||
<img alt="{{ $country->code }}"
|
<img alt="{{ $country->code }}"
|
||||||
@@ -105,7 +106,7 @@ class extends Component {
|
|||||||
</a>
|
</a>
|
||||||
<flux:chart :value="$country->sparkline" class="w-[5rem] aspect-[3/1]">
|
<flux:chart :value="$country->sparkline" class="w-[5rem] aspect-[3/1]">
|
||||||
<flux:chart.svg gutter="0">
|
<flux:chart.svg gutter="0">
|
||||||
<flux:chart.line class="text-green-500 dark:text-green-400" />
|
<flux:chart.line class="text-green-500 dark:text-green-400"/>
|
||||||
</flux:chart.svg>
|
</flux:chart.svg>
|
||||||
</flux:chart>
|
</flux:chart>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -63,17 +63,17 @@ class extends Component {
|
|||||||
public function placeholder(): string
|
public function placeholder(): string
|
||||||
{
|
{
|
||||||
return <<<'HTML'
|
return <<<'HTML'
|
||||||
<div class="relative overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-700">
|
<div class="relative overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-700">
|
||||||
<div class="p-6">
|
<div class="p-6">
|
||||||
<flux:heading size="lg" class="mb-4">{{ __('Top Meetups') }}</flux:heading>
|
<flux:heading size="lg" class="mb-4">{{ __('Top Meetups') }}</flux:heading>
|
||||||
<flux:text class="text-sm text-zinc-500 mb-4">{{ __('Meetups mit den meisten Usern') }}</flux:text>
|
<flux:text class="text-sm text-zinc-500 mb-4">{{ __('Meetups mit den meisten Usern') }}</flux:text>
|
||||||
<flux:separator class="my-4"/>
|
<flux:separator class="my-4"/>
|
||||||
<div class="flex items-center justify-center py-8">
|
<div class="flex items-center justify-center py-8">
|
||||||
<flux:icon.arrow-path class="animate-spin size-6 text-zinc-400" />
|
<flux:icon.arrow-path class="animate-spin size-6 text-zinc-400" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
HTML;
|
||||||
HTML;
|
|
||||||
}
|
}
|
||||||
}; ?>
|
}; ?>
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ class extends Component {
|
|||||||
</div>
|
</div>
|
||||||
<flux:chart :value="$meetup->sparkline" class="w-[5rem] aspect-[3/1]">
|
<flux:chart :value="$meetup->sparkline" class="w-[5rem] aspect-[3/1]">
|
||||||
<flux:chart.svg gutter="0">
|
<flux:chart.svg gutter="0">
|
||||||
<flux:chart.line class="text-green-500 dark:text-green-400" />
|
<flux:chart.line class="text-green-500 dark:text-green-400"/>
|
||||||
</flux:chart.svg>
|
</flux:chart.svg>
|
||||||
</flux:chart>
|
</flux:chart>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user