@extends('layouts.app') @section('title', trans('messages.Edu Game Kabar- Fun Learning Games for Students')) @push('styles') @endpush @section('content')

@if($featuredGames->count() > 0)
@guest

{{ __('Demo Games') }}

{{ __('Try these 6 sample games - No login required!') }}

{{ __('Play 6 demo games for free! Purchase now to access 350+ educational games!') }}
@else

{{ __('Featured Games') }}

{{ __('Popular games loved by students') }}

@endguest
@foreach($featuredGames as $game)
@if($game->thumbnail) {{ $game->title }} @else
@endif
{{ $game->title }}

{{ Str::limit($game->description, 100) }}

{{ $game->plays_count }} {{ __('plays') }} {{ $game->category->name }}
@endforeach
@auth @else @endauth
@endif @if($categories->count() > 0)

{{ __('Game Categories') }}

{{ __('Choose games by your class level') }}

@foreach($categories->take(4) as $index => $category)
@php $icons = ['fas fa-gamepad', 'fas fa-puzzle-piece', 'fas fa-brain', 'fas fa-rocket', 'fas fa-star', 'fas fa-trophy', 'fas fa-heart', 'fas fa-magic']; $iconClass = $icons[$index % count($icons)]; @endphp
{{ $category->name }}

{{ $category->class_level }}

{{ $category->games_count }} {{ __('games') }}

@auth {{ __('Explore') }} @endauth
@endforeach
@if($categories->count() > 4)
@foreach($categories->skip(4) as $index => $category)
@php $icons = ['fas fa-gamepad', 'fas fa-puzzle-piece', 'fas fa-brain', 'fas fa-rocket', 'fas fa-star', 'fas fa-trophy', 'fas fa-heart', 'fas fa-magic']; $iconClass = $icons[($index + 4) % count($icons)]; @endphp
{{ $category->name }}

{{ $category->class_level }}

{{ $category->games_count }} {{ __('games') }}

@auth {{ __('Explore') }} @endauth
@endforeach
@endif
@endif @if($recentPosts->count() > 0)

{{ __('Latest News & Updates') }}

{{ __('Stay updated with our latest posts') }}

@foreach($recentPosts as $post)
@if($post->featured_image) {{ $post->title }} @endif
{{ $post->title }}

{{ Str::limit($post->excerpt, 100) }}

{{ $post->published_at->format('M d, Y') }} {{ $post->category->name }}
@endforeach
@endif @push('scripts') @endpush @endsection