diff --git a/app/Http/Controllers/BlogController.php b/app/Http/Controllers/BlogController.php index 4985442..a8c3431 100644 --- a/app/Http/Controllers/BlogController.php +++ b/app/Http/Controllers/BlogController.php @@ -167,17 +167,17 @@ class BlogController extends Controller } if (class_exists(\App\Models\BlogCategory::class)) { - // Hoş Geldiniz bölümü altındaki 3'lü kategori vurgusu + // Hoş Geldiniz bölümü altındaki 4'lü kategori vurgusu $highlightCategories = \App\Models\BlogCategory::where('is_active', true) ->withCount('blogs') ->has('blogs') ->orderBy('sort_order') - ->take(3) + ->take(4) ->get(); - if ($highlightCategories->count() < 3) { + if ($highlightCategories->count() < 4) { $highlightCategories = \App\Models\BlogCategory::where('is_active', true) ->orderBy('sort_order') - ->take(3) + ->take(4) ->get(); } diff --git a/public/assets/img/photos/blog_cat_app.png b/public/assets/img/photos/blog_cat_app.png index 84726f2..5dd5de1 100644 Binary files a/public/assets/img/photos/blog_cat_app.png and b/public/assets/img/photos/blog_cat_app.png differ diff --git a/resources/views/blog/index.blade.php b/resources/views/blog/index.blade.php index aae99cf..1ddd6f0 100644 --- a/resources/views/blog/index.blade.php +++ b/resources/views/blog/index.blade.php @@ -66,65 +66,51 @@ @if(isset($highlightCategories) && $highlightCategories->count() > 0) - @php - $catCount = $highlightCategories->count(); - // Dynamically select column width based on category count - $gridClass = $catCount >= 4 ? 'md:w-6/12 lg:w-3/12 xl:w-3/12' : 'md:w-6/12 lg:w-4/12 xl:w-4/12'; - @endphp -
- @foreach($highlightCategories as $index => $hCat) - @php - $images = [ - 'teknoloji-cozumleri' => 'assets/img/photos/blog_cat_tech.png', - 'yapay-zeka' => 'assets/img/photos/blog_cat_ai.png', - 'muzik-teknolojileri' => 'assets/img/photos/blog_cat_music.png', - 'uygulama-gelistirme' => 'assets/img/photos/blog_cat_app.png', - ]; - $hImg = isset($images[$hCat->slug]) ? asset($images[$hCat->slug]) : asset('assets/img/photos/blog_cat_tech.png'); - $hUrl = route('blog.index', ['category' => $hCat->slug]); - @endphp -
-
-
- - {{ $hCat->name }} - -
-
Keşfet
-
-
-
-

- {{ $hCat->name }} -

+
+
+
+ @foreach($highlightCategories as $index => $hCat) + @php + $images = [ + 'teknoloji-cozumleri' => 'assets/img/photos/blog_cat_tech.png', + 'yapay-zeka' => 'assets/img/photos/blog_cat_ai.png', + 'muzik-teknolojileri' => 'assets/img/photos/blog_cat_music.png', + 'uygulama-gelistirme' => 'assets/img/photos/blog_cat_app.png', + ]; + $hImg = isset($images[$hCat->slug]) ? asset($images[$hCat->slug]) : asset('assets/img/photos/blog_cat_tech.png'); + $hUrl = route('blog.index', ['category' => $hCat->slug]); + @endphp +
+
+
+ + {{ $hCat->name }} + +
+
Keşfet
+
+
+ +
-
+ @endforeach
- @endforeach +
@endif - -
- @if(isset($categories) && $categories->count() > 0) -
- - Tümü - - @foreach($categories as $category) - - {{ $category->name }} - - @endforeach -
- @endif - - + +
+