From 3916ef436e5a0a2b25c3844dd5659591dd605456 Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Sun, 14 Dec 2025 12:40:54 +0700 Subject: [PATCH] feat(cart, article, product): Introduce new Cart component, enhance Article and Product components with detail views, and update routing for improved navigation. --- app/Livewire/Home/Article/Index.php | 18 +- app/Livewire/Home/Cart/Index.php | 17 + app/Livewire/Home/Product/Index.php | 18 +- app/Providers/ViewServiceProvider.php | 9 +- resources/css/app.css | 12 +- .../views/components/layouts/home.blade.php | 73 +- .../sections/ui/home/_footer.blade.php | 146 ++-- .../sections/ui/home/_header.blade.php | 34 +- .../livewire/home/article/index.blade.php | 429 ++++++------ .../livewire/home/article/show.blade.php | 241 +++++++ .../views/livewire/home/cart/index.blade.php | 259 ++++++++ .../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.blade.php | 2 +- .../home/partials/jumbotron/left.blade.php | 75 +-- .../home/partials/jumbotron/right.blade.php | 22 +- .../livewire/home/partials/partners.blade.php | 5 +- .../livewire/home/partials/why.blade.php | 103 +-- .../livewire/home/product/index.blade.php | 625 +++++++++--------- .../livewire/home/product/show.blade.php | 274 ++++++++ .../views/livewire/home/vouchers.blade.php | 186 ++++-- routes/pages/home.php | 13 +- 26 files changed, 2252 insertions(+), 990 deletions(-) create mode 100644 app/Livewire/Home/Cart/Index.php create mode 100644 resources/views/livewire/home/article/show.blade.php create mode 100644 resources/views/livewire/home/cart/index.blade.php create mode 100644 resources/views/livewire/home/product/show.blade.php diff --git a/app/Livewire/Home/Article/Index.php b/app/Livewire/Home/Article/Index.php index 5deefe6..a10a7db 100644 --- a/app/Livewire/Home/Article/Index.php +++ b/app/Livewire/Home/Article/Index.php @@ -10,8 +10,24 @@ ])] class Index extends Component { + public bool $isDetail = false; + + public ?string $slug = null; + + public function mount(?string $slug = null) + { + if ($slug) { + $this->isDetail = true; + $this->slug = $slug; + } + } + public function render() { - return view('livewire.home.article.index'); + return view( + $this->isDetail + ? 'livewire.home.article.show' + : 'livewire.home.article.index' + ); } } diff --git a/app/Livewire/Home/Cart/Index.php b/app/Livewire/Home/Cart/Index.php new file mode 100644 index 0000000..0a6bcb7 --- /dev/null +++ b/app/Livewire/Home/Cart/Index.php @@ -0,0 +1,17 @@ + 'FAQ', +])] +class Index extends Component +{ + public function render() + { + return view('livewire.home.cart.index'); + } +} diff --git a/app/Livewire/Home/Product/Index.php b/app/Livewire/Home/Product/Index.php index c0713a1..c173813 100644 --- a/app/Livewire/Home/Product/Index.php +++ b/app/Livewire/Home/Product/Index.php @@ -10,8 +10,24 @@ ])] class Index extends Component { + public bool $isDetail = false; + + public ?string $slug = null; + + public function mount(?string $slug = null) + { + if ($slug) { + $this->isDetail = true; + $this->slug = $slug; + } + } + public function render() { - return view('livewire.home.product.index'); + return view( + $this->isDetail + ? 'livewire.home.product.show' + : 'livewire.home.product.index' + ); } } 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 78aa740..1b9e636 100644 --- a/resources/views/components/layouts/home.blade.php +++ b/resources/views/components/layouts/home.blade.php @@ -20,6 +20,8 @@ @endpersist {{ $slot }} + @include('components.sections.ui.home._footer') + @fluxScripts diff --git a/resources/views/livewire/home/cart/index.blade.php b/resources/views/livewire/home/cart/index.blade.php new file mode 100644 index 0000000..53363aa --- /dev/null +++ b/resources/views/livewire/home/cart/index.blade.php @@ -0,0 +1,259 @@ +@php + $cartItems = [ + [ + 'id' => 1, + 'name' => 'Oud Royal Premium', + 'category' => 'Luxury Collection', + 'size' => '50ml', + 'price' => 1200000, + 'image' => 'https://placehold.co/200x200/png?text=Oud+Royal', + 'quantity' => 1, + ], + [ + 'name' => 'Rose Velvet', + 'category' => 'Floral Series', + 'size' => '30ml', + 'price' => 450000, + 'image' => 'https://placehold.co/200x200/png?text=Rose+Velvet', + 'quantity' => 2, + ], + [ + 'name' => 'Ocean Breeze', + 'category' => 'Fresh Collection', + 'size' => '100ml', + 'price' => 320000, + 'image' => 'https://placehold.co/200x200/png?text=Ocean+Breeze', + 'quantity' => 1, + ], + ]; +@endphp + +
+ +
+ +
+
+
+
+ 1
+ Keranjang +
+
+
+
+ 2
+ Pengiriman +
+
+
+
+ 3
+ Pembayaran +
+
+
+ +

