complete story 1.4 with qa tests and fixes
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<div class="flex aspect-square size-8 items-center justify-center rounded-md bg-accent-content text-accent-foreground">
|
||||
<x-app-logo-icon class="size-5 fill-current text-white dark:text-black" />
|
||||
<div class="flex aspect-square size-8 items-center justify-center rounded-md bg-navy text-gold">
|
||||
<svg class="size-5" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="ms-1 grid flex-1 text-start text-sm">
|
||||
<span class="mb-0.5 truncate leading-tight font-semibold">Laravel Starter Kit</span>
|
||||
<span class="mb-0.5 truncate leading-tight font-semibold">Libra</span>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<footer class="bg-navy mt-auto" data-test="main-footer">
|
||||
<div class="max-w-[1200px] mx-auto px-4 py-8">
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
|
||||
<!-- Logo & Description -->
|
||||
<div class="text-center md:text-start">
|
||||
<x-logo size="small" />
|
||||
<p class="mt-3 text-gold-light text-sm">
|
||||
{{ __('footer.description') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Contact Information -->
|
||||
<div class="text-center md:text-start">
|
||||
<h3 class="text-gold font-semibold mb-3">{{ __('footer.contact') }}</h3>
|
||||
<address class="text-gold-light text-sm not-italic space-y-1">
|
||||
<p>{{ __('footer.address') }}</p>
|
||||
<p>{{ __('footer.phone') }}</p>
|
||||
<p>{{ __('footer.email') }}</p>
|
||||
</address>
|
||||
</div>
|
||||
|
||||
<!-- Legal Links -->
|
||||
<div class="text-center md:text-start">
|
||||
<h3 class="text-gold font-semibold mb-3">{{ __('footer.legal') }}</h3>
|
||||
<ul class="space-y-2">
|
||||
<li>
|
||||
<a
|
||||
href="{{ route('terms') }}"
|
||||
class="text-gold-light hover:text-gold transition-colors text-sm"
|
||||
data-test="footer-terms"
|
||||
>
|
||||
{{ __('footer.terms') }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="{{ route('privacy') }}"
|
||||
class="text-gold-light hover:text-gold transition-colors text-sm"
|
||||
data-test="footer-privacy"
|
||||
>
|
||||
{{ __('footer.privacy') }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Copyright -->
|
||||
<div class="mt-8 pt-6 border-t border-gold/20 text-center">
|
||||
<p class="text-gold-light text-sm" data-test="footer-copyright">
|
||||
© {{ date('Y') }} {{ __('footer.copyright') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
@@ -2,21 +2,21 @@
|
||||
<a
|
||||
href="{{ route('language.switch', 'ar') }}"
|
||||
@class([
|
||||
'text-sm px-2 py-1 rounded transition-colors',
|
||||
'text-sm px-2 py-1 rounded transition-colors min-h-[32px] flex items-center',
|
||||
'bg-gold text-navy font-bold' => app()->getLocale() === 'ar',
|
||||
'text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100' => app()->getLocale() !== 'ar',
|
||||
'text-gold hover:text-gold-light' => app()->getLocale() !== 'ar',
|
||||
])
|
||||
data-test="language-switch-ar"
|
||||
>
|
||||
العربية
|
||||
</a>
|
||||
<span class="text-zinc-400 dark:text-zinc-600">|</span>
|
||||
<span class="text-gold/50">|</span>
|
||||
<a
|
||||
href="{{ route('language.switch', 'en') }}"
|
||||
@class([
|
||||
'text-sm px-2 py-1 rounded transition-colors',
|
||||
'text-sm px-2 py-1 rounded transition-colors min-h-[32px] flex items-center',
|
||||
'bg-gold text-navy font-bold' => app()->getLocale() === 'en',
|
||||
'text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100' => app()->getLocale() !== 'en',
|
||||
'text-gold hover:text-gold-light' => app()->getLocale() !== 'en',
|
||||
])
|
||||
data-test="language-switch-en"
|
||||
>
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" dir="{{ app()->getLocale() === 'ar' ? 'rtl' : 'ltr' }}">
|
||||
<head>
|
||||
@include('partials.head')
|
||||
</head>
|
||||
<body class="min-h-screen flex flex-col bg-cream" style="font-family: var(--font-{{ app()->getLocale() === 'ar' ? 'arabic' : 'english' }})">
|
||||
<!-- Skip to content link for keyboard accessibility -->
|
||||
<a
|
||||
href="#main-content"
|
||||
class="sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 focus:z-[100] focus:bg-gold focus:text-navy focus:px-4 focus:py-2 focus:rounded-md focus:font-semibold"
|
||||
data-test="skip-to-content"
|
||||
>
|
||||
{{ __('Skip to content') }}
|
||||
</a>
|
||||
|
||||
<x-navigation />
|
||||
|
||||
<!-- Spacer for fixed navigation -->
|
||||
<div class="h-16"></div>
|
||||
|
||||
<main id="main-content" class="flex-1" tabindex="-1">
|
||||
<div class="max-w-[1200px] mx-auto px-4 py-8">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<x-footer />
|
||||
|
||||
@fluxScripts
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,20 @@
|
||||
@props(['size' => 'default'])
|
||||
|
||||
@if(file_exists(public_path('images/logo.svg')))
|
||||
<img
|
||||
src="{{ asset('images/logo.svg') }}"
|
||||
alt="{{ __('Libra Law Firm') }}"
|
||||
@class([
|
||||
'h-8' => $size === 'small',
|
||||
'h-12' => $size === 'default',
|
||||
'h-16' => $size === 'large',
|
||||
])
|
||||
/>
|
||||
@else
|
||||
<span @class([
|
||||
'font-bold text-gold',
|
||||
'text-lg' => $size === 'small',
|
||||
'text-2xl' => $size === 'default',
|
||||
'text-3xl' => $size === 'large',
|
||||
])>Libra</span>
|
||||
@endif
|
||||
@@ -0,0 +1,226 @@
|
||||
<nav
|
||||
x-data="{ mobileMenuOpen: false }"
|
||||
class="fixed top-0 inset-x-0 z-50 bg-navy"
|
||||
data-test="main-navigation"
|
||||
>
|
||||
<div class="max-w-[1200px] mx-auto px-4">
|
||||
<div class="flex items-center justify-between h-16">
|
||||
<!-- Logo - Left on desktop -->
|
||||
<div class="shrink-0 hidden md:block">
|
||||
<a href="{{ route('home') }}" class="flex items-center" wire:navigate>
|
||||
<x-logo />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Mobile: Hamburger + Centered Logo + Language -->
|
||||
<div class="flex items-center justify-between w-full md:hidden">
|
||||
<!-- Hamburger Button -->
|
||||
<button
|
||||
@click="mobileMenuOpen = !mobileMenuOpen"
|
||||
class="p-2 text-gold hover:text-gold-light focus:outline-none min-h-[44px] min-w-[44px] flex items-center justify-center"
|
||||
:aria-expanded="mobileMenuOpen"
|
||||
aria-label="{{ __('Toggle navigation menu') }}"
|
||||
data-test="mobile-menu-button"
|
||||
>
|
||||
<svg x-show="!mobileMenuOpen" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
|
||||
</svg>
|
||||
<svg x-show="mobileMenuOpen" x-cloak class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<!-- Centered Logo on Mobile -->
|
||||
<a href="{{ route('home') }}" class="flex items-center" wire:navigate>
|
||||
<x-logo />
|
||||
</a>
|
||||
|
||||
<!-- Language Toggle on Mobile -->
|
||||
<div class="min-w-[44px]">
|
||||
<x-language-toggle />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Desktop Navigation Links -->
|
||||
<div class="hidden md:flex md:items-center md:gap-6">
|
||||
<a
|
||||
href="{{ route('home') }}"
|
||||
@class([
|
||||
'text-gold hover:text-gold-light transition-colors py-2',
|
||||
'border-b-2 border-gold' => request()->routeIs('home'),
|
||||
])
|
||||
wire:navigate
|
||||
data-test="nav-home"
|
||||
>
|
||||
{{ __('navigation.home') }}
|
||||
</a>
|
||||
<a
|
||||
href="{{ route('booking') }}"
|
||||
@class([
|
||||
'text-gold hover:text-gold-light transition-colors py-2',
|
||||
'border-b-2 border-gold' => request()->routeIs('booking*'),
|
||||
])
|
||||
wire:navigate
|
||||
data-test="nav-booking"
|
||||
>
|
||||
{{ __('navigation.booking') }}
|
||||
</a>
|
||||
<a
|
||||
href="{{ route('posts.index') }}"
|
||||
@class([
|
||||
'text-gold hover:text-gold-light transition-colors py-2',
|
||||
'border-b-2 border-gold' => request()->routeIs('posts*'),
|
||||
])
|
||||
wire:navigate
|
||||
data-test="nav-posts"
|
||||
>
|
||||
{{ __('navigation.posts') }}
|
||||
</a>
|
||||
|
||||
@auth
|
||||
@php
|
||||
$dashboardRoute = auth()->user()->isAdmin() ? route('admin.dashboard') : route('client.dashboard');
|
||||
@endphp
|
||||
<a
|
||||
href="{{ $dashboardRoute }}"
|
||||
@class([
|
||||
'text-gold hover:text-gold-light transition-colors py-2',
|
||||
'border-b-2 border-gold' => request()->routeIs('*.dashboard'),
|
||||
])
|
||||
wire:navigate
|
||||
data-test="nav-dashboard"
|
||||
>
|
||||
{{ __('navigation.dashboard') }}
|
||||
</a>
|
||||
<form method="POST" action="{{ route('logout') }}" class="inline">
|
||||
@csrf
|
||||
<button
|
||||
type="submit"
|
||||
class="text-gold hover:text-gold-light transition-colors py-2"
|
||||
data-test="nav-logout"
|
||||
>
|
||||
{{ __('navigation.logout') }}
|
||||
</button>
|
||||
</form>
|
||||
@else
|
||||
<a
|
||||
href="{{ route('login') }}"
|
||||
@class([
|
||||
'text-gold hover:text-gold-light transition-colors py-2',
|
||||
'border-b-2 border-gold' => request()->routeIs('login'),
|
||||
])
|
||||
wire:navigate
|
||||
data-test="nav-login"
|
||||
>
|
||||
{{ __('navigation.login') }}
|
||||
</a>
|
||||
@endauth
|
||||
</div>
|
||||
|
||||
<!-- Desktop Language Toggle -->
|
||||
<div class="hidden md:block">
|
||||
<x-language-toggle />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Mobile Menu -->
|
||||
<div
|
||||
x-show="mobileMenuOpen"
|
||||
x-trap.inert.noscroll="mobileMenuOpen"
|
||||
x-transition:enter="transition ease-out duration-200"
|
||||
x-transition:enter-start="opacity-0 -translate-y-1"
|
||||
x-transition:enter-end="opacity-100 translate-y-0"
|
||||
x-transition:leave="transition ease-in duration-150"
|
||||
x-transition:leave-start="opacity-100 translate-y-0"
|
||||
x-transition:leave-end="opacity-0 -translate-y-1"
|
||||
x-cloak
|
||||
@click.away="mobileMenuOpen = false"
|
||||
@keydown.escape.window="mobileMenuOpen = false"
|
||||
class="md:hidden bg-navy border-t border-gold/20"
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-label="{{ __('Mobile navigation menu') }}"
|
||||
data-test="mobile-menu"
|
||||
>
|
||||
<div class="px-4 py-3 space-y-1">
|
||||
<a
|
||||
href="{{ route('home') }}"
|
||||
@class([
|
||||
'block px-3 py-3 text-gold hover:text-gold-light hover:bg-navy/80 rounded-md min-h-[44px] flex items-center',
|
||||
'bg-navy/50 border-s-2 border-gold' => request()->routeIs('home'),
|
||||
])
|
||||
wire:navigate
|
||||
@click="mobileMenuOpen = false"
|
||||
data-test="mobile-nav-home"
|
||||
>
|
||||
{{ __('navigation.home') }}
|
||||
</a>
|
||||
<a
|
||||
href="{{ route('booking') }}"
|
||||
@class([
|
||||
'block px-3 py-3 text-gold hover:text-gold-light hover:bg-navy/80 rounded-md min-h-[44px] flex items-center',
|
||||
'bg-navy/50 border-s-2 border-gold' => request()->routeIs('booking*'),
|
||||
])
|
||||
wire:navigate
|
||||
@click="mobileMenuOpen = false"
|
||||
data-test="mobile-nav-booking"
|
||||
>
|
||||
{{ __('navigation.booking') }}
|
||||
</a>
|
||||
<a
|
||||
href="{{ route('posts.index') }}"
|
||||
@class([
|
||||
'block px-3 py-3 text-gold hover:text-gold-light hover:bg-navy/80 rounded-md min-h-[44px] flex items-center',
|
||||
'bg-navy/50 border-s-2 border-gold' => request()->routeIs('posts*'),
|
||||
])
|
||||
wire:navigate
|
||||
@click="mobileMenuOpen = false"
|
||||
data-test="mobile-nav-posts"
|
||||
>
|
||||
{{ __('navigation.posts') }}
|
||||
</a>
|
||||
|
||||
@auth
|
||||
@php
|
||||
$dashboardRoute = auth()->user()->isAdmin() ? route('admin.dashboard') : route('client.dashboard');
|
||||
@endphp
|
||||
<a
|
||||
href="{{ $dashboardRoute }}"
|
||||
@class([
|
||||
'block px-3 py-3 text-gold hover:text-gold-light hover:bg-navy/80 rounded-md min-h-[44px] flex items-center',
|
||||
'bg-navy/50 border-s-2 border-gold' => request()->routeIs('*.dashboard'),
|
||||
])
|
||||
wire:navigate
|
||||
@click="mobileMenuOpen = false"
|
||||
data-test="mobile-nav-dashboard"
|
||||
>
|
||||
{{ __('navigation.dashboard') }}
|
||||
</a>
|
||||
<form method="POST" action="{{ route('logout') }}">
|
||||
@csrf
|
||||
<button
|
||||
type="submit"
|
||||
class="w-full text-start px-3 py-3 text-gold hover:text-gold-light hover:bg-navy/80 rounded-md min-h-[44px] flex items-center"
|
||||
data-test="mobile-nav-logout"
|
||||
>
|
||||
{{ __('navigation.logout') }}
|
||||
</button>
|
||||
</form>
|
||||
@else
|
||||
<a
|
||||
href="{{ route('login') }}"
|
||||
@class([
|
||||
'block px-3 py-3 text-gold hover:text-gold-light hover:bg-navy/80 rounded-md min-h-[44px] flex items-center',
|
||||
'bg-navy/50 border-s-2 border-gold' => request()->routeIs('login'),
|
||||
])
|
||||
wire:navigate
|
||||
@click="mobileMenuOpen = false"
|
||||
data-test="mobile-nav-login"
|
||||
>
|
||||
{{ __('navigation.login') }}
|
||||
</a>
|
||||
@endauth
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
Reference in New Issue
Block a user