added yoga stuff, i18n, workout tracking and a dashboard to track progress

This commit is contained in:
2025-10-04 17:55:30 +03:00
parent 1ed9235451
commit d1bc362fab
32 changed files with 1790 additions and 63 deletions
+37
View File
@@ -90,4 +90,41 @@
</div>
</div>
</section>
@if(isset($similarExercises))
<section class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 pb-12">
<div class="mt-8">
<div class="flex items-end justify-between gap-4 mb-4">
<h2 class="text-2xl font-bold text-gray-900 dark:text-white">{{ __('app.exercises.similar') }}</h2>
<a href="{{ route('exercises.index') }}" class="text-sm font-semibold text-indigo-600 hover:text-indigo-500">{{ __('app.home.browse_all') }}</a>
</div>
@if($similarExercises->isEmpty())
<div class="rounded-2xl border border-dashed border-gray-300 dark:border-gray-700 p-6 text-center text-gray-600 dark:text-gray-300">{{ __('app.exercises.similar_none') }}</div>
@else
@php $badgePalette = ['bg-rose-100 text-rose-700','bg-amber-100 text-amber-700','bg-emerald-100 text-emerald-700','bg-sky-100 text-sky-700','bg-violet-100 text-violet-700']; @endphp
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
@foreach($similarExercises as $ex)
<a href="{{ route('exercises.show', $ex->slug) }}" class="group rounded-3xl overflow-hidden bg-white dark:bg-gray-800 ring-1 ring-gray-200 dark:ring-gray-700 shadow-sm hover:shadow-xl transition">
<div class="relative aspect-[16/9] overflow-hidden">
<img src="{{ $ex->gif_url ?: 'https://images.unsplash.com/photo-1517836357463-d25dfeac3438?q=80&w=1200&auto=format&fit=crop' }}" alt="{{ $ex->name }}" class="h-full w-full object-cover transition-transform duration-500 group-hover:scale-105">
<div class="absolute inset-0 bg-gradient-to-t from-black/50 to-transparent"></div>
<div class="absolute bottom-3 left-3 inline-flex items-center rounded-full bg-white/90 px-3 py-1 text-xs font-semibold text-gray-900 shadow">{{ $ex->name }}</div>
</div>
<div class="p-4">
<div class="mt-1 flex flex-wrap gap-2">
@foreach($ex->targetMuscles->take(2) as $i => $m)
<span class="inline-flex items-center rounded-full px-2.5 py-1 text-xs font-medium {{ $badgePalette[$i % count($badgePalette)] }}">{{ $m->name }}</span>
@endforeach
@if($ex->bodyParts->count())
<span class="inline-flex items-center rounded-full px-2.5 py-1 text-xs font-medium bg-gray-100 text-gray-700 dark:bg-gray-700 dark:text-gray-200">{{ $ex->bodyParts->first()->name }}</span>
@endif
</div>
</div>
</a>
@endforeach
</div>
@endif
</div>
</section>
@endif
</x-app-layout>