Keranjang Belanja (3 Item)

+ +
+ +
+ +
+ + + +

Pembelian di atas Rp 500.000 berhak mendapatkan Gratis Ongkir.

+
+ +
+ @foreach ($cartItems as $index => $item) +
+
+ {{ $item['name'] }} +
+ +
+
+
+

+ {{ $item['category'] }}

+

{{ $item['name'] }}

+

Ukuran: {{ $item['size'] }}

+
+ +
+ +
+
+ + + +
+
+

Rp + {{ number_format($item['price'] * $item['quantity'], 0, ',', '.') }}

+
+
+
+
+ @endforeach +
+ +
+

Mungkin Anda Suka

+
+ @for ($i = 1; $i <= 4; $i++) +
+
+ + +
+

Parfum Rekomendasi + {{ $i }}

+

Rp 299.000

+
+ @endfor +
+
+
+ + + +
+ +
+
+ + diff --git a/resources/views/livewire/home/faq/index.blade.php b/resources/views/livewire/home/faq/index.blade.php index 9fa2cb9..26c4de3 100644 --- a/resources/views/livewire/home/faq/index.blade.php +++ b/resources/views/livewire/home/faq/index.blade.php @@ -1,62 +1,78 @@
-
-
-

Frequently Asked Questions

-

- Temukan jawaban untuk pertanyaan umum Anda tentang produk dan layanan kami +

+ +
+

Frequently Asked Questions

+

+ Temukan jawaban cepat untuk pertanyaan umum seputar produk, pengiriman, dan layanan kami.

-
+
+ @foreach ([ - ['id' => 1, 'q' => 'Bagaimana cara melakukan pemesanan?', 'a' => 'Anda dapat melakukan pemesanan melalui website atau aplikasi kami. Pilih produk yang diinginkan, masukkan ke keranjang, dan ikuti langkah checkout.'], - ['id' => 2, 'q' => 'Berapa lama waktu pengiriman?', 'a' => 'Pengiriman untuk area Jakarta 1-2 hari kerja dan luar Jakarta 3-5 hari kerja tergantung ekspedisi yang dipilih.'], - ['id' => 3, 'q' => 'Apakah produk original?', 'a' => 'Semua produk 100% original dari distributor resmi dengan sertifikat keaslian dan garansi uang kembali.'], - ['id' => 4, 'q' => 'Bagaimana kebijakan pengembalian barang?', 'a' => 'Pengembalian dalam 30 hari dengan syarat barang belum digunakan, segel utuh, dan menyertakan video unboxing.'], - ['id' => 5, 'q' => 'Metode pembayaran apa saja yang tersedia?', 'a' => 'Kami menerima Transfer bank (BCA, Mandiri), Kartu Kredit, E-wallet (GoPay, OVO), dan cicilan 0%.'], - ['id' => 6, 'q' => 'Bagaimana cara menggunakan voucher?', 'a' => 'Masukkan kode voucher pada halaman checkout di kolom "Kode Promo", diskon akan otomatis terpotong.'], + ['q' => 'Bagaimana cara melakukan pemesanan?', 'a' => 'Anda dapat melakukan pemesanan melalui website atau aplikasi kami. Pilih produk yang diinginkan, masukkan ke keranjang, dan ikuti langkah checkout.'], + ['q' => 'Berapa lama waktu pengiriman?', 'a' => 'Pengiriman untuk area Jakarta 1-2 hari kerja dan luar Jakarta 3-5 hari kerja tergantung ekspedisi yang dipilih.'], + ['q' => 'Apakah produk original?', 'a' => 'Semua produk 100% original dari distributor resmi dengan sertifikat keaslian dan garansi uang kembali.'], + ['q' => 'Bagaimana kebijakan pengembalian barang?', 'a' => 'Pengembalian dalam 30 hari dengan syarat barang belum digunakan, segel utuh, dan menyertakan video unboxing.'], + ['q' => 'Metode pembayaran apa saja yang tersedia?', 'a' => 'Kami menerima Transfer bank (BCA, Mandiri), Kartu Kredit, E-wallet (GoPay, OVO), dan cicilan 0%.'], + ['q' => 'Bagaimana cara menggunakan voucher?', 'a' => 'Masukkan kode voucher pada halaman checkout di kolom "Kode Promo", diskon akan otomatis terpotong.'], ] as $index => $faq) -
+
+ -
-

