footer cateory

This commit is contained in:
Bayu Lukman Yusuf 2026-02-06 17:12:02 +07:00
parent ce5580acd7
commit 9288a13e07
8 changed files with 91 additions and 52 deletions

View File

@ -0,0 +1,29 @@
<?php
namespace App\View\Components;
use App\Repositories\Catalog\CategoryRepository;
use Closure;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class FooterCategory extends Component
{
public $categories;
/**
* Create a new component instance.
*/
public function __construct(CategoryRepository $categoryRepository)
{
$this->categories = $categoryRepository->getList([]);
}
/**
* Get the view / contents that represent the component.
*/
public function render(): View|Closure|string
{
return view('components.footer-category', ['categories' => $this->categories]);
}
}

19
lang/en/footer.php Normal file
View File

@ -0,0 +1,19 @@
<?php
return [
'computers' => 'Computers',
'smartphones' => 'Smartphones',
'tv_video' => 'TV, Video',
'speakers' => 'Speakers',
'cameras' => 'Cameras',
'printers' => 'Printers',
'video_games' => 'Video Games',
'headphones' => 'Headphones',
'wearable' => 'Wearable',
'hdd_ssd' => 'HDD/SSD',
'smart_home' => 'Smart Home',
'apple_devices' => 'Apple Devices',
'tablets' => 'Tablets',
'monitors' => 'Monitors',
'scanners' => 'Scanners'
];

View File

@ -0,0 +1,5 @@
<?php
return [
'title' => 'Popular Products',
];

19
lang/id/footer.php Normal file
View File

@ -0,0 +1,19 @@
<?php
return [
'computers' => 'Komputer',
'smartphones' => 'Smartphone',
'tv_video' => 'TV, Video',
'speakers' => 'Speaker',
'cameras' => 'Kamera',
'printers' => 'Printer',
'video_games' => 'Game Video',
'headphones' => 'Headphone',
'wearable' => 'Perangkat Wearable',
'hdd_ssd' => 'HDD/SSD',
'smart_home' => 'Smart Home',
'apple_devices' => 'Perangkat Apple',
'tablets' => 'Tablet',
'monitors' => 'Monitor',
'scanners' => 'Scanner'
];

View File

@ -0,0 +1,5 @@
<?php
return [
'title' => 'Produk Populer',
];

View File

@ -0,0 +1,12 @@
@if($categories && $categories->count() > 0)
<ul class="nav align-items-center text-body-tertiary gap-2">
@foreach($categories as $index => $category)
<li class="animate-underline">
<a class="nav-link fw-normal p-0 animate-target" href="#!">{{ $category->name }}</a>
</li>
@if($index < $categories->count() - 1)
<li class="px-1">/</li>
@endif
@endforeach
</ul>
@endif

View File

@ -5,7 +5,7 @@
<div class="col-md-6 col-xl-5 offset-xl-1 order-md-2 mb-4 mb-md-0">
<div class="ps-md-3 ps-lg-4 ps-xl-0">
<div class="d-flex align-items-center justify-content-between pb-4 mb-md-1 mb-lg-2 mb-xl-3">
<h2 class="me-3 mb-0">Popular products</h2>
<h2 class="me-3 mb-0">{{ __('home_popular_products.title') }}</h2>
<!-- Slider prev/next buttons -->
<div class="d-flex gap-2">

View File

@ -150,57 +150,7 @@
<!-- Category / tag links -->
<div class="d-flex flex-column gap-3 pb-3 pb-md-4 pb-lg-5 mt-n2 mt-sm-n4 mt-lg-0 mb-4">
<ul class="nav align-items-center text-body-tertiary gap-2">
<li class="animate-underline">
<a class="nav-link fw-normal p-0 animate-target" href="#!">Computers</a>
</li>
<li class="px-1">/</li>
<li class="animate-underline">
<a class="nav-link fw-normal p-0 animate-target" href="#!">Smartphones</a>
</li>
<li class="px-1">/</li>
<li class="animate-underline">
<a class="nav-link fw-normal p-0 animate-target" href="#!">TV, Video</a>
</li>
<li class="px-1">/</li>
<li class="animate-underline">
<a class="nav-link fw-normal p-0 animate-target" href="#!">Speakers</a>
</li>
<li class="px-1">/</li>
<li class="animate-underline">
<a class="nav-link fw-normal p-0 animate-target" href="#!">Cameras</a>
</li>
<li class="px-1">/</li>
<li class="animate-underline">
<a class="nav-link fw-normal p-0 animate-target" href="#!">Printers</a>
</li>
<li class="px-1">/</li>
<li class="animate-underline">
<a class="nav-link fw-normal p-0 animate-target" href="#!">Video Games</a>
</li>
<li class="px-1">/</li>
<li class="animate-underline">
<a class="nav-link fw-normal p-0 animate-target" href="#!">Headphones</a>
</li>
<li class="px-1">/</li>
<li class="animate-underline">
<a class="nav-link fw-normal p-0 animate-target" href="#!">Wearable</a>
</li>
<li class="px-1">/</li>
<li class="animate-underline">
<a class="nav-link fw-normal p-0 animate-target" href="#!">HDD/SSD</a>
</li>
<li class="px-1">/</li>
<li class="animate-underline">
<a class="nav-link fw-normal p-0 animate-target" href="#!">Smart Home</a>
</li>
<li class="px-1">/</li>
<li class="animate-underline">
<a class="nav-link fw-normal p-0 animate-target" href="#!">Apple Devices</a>
</li>
<li class="px-1">/</li>
<li class="animate-underline">
<a class="nav-link fw-normal p-0 animate-target" href="#!">Tablets</a>
</li>
<x-footer-category />
</ul>
<ul class="nav align-items-center text-body-tertiary gap-2">
<li class="animate-underline">