@extends('theme1.layouts.app') @section('title') {!! !empty(getSEOTools()->home_title) ? getSEOTools()->home_title : __('messages.details.home') !!} @endsection @php $topAd = checkAdSpaced('index_top'); $bottomAd = checkAdSpaced('index_bottom'); if ($topAd) { $adImageDesktopTop = getAdImageDesktop(\App\Models\AdSpaces::INDEX_TOP_THEME_1); $adImageMobileTop = getAdImageMobile(\App\Models\AdSpaces::INDEX_TOP_THEME_1); } if ($bottomAd) { $adImageDesktopBottom = getAdImageDesktop(\App\Models\AdSpaces::INDEX_BOTTOM_THEME_1); $adImageMobileBottom = getAdImageMobile(\App\Models\AdSpaces::INDEX_BOTTOM_THEME_1); } @endphp @section('content')
@if (count(getBreakingPost()))
{{ __('messages.trending') }}
@endif
@foreach ($headlinePosts as $row)

{!! \Illuminate\Support\Str::limit($row->title, 40, '...') !!}

{{ ucfirst(__('messages.common.' . strtolower($row->created_at->format('M')))) }} {{ $row->created_at->format('d, Y') }}
@if ($row->post_types == \App\Models\Post::ARTICLE_TYPE_ACTIVE || $row->post_types == \App\Models\Post::OPEN_AI_ACTIVE) {{ getReadingTime($row->postArticle?->article_content ? $row->postArticle->article_content : $row->description) }} @elseif ($row->post_types == \App\Models\Post::GALLERY_TYPE_ACTIVE) {{ getReadingTime($allContent) }} @elseif ($row->post_types == \App\Models\Post::SORTED_TYPE_ACTIVE) {{ getReadingTime($allContent) }} @elseif ($row->post_types == \App\Models\Post::VIDEO_TYPE_ACTIVE) {{ getReadingTime($row->postVideo->video_content) }} @elseif ($row->post_types == \App\Models\Post::AUDIO_TYPE_ACTIVE) {{ getReadingTime($row->postAudios->audio_content) }} @endif
@endforeach
{{ __('messages.explore_category') }}

{{ __('messages.explore_category') }}

@foreach ($getCategories->where('posts_count', '>', 0) as $getCategory) @endforeach
@if ($topAd) @if (isset($adImageDesktopTop->code))
{!! $adImageDesktopTop->code !!}
@else
@endif @if (isset($adImageMobileTop->code))
{!! $adImageMobileTop->code !!}
@else
@endif @endif
@if (!empty($firstHeadlinePost))

{{ __('messages.details.whats_new') }}

@foreach ($postCategory as $category) @endforeach
@foreach ($postCategory as $category) @php $catePost = $category->posts->where( 'visibility', \App\Models\Post::VISIBILITY_ACTIVE, ); @endphp @endforeach
@endif
@if (!empty($getPoll->count()))
{{ __('messages.details.voting_poll') }}
@php $styleCss = ':style'; @endphp @foreach ($getPoll as $poll)

{!! $poll['question'] !!}

@csrf
@foreach ($getOption as $option) @if (!empty($poll->$option))
{!! $poll[$option] !!}
@endif @endforeach
@endforeach
@endif
@if ($bottomAd) @if (isset($adImageMobileBottom->code)) @else @endif @endif
@if (!empty(getPopularTags()))
@include('theme1.popular_tag', ['maxIterations' => $maxIterations])
@endif
@if (isset($latestPosts) && !$latestPosts->isEmpty())

{{ __('messages.details.latest_news') }}

@foreach ($latestPosts as $news)

{!! $news['title'] !!}