- {{ $faq['a'] }} -

+
+ {{ $faq['a'] }}
-
@endforeach -
-
-

Masih ada pertanyaan?

-

Tim customer service kami siap membantu Anda 24/7

- +
+
+
+
+ +
+

Masih ada pertanyaan?

+

Jika Anda tidak menemukan jawaban yang dicari, tim + customer service kami siap membantu Anda 24/7.

+ +
+ + +
+
+
diff --git a/resources/views/livewire/home/index.blade.php b/resources/views/livewire/home/index.blade.php index 4419ecf..110fd61 100644 --- a/resources/views/livewire/home/index.blade.php +++ b/resources/views/livewire/home/index.blade.php @@ -12,14 +12,25 @@ #brand-slider img { user-select: none; -webkit-user-drag: none; - filter: grayscale(100%); + filter: brightness(0) invert(1); opacity: 0.6; transition: all 0.3s ease; + pointer-events: auto; } #brand-slider img:hover { - filter: grayscale(0%); + /* filter: brightness(0) invert(1); */ + filter: none; opacity: 1; + transform: scale(1.05); + } + + .cursor-grab { + cursor: grab; + } + + .cursor-grabbing { + cursor: grabbing; } .fade-enter { @@ -38,7 +49,6 @@ @script @endscript diff --git a/resources/views/livewire/home/outlets.blade.php b/resources/views/livewire/home/outlets.blade.php index 81108e5..6ff2cf3 100644 --- a/resources/views/livewire/home/outlets.blade.php +++ b/resources/views/livewire/home/outlets.blade.php @@ -1,3 +1,173 @@ -
- Outlet +
+ @php + $outlets = [ + [ + 'id' => 1, + 'name' => 'Yadi Parfum Central Park', + 'address' => 'Central Park Mall, Lt. LG, Unit 112, Jl. Letjen S. Parman No.28, Jakarta Barat', + 'city' => 'Jakarta Barat', + 'phone' => '+62 812-3456-7890', + 'hours' => '10:00 - 22:00 WIB', + 'image' => 'https://placehold.co/800x600/png?text=Boutique+Central+Park', + 'facilities' => ['Consultation', 'Refill Station', 'Engraving'], + 'status' => 'Buka', + ], + [ + 'id' => 2, + 'name' => 'Yadi Parfum Senayan City', + 'address' => 'Senayan City, Lt. 1, Unit 45, Jl. Asia Afrika Lot 19, Jakarta Pusat', + 'city' => 'Jakarta Pusat', + 'phone' => '+62 812-9876-5432', + 'hours' => '10:00 - 22:00 WIB', + 'image' => 'https://placehold.co/800x600/png?text=Boutique+Senayan', + 'facilities' => ['VIP Lounge', 'Consultation'], + 'status' => 'Buka', + ], + [ + 'id' => 3, + 'name' => 'Yadi Parfum Bandung', + 'address' => 'Paris Van Java, Resort Level, Jl. Sukajadi No.131-139, Bandung', + 'city' => 'Bandung', + 'phone' => '+62 822-1122-3344', + 'hours' => '10:00 - 21:00 WIB', + 'image' => 'https://placehold.co/800x600/png?text=Boutique+Bandung', + 'facilities' => ['Refill Station'], + 'status' => 'Tutup', + ], + ]; + @endphp + +
+ +
+ +
+ Lokasi + Butik +

