From a4418a500d8cfd1a054664575eec501684b6e2ec Mon Sep 17 00:00:00 2001 From: ifanprima130206 Date: Thu, 11 Dec 2025 10:26:33 +0700 Subject: [PATCH 1/5] feat(outlets): Add outlets page and fix color and function --- app/Providers/ViewServiceProvider.php | 9 +- resources/css/app.css | 12 +- .../views/components/layouts/home.blade.php | 282 ++++---- .../partials/home/_footer.blade.php | 146 ++-- .../partials/home/_header.blade.php | 34 +- .../livewire/home/article/index.blade.php | 429 ++++++------ .../views/livewire/home/faq/index.blade.php | 100 +-- resources/views/livewire/home/index.blade.php | 112 +++- .../views/livewire/home/outlets.blade.php | 174 ++++- .../livewire/home/partials/benefits.blade.php | 89 ++- .../home/partials/categories.blade.php | 102 +-- .../livewire/home/partials/cta.blade.php | 104 +-- .../home/partials/jumbotron/left.blade.php | 78 ++- .../home/partials/jumbotron/right.blade.php | 20 +- .../livewire/home/partials/partners.blade.php | 5 +- .../livewire/home/partials/why.blade.php | 103 +-- .../livewire/home/product/index.blade.php | 625 +++++++++--------- .../views/livewire/home/vouchers.blade.php | 186 ++++-- 18 files changed, 1522 insertions(+), 1088 deletions(-) diff --git a/app/Providers/ViewServiceProvider.php b/app/Providers/ViewServiceProvider.php index 028a2f5..736165d 100644 --- a/app/Providers/ViewServiceProvider.php +++ b/app/Providers/ViewServiceProvider.php @@ -16,7 +16,14 @@ public function boot(): void return; } - $priceRequestCount = PriceRequest::where('status', PriceRequestStatus::PENDING->value)->count(); + if (Schema::hasTable('price_requests') && Schema::hasColumn('price_requests', 'status')) { + $priceRequestCount = PriceRequest::where( + 'status', + PriceRequestStatus::PENDING->value + )->count(); + } else { + $priceRequestCount = 0; + } View::composer('*', function ($view) use ($priceRequestCount) { $sidebar = [ diff --git a/resources/css/app.css b/resources/css/app.css index b716798..7397bfa 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -4,10 +4,13 @@ @custom-variant dark (&:where(.dark, .dark *)); :root { - --home-background: #E5F0FF; - --home-accent: #D1E8FF; + --home-background: #F5FEFF; + --home-accent: #E2E8F0; --home-foreground: #000000; - --home-primary: #CAE8FF; + --home-primary: #0E2F76; + --home-secondary: #AAC0E1; + --home-surface: #C7B189; + --home-neutral: #334155; } @theme { --font-sans: Inter, sans-serif; @@ -18,6 +21,9 @@ @theme { --color-home-accent: var(--home-accent); --color-home-foreground: var(--home-foreground); --color-home-primary: var(--home-primary); + --color-home-secondary: var(--home-secondary); + --color-home-surface: var(--home-surface); + --color-home-neutral: var(--home-neutral); } @layer theme { diff --git a/resources/views/components/layouts/home.blade.php b/resources/views/components/layouts/home.blade.php index a64934a..7568aeb 100644 --- a/resources/views/components/layouts/home.blade.php +++ b/resources/views/components/layouts/home.blade.php @@ -1,175 +1,177 @@ - - - - {{ $title }} | {{ config('app.name') }} - @vite(['resources/css/app.css', 'resources/js/app.js']) - @fluxAppearance - - - - + + + + {{ $title }} | {{ config('app.name') }} + @vite(['resources/css/app.css', 'resources/js/app.js']) + @fluxAppearance + + + + - - @include('components.partials.home._header') + + @include('components.partials.home._header') + + @persist('toast') + + @endpersist + + {{ $slot }} + @include('components.partials.home._footer') - @persist('toast') - - @endpersist + @fluxScripts - {{ $slot }} - @fluxScripts + - + window.addEventListener('scroll', () => { + const isMenuOpen = !mobileMenu.classList.contains('hidden'); + if (isMenuOpen) return; + + const scrolled = window.scrollY > 10; + + if (scrolled) { + navbar.classList.add('bg-white/40', 'backdrop-blur-md', 'shadow-sm', 'border-gray-200'); + navbar.classList.remove('bg-transparent'); + + navLinks.classList.add('bg-white', 'border-home-accent'); + navLinks.classList.remove('bg-transparent', 'border-home-foreground'); + + cart.classList.add('border-home-accent', 'bg-white'); + cart.classList.remove('border-home-foreground'); + cart.querySelector('span').classList.add('text-home-foreground'); + + login.classList.add('border-home-accent', 'text-home-foreground', 'bg-white'); + login.classList.remove('border-home-foreground'); + + profile.classList.add('border-home-accent'); + profile.classList.remove('border-home-foreground'); + + setIconsScrolled(); + } else { + navbar.classList.add('bg-transparent'); + navbar.classList.remove('bg-white/40', 'backdrop-blur-md', 'shadow-sm', 'border-b', + 'border-gray-200'); + + navLinks.classList.add('bg-transparent', 'border-home-foreground', 'text-home-foreground'); + navLinks.classList.remove('bg-white', 'border-home-accent'); + + cart.classList.add('border-home-foreground'); + cart.classList.remove('border-home-accent', 'bg-white'); + cart.querySelector('span').classList.remove('text-home-foreground'); + cart.querySelector('span').classList.add('text-home-foreground'); + + login.classList.add('border-home-foreground', 'text-home-foreground'); + login.classList.remove('border-home-accent', 'bg-white'); + + profile.classList.add('border-home-foreground'); + profile.classList.remove('border-home-accent'); + + setIconsDark(); + } + }); + }); + + + diff --git a/resources/views/components/partials/home/_footer.blade.php b/resources/views/components/partials/home/_footer.blade.php index 1c54412..24331ad 100644 --- a/resources/views/components/partials/home/_footer.blade.php +++ b/resources/views/components/partials/home/_footer.blade.php @@ -1,92 +1,104 @@ -