{{ ucfirst(__('messages.common.' . strtolower($news->created_at->format('M')))) }}{{ \Carbon\Carbon::parse($news['created_at'])->format(' d, Y') }}
@if ($news->post_types == \App\Models\Post::ARTICLE_TYPE_ACTIVE || $news->post_types == \App\Models\Post::OPEN_AI_ACTIVE) {{ getReadingTime( $news->postArticle?->article_content ? $news->postArticle->article_content : $news->description, ) }} @elseif ($news->post_types == \App\Models\Post::GALLERY_TYPE_ACTIVE) {{ getReadingTime($allContent) }} @elseif ($news->post_types == \App\Models\Post::SORTED_TYPE_ACTIVE) {{ getReadingTime($allContent) }} @elseif ($news->post_types == \App\Models\Post::VIDEO_TYPE_ACTIVE) {{ getReadingTime($news->postVideo->video_content) }} @elseif ($news->post_types == \App\Models\Post::AUDIO_TYPE_ACTIVE) {{ getReadingTime($news->postAudios->audio_content) }} @endif
@if ($loop->iteration >= 4) @break @endif @endforeach
@include('theme1.recommended', ['getRecommendedPost' => getRecommendedPost()->take(6)])
@endif @if (getBreakingPost()->isNotEmpty())
@if ($bottomAd) @if (isset($adImageMobileBottom->code))
{!! $adImageMobileBottom->code !!}
@else @endif @endif
@if (!empty(array_filter(getPopularNews()))) @include('theme1.most_read', [ 'popularNews' => array_slice(getPopularNews(), 0, 7), ]) @endif

{{ __('messages.details.breaking') }}

@foreach (getBreakingPost()->take(5) as $brekingPost)

{!! $brekingPost->title !!}

{!! Str::limit($brekingPost->description, 220) !!}

{{ ucfirst(__('messages.common.' . strtolower($brekingPost->created_at->format('M')))) }} {{ $brekingPost->created_at->format('d , Y') }}
@if ( $brekingPost->post_types == \App\Models\Post::ARTICLE_TYPE_ACTIVE || $brekingPost->post_types == \App\Models\Post::OPEN_AI_ACTIVE) {{ getReadingTime( $brekingPost->postArticle?->article_content ? $brekingPost->postArticle->article_content : $brekingPost->description, ) }} @elseif ($brekingPost->post_types == \App\Models\Post::GALLERY_TYPE_ACTIVE) {{ getReadingTime($allContent) }} @elseif ($brekingPost->post_types == \App\Models\Post::SORTED_TYPE_ACTIVE) {{ getReadingTime($allContent) }} @elseif ($brekingPost->post_types == \App\Models\Post::VIDEO_TYPE_ACTIVE) {{ getReadingTime($brekingPost->postVideo->video_content) }} @elseif ($brekingPost->post_types == \App\Models\Post::AUDIO_TYPE_ACTIVE) {{ getReadingTime($brekingPost->postAudios->audio_content) }} @endif
@endforeach
{{--
@include('theme1.most_read')

{{ __('messages.details.breaking') }}

@foreach (getBreakingPost()->take(5) as $brekingPost)
{!! $brekingPost->title !!}

{!! Str::limit($brekingPost->description, 220) !!}

{{ ucfirst(__('messages.common.' . strtolower($brekingPost->created_at->format('M')))) }} {{ $brekingPost->created_at->format('d , Y') }}
@if ($brekingPost->post_types == \App\Models\Post::ARTICLE_TYPE_ACTIVE || $brekingPost->post_types == \App\Models\Post::OPEN_AI_ACTIVE) {{ getReadingTime( $brekingPost->postArticle?->article_content ? $brekingPost->postArticle->article_content : $brekingPost->description, ) }} @elseif ($brekingPost->post_types == \App\Models\Post::GALLERY_TYPE_ACTIVE) {{ getReadingTime($allContent) }} @elseif ($brekingPost->post_types == \App\Models\Post::SORTED_TYPE_ACTIVE) {{ getReadingTime($allContent) }} @elseif ($brekingPost->post_types == \App\Models\Post::VIDEO_TYPE_ACTIVE) {{ getReadingTime($brekingPost->postVideo->video_content) }} @elseif ($brekingPost->post_types == \App\Models\Post::AUDIO_TYPE_ACTIVE) {{ getReadingTime($brekingPost->postAudios->audio_content) }} @endif
@endforeach
--}}
@endif @if ($bottomAd) @if (isset($adImageDesktopBottom->code))
{!! $adImageDesktopBottom->code !!}
@else
@endif @if (isset($adImageMobileBottom->code))
{!! $adImageMobileBottom->code !!}
@else
@endif @endif @if (!$featurePostCategory->isEmpty())

{{ __('messages.details.featured_post') }}

@endif
@endsection