Temukan Butik Terdekat

+

+ Rasakan pengalaman langsung kemewahan aroma kami. Kunjungi butik kami untuk konsultasi personal dan + layanan eksklusif. +

+ +
+
+
+
+
+ + + +
+ + +
+
+
+ +
+ @foreach ($outlets as $outlet) +
+ +
+
+
+ {{ $outlet['name'] }} + +
+ + {{ $outlet['status'] }} + +
+
+ +
+
+

+ {{ $outlet['name'] }}

+

{{ $outlet['address'] }}

+
+ +
+ @foreach ($outlet['facilities'] as $facility) + + {{ $facility }} + + @endforeach +
+ +
+
+ + + + {{ $outlet['hours'] }} +
+
+ + + + + Call Store +
+
+ +
+ + +
+
+
+ @endforeach +
+ +
+
+
+ + + + +
+ +
+
diff --git a/resources/views/livewire/home/partials/benefits.blade.php b/resources/views/livewire/home/partials/benefits.blade.php index 29ad950..84b3675 100644 --- a/resources/views/livewire/home/partials/benefits.blade.php +++ b/resources/views/livewire/home/partials/benefits.blade.php @@ -23,42 +23,63 @@ ]; @endphp -
-
-
- -
-
-

Keunggulan Produk Kami.

-

- Setiap parfum dibuat dengan standar tinggi agar kamu mendapatkan kualitas terbaik. -

+
+
+
+ +
+
+ Botol Parfum Elegan +
- @foreach ($accordions as $index => $acc) -
- -
-
- {{ $acc['content'] }} +
+ @foreach ($accordions as $index => $acc) +
+ + +
+
+ {{ $acc['content'] }} +
+
-
+ @endforeach
- @endforeach -
+ + + +
- + \ No newline at end of file diff --git a/resources/views/livewire/home/partials/categories.blade.php b/resources/views/livewire/home/partials/categories.blade.php index 12a9f10..ba38d7e 100644 --- a/resources/views/livewire/home/partials/categories.blade.php +++ b/resources/views/livewire/home/partials/categories.blade.php @@ -33,65 +33,65 @@ $totalPages = ceil($total / $perPage); @endphp -
+
-
-

- Temukan Aroma yang - Cocok dengan Kepribadianmu. -

-
+
-
+
+

+ Temukan Aroma yang + Cocok dengan Kepribadianmu. +

+

+ Pilih kategori aroma yang paling menggambarkan dirimu dan ciptakan kesan tak terlupakan. +

+
-
-
- @foreach ($currentItems as $industry) -
- - - -

- {{ $industry['name'] }} -

-
- @endforeach -
-
+
- +
+
+ @foreach ($currentItems as $industry) +
-
@endforeach
- + + + + +
diff --git a/resources/views/livewire/home/partials/cta.blade.php b/resources/views/livewire/home/partials/cta.blade.php index d7ddb46..cec71e7 100644 --- a/resources/views/livewire/home/partials/cta.blade.php +++ b/resources/views/livewire/home/partials/cta.blade.php @@ -1,47 +1,77 @@ -
-
-
+
-
- Testimoni Pelanggan yang Puas -
+
+
-
+
+

+ Bergabung dengan Member Eksklusif. +

+

+ Dapatkan akses awal ke koleksi terbaru, diskon member khusus, dan tips perawatan parfum langsung + dari ahlinya. +

-
- @for ($i = 0; $i < 5; $i++) - - @endfor -
- -
-
- "Fusce dapibus tellus ac cursus commodo, tortor mauris condimentum nibh ut fermentum massa, - justo sit amet vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor." -
- -
- - Coriss Ambady - - - Financial Analyst - -
-
- -
- + + +
+
+ User + User + User +
+

