From 459172dc73d596453e4c99c4a53ea9e1a5001b05 Mon Sep 17 00:00:00 2001 From: Bayu Lukman Yusuf Date: Wed, 25 Feb 2026 10:50:50 +0700 Subject: [PATCH] fix navbar --- .../Catalog/CategoryRepository.php | 1 + app/View/Components/Navbar/Categories.php | 34 + lang/en/navbar.php | 5 +- lang/id/navbar.php | 3 +- resources/views/404/fashion.blade.php | 2 +- .../views/checkout/marketplace.blade.php | 2 +- .../header-category-dropdown.blade.php | 10 +- .../grocery/popular-products.blade.php | 29 +- .../layout/header-grocery.blade.php | 11 +- .../components/navbar/categories.blade.php | 31 + resources/views/home/fashion-v2.blade.php | 2 +- resources/views/home/marketplace.blade.php | 2 +- resources/views/home/single-store.blade.php | 2 +- resources/views/index.blade.php | 2 +- .../layouts/partials/account-navbar.blade.php | 2 +- .../partials/marketplace-navbar.blade.php | 2 +- .../layouts/partials/menu-offcanvas.blade.php | 676 +++--------------- .../views/shop/product-fashion.blade.php | 8 +- 18 files changed, 210 insertions(+), 614 deletions(-) create mode 100644 app/View/Components/Navbar/Categories.php create mode 100644 resources/views/components/navbar/categories.blade.php diff --git a/app/Repositories/Catalog/CategoryRepository.php b/app/Repositories/Catalog/CategoryRepository.php index aafd7c9..0a68140 100644 --- a/app/Repositories/Catalog/CategoryRepository.php +++ b/app/Repositories/Catalog/CategoryRepository.php @@ -14,4 +14,5 @@ class CategoryRepository public function getList($params){ return Category::get(); } + } diff --git a/app/View/Components/Navbar/Categories.php b/app/View/Components/Navbar/Categories.php new file mode 100644 index 0000000..42edec5 --- /dev/null +++ b/app/View/Components/Navbar/Categories.php @@ -0,0 +1,34 @@ +categories = $categoryRepository->getList([]); + } + + /** + * Get the view / contents that represent the component. + */ + public function render(): View|Closure|string + { + + return view('components.navbar.categories', [ + 'categories' => $this->categories, + ]); + } +} diff --git a/lang/en/navbar.php b/lang/en/navbar.php index 114e838..ffd7c6e 100644 --- a/lang/en/navbar.php +++ b/lang/en/navbar.php @@ -13,5 +13,6 @@ return [ 'sign_in' => 'Sign In', 'sign_up' => 'Sign Up', 'contact' => 'Contact', - 'terms_conditions' => 'Terms & Conditions' -]; \ No newline at end of file + 'terms_conditions' => 'Terms & Conditions', + 'categories' => 'Categories' +]; diff --git a/lang/id/navbar.php b/lang/id/navbar.php index 8133d23..9054bce 100644 --- a/lang/id/navbar.php +++ b/lang/id/navbar.php @@ -13,5 +13,6 @@ return [ 'sign_in' => 'Masuk', 'sign_up' => 'Daftar', 'contact' => 'Kontak', - 'terms_conditions' => 'Syarat & Ketentuan' + 'terms_conditions' => 'Syarat & Ketentuan', + 'categories' => 'Kategori', ]; diff --git a/resources/views/404/fashion.blade.php b/resources/views/404/fashion.blade.php index 287f541..1a81b15 100644 --- a/resources/views/404/fashion.blade.php +++ b/resources/views/404/fashion.blade.php @@ -200,7 +200,7 @@