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
+23 -23
View File
@@ -11,41 +11,41 @@
<div aria-hidden="true" class="pointer-events-none absolute -bottom-24 -right-24 h-72 w-72 rounded-full bg-cyan-400/30 blur-3xl"></div>
<div class="relative mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-20 sm:py-28 text-center">
<span class="inline-flex items-center gap-2 rounded-full bg-white/10 px-3 py-1 text-xs font-semibold text-white ring-1 ring-white/20 backdrop-blur">New • Explore 1,000+ moves</span>
<span class="inline-flex items-center gap-2 rounded-full bg-white/10 px-3 py-1 text-xs font-semibold text-white ring-1 ring-white/20 backdrop-blur">{{ __('app.home.badge') }}</span>
<h1 class="mt-4 text-4xl sm:text-6xl font-extrabold tracking-tight text-white drop-shadow">
Discover 1,000+ Exercises. Build Your Perfect Workout.
{{ __('app.home.title') }}
</h1>
<p class="mt-4 text-lg text-indigo-100 max-w-2xl mx-auto">
Explore FitAtlas to find exercises by muscle group and equipment, then craft routines that match your goals.
{{ __('app.home.subtitle') }}
</p>
<!-- Search Bar -->
<form action="{{ route('exercises.index') }}" method="GET" class="mt-8 max-w-2xl mx-auto">
<div class="flex rounded-2xl shadow-lg ring-1 ring-white/20 focus-within:ring-2 focus-within:ring-fuchsia-400/80 overflow-hidden bg-white/90 backdrop-blur">
<input type="text" name="q" placeholder="Search exercises (e.g. push up, dumbbell, back)" class="w-full px-4 py-3 text-gray-900 placeholder-gray-500 bg-transparent focus:outline-none">
<button type="submit" class="px-5 py-3 bg-gradient-to-r from-fuchsia-600 to-indigo-600 hover:from-fuchsia-500 hover:to-indigo-500 text-white font-semibold">Search</button>
<input type="text" name="q" placeholder="{{ __('app.home.search_placeholder') }}" class="w-full px-4 py-3 text-gray-900 placeholder-gray-500 bg-transparent focus:outline-none">
<button type="submit" class="px-5 py-3 bg-gradient-to-r from-fuchsia-600 to-indigo-600 hover:from-fuchsia-500 hover:to-indigo-500 text-white font-semibold">{{ __('app.home.search') }}</button>
</div>
</form>
<!-- Quick Filters -->
<div class="mt-6 flex flex-wrap items-center justify-center gap-3">
@php
$filters = ['Arms', 'Chest', 'Legs', 'Core', 'Back'];
$filters = ['arms', 'chest', 'legs', 'core', 'back'];
$filterColors = [
'Arms' => 'from-amber-400 to-orange-500',
'Chest' => 'from-rose-400 to-pink-500',
'Legs' => 'from-emerald-400 to-teal-500',
'Core' => 'from-sky-400 to-cyan-500',
'Back' => 'from-violet-400 to-indigo-500',
'arms' => 'from-amber-400 to-orange-500',
'chest' => 'from-rose-400 to-pink-500',
'legs' => 'from-emerald-400 to-teal-500',
'core' => 'from-sky-400 to-cyan-500',
'back' => 'from-violet-400 to-indigo-500',
];
@endphp
@foreach($filters as $filter)
<a href="{{ route('exercises.index') }}?muscle={{ strtolower($filter) }}" class="inline-flex items-center rounded-full bg-gradient-to-r {{ $filterColors[$filter] }} px-4 py-1.5 text-sm font-semibold text-white shadow hover:opacity-95 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-white/60">
{{ $filter }}
<a href="{{ route('exercises.index') }}?muscle={{ $filter }}" class="inline-flex items-center rounded-full bg-gradient-to-r {{ $filterColors[$filter] }} px-4 py-1.5 text-sm font-semibold text-white shadow hover:opacity-95 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-white/60">
{{ __('app.home.filters.' . $filter) }}
</a>
@endforeach
</div>
<div class="mt-8">
<a href="{{ route('workouts.builder') }}" class="inline-flex items-center gap-2 rounded-xl bg-gradient-to-r from-fuchsia-600 to-indigo-600 px-5 py-3 text-sm sm:text-base font-semibold text-white shadow-lg hover:from-fuchsia-500 hover:to-indigo-500">
Build a Workout
{{ __('app.nav.build_workout') }}
</a>
</div>
</div>
@@ -54,8 +54,8 @@
<!-- Featured Exercises -->
<section class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-12 sm:py-16">
<div class="flex items-end justify-between gap-4 mb-6">
<h2 class="text-2xl font-bold text-gray-900 dark:text-white">Featured Exercises</h2>
<a href="{{ route('exercises.index') }}" class="text-sm font-semibold text-indigo-600 hover:text-indigo-500">Browse all</a>
<h2 class="text-2xl font-bold text-gray-900 dark:text-white">{{ __('app.home.featured') }}</h2>
<a href="{{ route('exercises.index') }}" class="text-sm font-semibold text-indigo-600 hover:text-indigo-500">{{ __('app.home.browse_all') }}</a>
</div>
@php
$exercises = $exercises ?? [
@@ -96,9 +96,9 @@
<div class="relative mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8 items-center">
<div>
<h2 class="text-2xl sm:text-3xl font-extrabold text-gray-900 dark:text-white">Favorites</h2>
<p class="mt-3 text-gray-600 dark:text-gray-300">A balanced routine targeting all major muscle groups. Suitable for most levels and easy to adapt with available equipment.</p>
<a href="{{ route('workouts.builder') }}" class="mt-6 inline-flex items-center rounded-xl bg-gradient-to-r from-fuchsia-600 to-indigo-600 px-5 py-3 text-white font-semibold shadow-lg hover:from-fuchsia-500 hover:to-indigo-500">Try This Routine</a>
<h2 class="text-2xl sm:text-3xl font-extrabold text-gray-900 dark:text-white">{{ __('app.home.favorites') }}</h2>
<p class="mt-3 text-gray-600 dark:text-gray-300">{{ __('app.home.favorites_desc') }}</p>
<a href="{{ route('workouts.builder') }}" class="mt-6 inline-flex items-center rounded-xl bg-gradient-to-r from-fuchsia-600 to-indigo-600 px-5 py-3 text-white font-semibold shadow-lg hover:from-fuchsia-500 hover:to-indigo-500">{{ __('app.home.try_routine') }}</a>
</div>
<div class="relative h-64 sm:h-80">
<div class="absolute inset-0 rounded-3xl overflow-hidden ring-1 ring-gray-200 dark:ring-gray-700">
@@ -116,10 +116,10 @@
<div class="flex flex-col sm:flex-row items-center justify-between gap-4">
<div class="text-sm text-gray-600 dark:text-gray-300">© {{ date('Y') }} FitAtlas</div>
<div class="flex items-center gap-6 text-sm">
<a href="#" class="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">About</a>
<a href="#" class="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">Privacy</a>
<a href="#" class="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">Terms</a>
<a href="#" class="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">Contact</a>
<a href="#" class="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">{{ __('app.home.footer.about') }}</a>
<a href="#" class="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">{{ __('app.home.footer.privacy') }}</a>
<a href="#" class="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">{{ __('app.home.footer.terms') }}</a>
<a href="#" class="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">{{ __('app.home.footer.contact') }}</a>
</div>
<div class="flex items-center gap-4">
<a href="#" aria-label="Twitter" class="text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white">