Bergabung bersama 2,000+ member lainnya.

+
+
+ +
-
+
\ No newline at end of file diff --git a/resources/views/livewire/home/partials/jumbotron.blade.php b/resources/views/livewire/home/partials/jumbotron.blade.php index cb8e76d..a023635 100644 --- a/resources/views/livewire/home/partials/jumbotron.blade.php +++ b/resources/views/livewire/home/partials/jumbotron.blade.php @@ -1,4 +1,4 @@ -
+
@include('livewire.home.partials.jumbotron.left') @include('livewire.home.partials.jumbotron.right')
\ No newline at end of file diff --git a/resources/views/livewire/home/partials/jumbotron/left.blade.php b/resources/views/livewire/home/partials/jumbotron/left.blade.php index ff67229..60cc6d0 100644 --- a/resources/views/livewire/home/partials/jumbotron/left.blade.php +++ b/resources/views/livewire/home/partials/jumbotron/left.blade.php @@ -1,5 +1,5 @@
+ class="relative w-full lg:w-[35%] pt-24 lg:pt-0 py-0 px-6 lg:p-10 flex flex-col justify-center text-lg space-y-6 z-20 bg-white">
@@ -20,32 +20,33 @@ class="border-2 border-home-background -ms-2 w-8 h-8 lg:w-10 lg:h-10 rounded-ful
-
- Plus 25K Trusted users! +
+ Plus 25K Trusted users!
-

- Discover your best
perfume at today +

+ Temukan parfum terbaikmu
+ hari ini

-

- Selecting a perfume is a personal journey. Consider your lifestyle, favorite scents, and the impression you want - to make. +

+ Memilih parfum adalah perjalanan yang personal. Pertimbangkan gaya hidupmu, aroma favorit, dan kesan yang ingin + kamu tinggalkan.

- +
+ class="relative w-full mt-10 h-[300px] lg:h-[250px] lg:w-[800px] lg:absolute lg:bottom-2 lg:left-10 lg:mt-0 bg-home-background/40 backdrop-blur-md border border-home-secondary rounded-2xl z-30 shadow-sm overflow-hidden"> -
+
+ class="testimonial-slide absolute inset-0 py-0 px-6 flex flex-col justify-center transition-all duration-500 ease-in-out opacity-100 z-10 translate-x-0">
+ class="w-12 h-12 rounded-full object-cover ring-2 ring-home-background">
-

Sarah Jenkins

-
★★★★★
+

Sarah Jenkins

+
★★★★★
-

"Aroma yang sangat elegan dan tahan - lama. Saya sangat menyukainya untuk dipakai sehari-hari ke kantor."

+

"Aroma yang sangat elegan dan + tahan lama. Saya sangat menyukainya untuk dipakai sehari-hari ke kantor."

+ class="testimonial-slide absolute inset-0 py-0 px-6 flex flex-col justify-center transition-all duration-500 ease-in-out opacity-0 z-0 translate-x-full">
+ class="w-12 h-12 rounded-full object-cover ring-2 ring-home-background">
-

Michael Chen

-
★★★★★
+

Michael Chen

+
★★★★★
-

"Pengiriman sangat cepat dan +

"Pengiriman sangat cepat dan packaging aman. Wanginya persis seperti deskripsi di website."

+ class="testimonial-slide absolute inset-0 py-0 px-6 flex flex-col justify-center transition-all duration-500 ease-in-out opacity-0 z-0 translate-x-full">
+ class="w-12 h-12 rounded-full object-cover ring-2 ring-home-background">
-

Jessica Tan

-
★★★★★
+

Jessica Tan

+
★★★★★
-

"Varian Product Two adalah favorit - saya! Sangat fresh dan tidak menyengat. Recommended!"

+

"Varian Product Two adalah + favorit saya! Sangat fresh dan tidak menyengat. Recommended!"

+ class="bg-home-background backdrop-blur-md rounded-2xl shadow-lg hover:shadow-xl transition-shadow flex flex-row items-center p-4 h-auto lg:h-[250px] group">
+ + -
+
+
+ Koleksi Parfum Eksklusif +
+
+ +
-
- + class="bg-white rounded-2xl p-8 shadow-sm hover:shadow-xl hover:-translate-y-1 transition-all duration-300 border border-gray-100 group"> +
+
-

Keaslian 100%

-

+

Keaslian 100%

+

Setiap botol dijamin original dari distributor resmi untuk kualitas dan aroma yang murni.

-
- + class="bg-white rounded-2xl p-8 shadow-sm hover:shadow-xl hover:-translate-y-1 transition-all duration-300 border border-gray-100 group"> +
+
-

Pengiriman Cepat

-

+

Pengiriman Cepat

+

Pesananmu diproses dan dikirim di hari yang sama untuk sampai lebih cepat dan aman.

-
- + class="bg-white rounded-2xl p-8 shadow-sm hover:shadow-xl hover:-translate-y-1 transition-all duration-300 border border-gray-100 group"> +
+
-

Harga Bersahabat

-

+

Harga Bersahabat

+

Nikmati parfum favorit dengan harga kompetitif tanpa mengurangi kualitas premium.

-
- + class="bg-white rounded-2xl p-8 shadow-sm hover:shadow-xl hover:-translate-y-1 transition-all duration-300 border border-gray-100 group"> +
+
-

Layanan Terbaik

-

+

Layanan Terbaik

+

Tim customer service kami siap membantu 24/7 untuk pengalaman belanja yang sempurna.

diff --git a/resources/views/livewire/home/product/index.blade.php b/resources/views/livewire/home/product/index.blade.php index a2eba69..d90a87d 100644 --- a/resources/views/livewire/home/product/index.blade.php +++ b/resources/views/livewire/home/product/index.blade.php @@ -1,353 +1,352 @@ -
-
-
+@php + $products = [ + [ + 'name' => 'Oud Royal Premium', + 'category' => 'Luxury', + 'price' => 1200000, + 'image' => 'https://placehold.co/400x500/png?text=Oud+Royal', + 'rating' => 5.0, + 'reviews' => 120, + 'is_new' => true, + 'colors' => ['#78350f', '#1f2937'], + ], + [ + 'name' => 'Rose Velvet', + 'category' => 'Floral', + 'price' => 450000, + 'image' => 'https://placehold.co/400x500/png?text=Rose+Velvet', + 'rating' => 4.8, + 'reviews' => 85, + 'is_new' => false, + 'colors' => ['#be123c', '#fce7f3'], + ], + [ + 'name' => 'Ocean Breeze', + 'category' => 'Fresh', + 'price' => 320000, + 'image' => 'https://placehold.co/400x500/png?text=Ocean+Breeze', + 'rating' => 4.9, + 'reviews' => 200, + 'is_new' => false, + 'colors' => ['#0ea5e9', '#e0f2fe'], + ], + [ + 'name' => 'Vanilla Sky', + 'category' => 'Sweet', + 'price' => 350000, + 'image' => 'https://placehold.co/400x500/png?text=Vanilla+Sky', + 'rating' => 4.7, + 'reviews' => 150, + 'is_new' => true, + 'colors' => ['#d4d4d8', '#71717a'], + ], + [ + 'name' => 'Midnight Musk', + 'category' => 'Musky', + 'price' => 550000, + 'image' => 'https://placehold.co/400x500/png?text=Midnight+Musk', + 'rating' => 4.6, + 'reviews' => 90, + 'is_new' => false, + 'colors' => ['#1f2937', '#000000'], + ], + [ + 'name' => 'Citrus Energy', + 'category' => 'Fresh', + 'price' => 280000, + 'image' => 'https://placehold.co/400x500/png?text=Citrus+Energy', + 'rating' => 4.5, + 'reviews' => 60, + 'is_new' => false, + 'colors' => ['#eab308', '#fef08a'], + ], + ]; - -
-
-
-
- - - - -
+
+ +
+
+ + + + +
+
+ + + + +
- - -
- -
-

Menampilkan 12 dari 48 koleksi parfum

- @php - $mainProducts = [ - [ - 'name' => 'Aqua Di Luna', - 'description' => 'Fresh aquatic fragrance', - 'price' => 249000, - 'image' => 'https://placehold.co/400x500/png', - 'colors' => ['#10b981', '#3b82f6', '#1f2937'], - ], - [ - 'name' => 'Velvet Bloom', - 'description' => 'Bunga merah jambu dengan musk', - 'price' => 189000, - 'image' => 'https://placehold.co/400x500/png', - 'colors' => ['#ec4899', '#f97316', '#6b7280'], - ], - [ - 'name' => 'Santal Noir', - 'description' => 'Sandalwood oriental elegance', - 'price' => 350000, - 'image' => 'https://placehold.co/400x500/png', - 'colors' => ['#8b4513', '#1f2937', '#f5f5f5'], - ], - [ - 'name' => 'Citron Essence', - 'description' => 'Lemon dan bergamot fresh', - 'price' => 159000, - 'image' => 'https://placehold.co/400x500/png', - 'colors' => ['#fbbf24', '#f59e0b', '#1f2937'], - ], - [ - 'name' => 'Rose Garden', - 'description' => 'Mawar klasik modern', - 'price' => 199000, - 'image' => 'https://placehold.co/400x500/png', - 'colors' => ['#ef4444', '#ec4899', '#6b7280'], - ], - [ - 'name' => 'Lavender Dream', - 'description' => 'Aromatherapy lavender murni', - 'price' => 129000, - 'image' => 'https://placehold.co/400x500/png', - 'colors' => ['#a78bfa', '#7c3aed', '#1f2937'], - ], - ]; - @endphp - -
- @foreach ($mainProducts as $product) +
+ @foreach ($products as $item)
-
- {{ $product['name'] }} - + class="group bg-white rounded-2xl border border-home-foreground/10 overflow-hidden hover:shadow-xl hover:shadow-home-primary/5 hover:border-home-primary/30 hover:-translate-y-1 transition-all duration-300 flex flex-col h-full relative"> + + @if ($item['is_new']) + New + @endif + +
+ {{ $item['name'] }} + +
+ + + + + + + + +
-
-
- @foreach ($product['colors'] as $color) - - @endforeach -
-

{{ $product['name'] }}

-

{{ $product['description'] }}

-
+ +
+
Rp{{ number_format($product['price'], 0, ',', '.') }} + class="text-[10px] font-bold tracking-widest text-home-primary uppercase bg-home-primary/10 px-2 py-1 rounded">{{ $item['category'] }} +
+ + + + {{ $item['rating'] }} + ({{ $item['reviews'] }}) +
+
+ +

+ {{ $item['name'] }}

+ +
+ Rp + {{ number_format($item['price'], 0, ',', '.') }} +
-
@endforeach
- - -
-
- -
- - -
-
- -
- @php - $otherProducts = [ - [ - 'name' => 'Oud Royal', - 'description' => 'Oud premium luxury', - 'price' => 1200000, - 'image' => 'https://placehold.co/400x500/png', - 'colors' => ['#78350f', '#1f2937', '#d1d5db'], - ], - [ - 'name' => 'Coconut Paradise', - 'description' => 'Tropical eksotis', - 'price' => 169000, - 'image' => 'https://placehold.co/400x500/png', - 'colors' => ['#f4a460', '#d2691e', '#8b4513'], - ], - [ - 'name' => 'Musk Addiction', - 'description' => 'Musk manis tahan lama', - 'price' => 149000, - 'image' => 'https://placehold.co/400x500/png', - 'colors' => ['#d4a373', '#a0826d', '#5a4a42'], - ], - [ - 'name' => 'Woody Spice', - 'description' => 'Kayu rempah maskulin', - 'price' => 229000, - 'image' => 'https://placehold.co/400x500/png', - 'colors' => ['#92400e', '#1f2937', '#c2410c'], - ], - [ - 'name' => 'Jasmine Nights', - 'description' => 'Melati romantis malam', - 'price' => 269000, - 'image' => 'https://placehold.co/400x500/png', - 'colors' => ['#be123c', '#e11d48', '#6b7280'], - ], - [ - 'name' => 'Mint Fresh', - 'description' => 'Mint herbal menenangkan', - 'price' => 139000, - 'image' => 'https://placehold.co/400x500/png', - 'colors' => ['#10b981', '#059669', '#047857'], - ], - ]; - @endphp - - @foreach ($otherProducts as $product) -
-
- {{ $product['name'] }} - -
-
-
- @foreach ($product['colors'] as $color) - - @endforeach -
-

{{ $product['name'] }} -

-

{{ $product['description'] }}

-
- Rp{{ number_format($product['price'], 0, ',', '.') }} -
- -
-
- @endforeach -
-
- + +
+ +
+
+

Mungkin Anda Suka

+
+ + +
+
+ +
+ @foreach ($recommendations as $rec) +
+
+ {{ $rec['name'] }} +
+
+
+ {{ $rec['category'] }}
+

{{ $rec['name'] }}

+
+ Rp + {{ number_format($rec['price'], 0, ',', '.') }} + +
+
+
+ @endforeach +
+
+
\ No newline at end of file diff --git a/resources/views/livewire/home/vouchers.blade.php b/resources/views/livewire/home/vouchers.blade.php index 3b6db2b..2fee8fb 100644 --- a/resources/views/livewire/home/vouchers.blade.php +++ b/resources/views/livewire/home/vouchers.blade.php @@ -1,98 +1,160 @@ -
-
-
-

Voucher

-

Dapatkan diskon spesial dengan voucher eksklusif kami

+
+
+ +
+

Voucher Eksklusif

+

Nikmati potongan harga spesial untuk koleksi parfum + favorit Anda.

-
+
-
- +
+ - + class="w-full py-3 pl-11 pr-4 rounded-xl border border-home-foreground/10 text-home-foreground placeholder-home-foreground/40 focus:outline-none focus:ring-2 focus:ring-home-primary focus:border-transparent transition shadow-sm">
- +
+
+ + + + +
- +
+ + + + +
+
-
+
@foreach ($vouchers as $voucher)
-
-
+ class="bg-white rounded-2xl border border-home-foreground/10 overflow-hidden hover:shadow-xl hover:shadow-home-primary/5 hover:border-home-primary/30 hover:-translate-y-1 transition-all duration-300 group flex flex-col h-full"> + +
+
-
+
- {{ $voucher->tags }}
-

{{ $voucher->name }}

-

{{ $voucher->summary }}

- -
-

Kode Voucher:

-

- {{ $voucher->code }}

+ class="inline-flex items-center gap-2 bg-white px-3 py-1 rounded-full border border-home-primary/10 shadow-sm mb-4"> + + {{ $voucher->tags }}
-
-
- Min. Pembelian: - {{ $voucher->min_purchase_formatted }} +

+ {{ $voucher->name }} +

+

+ {{ $voucher->summary }} +

+ +
+
+

+ Kode Voucher

+

+ {{ $voucher->code }} +

-
- Berlaku s.d.: - -
-
- Sisa Voucher: - {{ $voucher->available_count }} / - {{ $voucher->quota ?? '∞' }} +
+ + + +
-
+
+
+ + + + + + Min. Pembelian + + {{ $voucher->min_purchase_formatted }} +
+
+ + + + + + Berlaku Hingga + + +
+
+ + + + + Sisa Kuota + + + {{ $voucher->available_count }} / {{ $voucher->quota ?? '∞' }} + +
+
+ +
@endforeach - -
- {{ $vouchers->links() }} -
+ +
+ {{ $vouchers->links() }} +
+
diff --git a/routes/pages/home.php b/routes/pages/home.php index 704ee32..57901a4 100644 --- a/routes/pages/home.php +++ b/routes/pages/home.php @@ -1,6 +1,7 @@ name('product.') ->group(function () { - Route::prefix('perfumes') - ->name('perfume.') - ->group(function () { - Route::get('/', ProductComponent::class)->name('index'); - }); + Route::get('perfumes/{slug?}', ProductComponent::class) + ->name('perfume'); }); Route::get('/vouchers', VoucherComponent::class)->name('voucher'); @@ -27,7 +25,10 @@ Route::prefix('articles') ->name('article.') ->group(function () { - Route::get('/', ArticleIndex::class)->name('index'); + Route::get('{slug?}', ArticleIndex::class) + ->name('index'); }); Route::get('/faq', FaqComponent::class)->name('faq'); + +Route::get('/cart', CartComponent::class)->name('cart');