@extends('public.layout') @php if (!function_exists('calculateReadingTime')) { function calculateReadingTime($body) { if (!$body) { return 2; } $text = strip_tags($body); $words = str_word_count($text); $minutes = ceil($words / 200); return max(1, $minutes); } } // Garantir que seoData existe e tem valores padrão if (!isset($seoData)) { $seoData = []; } @endphp @section('seo') @php // Passar dados de SEO para o layout // O layout já acessa $seoData diretamente @endphp @endsection @section('content') {{-- Links CSS específicos da página capa2 --}} {{-- Banner no topo da página --}}
@include('components.banners', ['regionCode' => 'topo', 'isHomepage' => true])
/* Bloco xsmall list - jl_xsli, jl_xsgrid */ .block-section.jl_hide_meta.jl_num_top.jl_hide_line.jl_hide_col_line[data-section_style="jl_xsli"] { background: none; border: none; padding: 0; } .jl_grid_wrap_f.jl_xsgrid { display: flex; flex-direction: column; gap: 20px; } .jl-roww.jl_fli_wrap { display: flex; flex-wrap: wrap; gap: 0; } .jl_mmlist_layout.jl_lisep.jl_risep.jl_in_num.jl_numl { flex: 1 1 25%; max-width: 25%; box-sizing: border-box; margin: 0 0 20px 0; padding: 0 12px; display: flex; flex-direction: column; background: none; } /* Número do item (não visível por padrão) */ .jl_li_in.jl_nun_i { display: flex; flex-direction: row; align-items: flex-start; gap: 0.7em; padding-bottom: 22px; min-height: 90px; } /* Thumb da imagem e arredondamento */ .jl_img_holder { position: relative; min-width: 90px; margin-right: 15px; margin-bottom: 0; } .jl_imgw.jl_radus_e { border-radius: 10px; overflow: hidden; display: block; width: 100%; max-width: 200px; box-shadow: none; } .jl_imgin img { display: block; width: 100%; max-width: 200px; height: auto; border-radius: 10px; object-fit: cover; } /* Link por cima da imagem */ a.jl_imgl { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 2; background: transparent; text-indent: -9999px; } /* Área de texto do post */ .jl_fe_text { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; } .jl_fe_title { font-size: 1.05em; line-height: 1.4em; font-weight: 700; margin-bottom: 0.5em; margin-top: 0.2em; color: #111; } .jl_fe_title a { color: inherit; text-decoration: none; transition: color .2s; } .jl_fe_title a:hover { color: #3898ec; } /* Categoria destacada */ .jl_f_cat.jl_lb1 { display: inline-block; margin-bottom: 7px; } .jl_cat_txt { text-transform: uppercase; font-size: 0.8em; font-weight: 500; color: #fff; background: #3898ec; padding: 2px 8px; border-radius: 100px; text-decoration: none; } a.jl_cat21 { background: #3898ec; } a.jl_cat17 { background: #ea9c2d; } /* Metadados do post e icones */ .jl_post_meta { display: flex; flex-direction: row; gap: 13px; align-items: center; font-size: 0.97em; color: #6d6d6d; } .post-read-time i.jli-timer { margin-right: 4px; font-size: 1em; } /* Compartilhamento */ .jl_fot_share_i { position: relative; margin-left: 10px; cursor: pointer; } .jl_share_l_bg { color: #b7b7b7; font-size: 15px; } .jls_tooltip { position: relative; display: inline-block; } .jls_tooltip_w { display: none; z-index: 999; position: absolute; left: 50%; top: -52px; transform: translateX(-50%); min-width: 190px; } .jl_fot_share_i:hover .jls_tooltip_w, .jls_tooltip:focus .jls_tooltip_w { display: block; } .jls_tooltiptext .jl_sli_in { display: flex; flex-direction: row; gap: 10px; padding: 7px 9px; background: #222; border-radius: 8px; box-shadow: 0 3px 14px rgba(140,140,140,.10); } .jl_sli_shli, .jl_shli { display: inline-block; } .jl_sli_fb .jl_sshl { color: #4372b2; } .jl_sli_tw .jl_sshl { color: #0096d3; } .jl_sli_pi .jl_sshl { color: #d7001d; } .jl_sli_din .jl_sshl { color: #0867b5; } .jl_sli_wapp .jl_sshl { color: #44d163; } .jl_sshl { font-size: 17px; line-height: 1; background: transparent; transition: color .2s; text-decoration: none; } .jl_sshl:hover { color: #ff7300 !important; } /* Responsivo */ @media (max-width: 900px) { .jl_mmlist_layout.jl_numl { max-width: 50%; flex-basis: 50%; } } @media (max-width: 600px) { .jl-roww.jl_fli_wrap { flex-direction: column; } .jl_mmlist_layout.jl_numl { max-width: 100%; flex-basis: 100%; padding: 0; } } /* Extra */ .jl_nun_d { display: none; } .jl_clear_at:before, .jl_clear_at:after { content: ""; display: table; clear: both; }
@php $xsmallArticles = $latestNews->take(4); @endphp @foreach ($xsmallArticles as $article) @php $articleImage = $article->topImage ?? $article->featuredImage; $articleUrl = "/{$article->slug}"; $shareUrl = urlencode(url($articleUrl)); $shareTitle = urlencode($article->title); $shareImage = urlencode($articleImage?->file_url ?? ''); $readingTime = calculateReadingTime($article->body); @endphp
@if ($articleImage && $articleImage->file_url) {{ $articleImage->alt_text ?? $article->title }} @endif
@if ($article->section) {{ $article->section->name }} @endif

{{ $article->title }}

@endforeach
@if ($featuredTop5->count() > 0) @php $pinnedArticle = $featuredTop5->where('pinned_to_homepage', true)->first(); $mainArticle = $pinnedArticle ?? $featuredTop5->first(); $articleImage = $mainArticle->topImage ?? $mainArticle->featuredImage; $articleUrl = "/{$mainArticle->slug}"; $shareUrl = urlencode(url($articleUrl)); $shareTitle = urlencode($mainArticle->title); $shareImage = urlencode($articleImage?->file_url ?? ''); $readingTime = calculateReadingTime($mainArticle->body); $authorName = $mainArticle->authorUser?->name ?? ($mainArticle->author_name ?? ($mainArticle->author ?? 'Redação')); $authorAvatar = $mainArticle->authorUser?->avatar_url ?? '/assets/theme/v6/images/profile_1-120x120.jpeg'; @endphp
@if ($articleImage && $articleImage->file_url) {{ $articleImage->alt_text ?? $mainArticle->title }} @endif
@if ($mainArticle->section) {{ $mainArticle->section->name }} @endif

{{ $mainArticle->title }}

@if ($mainArticle->headline || $mainArticle->excerpt)

{{ Str::limit($mainArticle->headline ?? ($mainArticle->excerpt ?? ''), 150) }}

@endif
@php $remainingArticles = $featuredTop5->reject(function ($article) use ($mainArticle) { return $article->id === $mainArticle->id; })->take(2); @endphp @foreach ($remainingArticles as $article) @php $articleImage = $article->topImage ?? $article->featuredImage; $articleUrl = "/{$article->slug}"; $shareUrl = urlencode(url($articleUrl)); $shareTitle = urlencode($article->title); $shareImage = urlencode($articleImage?->file_url ?? ''); $readingTime = calculateReadingTime($article->body); $authorName = $article->authorUser?->name ?? ($article->author_name ?? ($article->author ?? 'Redação')); $authorAvatar = $article->authorUser?->avatar_url ?? '/assets/theme/v6/images/profile_1-120x120.jpeg'; @endphp
@if ($articleImage && $articleImage->file_url) {{ $articleImage->alt_text ?? $article->title }} @endif
@if ($article->section) {{ $article->section->name }} @endif

{{ $article->title }}

@endforeach @endif
-Sponsored-
@include('components.banners', ['regionCode' => 'meio', 'isHomepage' => true])

Editor pick's

Find more

@php $gridArticles = $featuredOffset5->take(4); @endphp @foreach ($gridArticles as $article) @php $articleImage = $article->topImage ?? $article->featuredImage; $articleUrl = "/{$article->slug}"; $shareUrl = urlencode(url($articleUrl)); $shareTitle = urlencode($article->title); $shareImage = urlencode($articleImage?->file_url ?? ''); $readingTime = calculateReadingTime($article->body); $authorName = $article->authorUser?->name ?? ($article->author_name ?? ($article->author ?? 'Redação')); $authorAvatar = $article->authorUser?->avatar_url ?? '/assets/theme/v6/images/profile_1-120x120.jpeg'; @endphp
@if ($articleImage && $articleImage->file_url) {{ $articleImage->alt_text ?? $article->title }} @endif
@if ($article->section) {{ $article->section->name }} @endif

{{ $article->title }}

@if ($article->headline || $article->excerpt)

{{ Str::limit($article->headline ?? ($article->excerpt ?? ''), 150) }}

@endif
@endforeach
{{-- Bloco "Stories for you" com feature-video --}}

Stories for you

Find more

{{-- Feature Video Block - placeholder, pode ser implementado depois se necessário --}}
{{-- Video block placeholder --}}
{{-- Bloco "Lifestyle blogs" com large-post e list-post --}}

Lifestyle blogs

Find more

{{-- Large Post Block --}}
@php $largePost = $featuredOffset5->skip(4)->first() ?? $latestNews->skip(4)->first(); @endphp @if ($largePost) @php $articleImage = $largePost->topImage ?? $largePost->featuredImage; $articleUrl = "/{$largePost->slug}"; $shareUrl = urlencode(url($articleUrl)); $shareTitle = urlencode($largePost->title); $shareImage = urlencode($articleImage?->file_url ?? ''); $readingTime = calculateReadingTime($largePost->body); $authorName = $largePost->authorUser?->name ?? ($largePost->author_name ?? ($largePost->author ?? 'Redação')); $authorAvatar = $largePost->authorUser?->avatar_url ?? '/assets/theme/v6/images/profile_1-120x120.jpeg'; @endphp
@if ($articleImage && $articleImage->file_url) {{ $articleImage->alt_text ?? $largePost->title }} @endif
@if ($largePost->section) {{ $largePost->section->name }} @endif

{{ $largePost->title }}

@if ($largePost->headline || $largePost->excerpt)

{{ Str::limit($largePost->headline ?? ($largePost->excerpt ?? ''), 150) }}

@endif
@endif
{{-- List Post Block --}}
@php $listPosts = $latestNews->skip(8)->take(5); @endphp @foreach ($listPosts as $article) @php $articleImage = $article->topImage ?? $article->featuredImage; $articleUrl = "/{$article->slug}"; $shareUrl = urlencode(url($articleUrl)); $shareTitle = urlencode($article->title); $shareImage = urlencode($articleImage?->file_url ?? ''); $readingTime = calculateReadingTime($article->body); $authorName = $article->authorUser?->name ?? ($article->author_name ?? ($article->author ?? 'Redação')); $authorAvatar = $article->authorUser?->avatar_url ?? '/assets/theme/v6/images/profile_1-120x120.jpeg'; @endphp
@if ($articleImage && $articleImage->file_url) {{ $articleImage->alt_text ?? $article->title }} @endif
@if ($article->section) {{ $article->section->name }} @endif

{{ $article->title }}

@if ($article->headline || $article->excerpt)

{{ Str::limit($article->headline ?? ($article->excerpt ?? ''), 150) }}

@endif
@endforeach
{{-- Bloco "Worldwide news" com feature-layout7 --}}

Worldwide news

Find more

@php $fr7Main = $featuredOffset5->skip(5)->first() ?? $latestNews->skip(13)->first(); @endphp @if ($fr7Main) @php $articleImage = $fr7Main->topImage ?? $fr7Main->featuredImage; $articleUrl = "/{$fr7Main->slug}"; $shareUrl = urlencode(url($articleUrl)); $shareTitle = urlencode($fr7Main->title); $shareImage = urlencode($articleImage?->file_url ?? ''); $readingTime = calculateReadingTime($fr7Main->body); $authorName = $fr7Main->authorUser?->name ?? ($fr7Main->author_name ?? ($fr7Main->author ?? 'Redação')); $authorAvatar = $fr7Main->authorUser?->avatar_url ?? '/assets/theme/v6/images/profile_1-120x120.jpeg'; @endphp
@if ($articleImage && $articleImage->file_url) {{ $articleImage->alt_text ?? $fr7Main->title }} @endif
@if ($fr7Main->section) {{ $fr7Main->section->name }} @endif

{{ $fr7Main->title }}

@if ($fr7Main->headline || $fr7Main->excerpt)

{{ Str::limit($fr7Main->headline ?? ($fr7Main->excerpt ?? ''), 150) }}

@endif
@php $fr7Remaining = $featuredOffset5->skip(6)->take(3) ?? $latestNews->skip(14)->take(3); @endphp @foreach ($fr7Remaining as $article) @php $articleImage = $article->topImage ?? $article->featuredImage; $articleUrl = "/{$article->slug}"; $shareUrl = urlencode(url($articleUrl)); $shareTitle = urlencode($article->title); $shareImage = urlencode($articleImage?->file_url ?? ''); $readingTime = calculateReadingTime($article->body); $authorName = $article->authorUser?->name ?? ($article->author_name ?? ($article->author ?? 'Redação')); $authorAvatar = $article->authorUser?->avatar_url ?? '/assets/theme/v6/images/profile_1-120x120.jpeg'; @endphp
@if ($articleImage && $articleImage->file_url) {{ $articleImage->alt_text ?? $article->title }} @endif
@if ($article->section) {{ $article->section->name }} @endif

{{ $article->title }}

@endforeach @endif
{{-- Bloco Social List e Grid Overlay --}}
{{-- Social List Block - placeholder --}}
{{-- Social links placeholder --}}
{{-- Section Title "Explore more" --}}

Explore more

{{-- Grid Overlay Block --}}
@php $overlayPost = $featuredOffset5->skip(9)->first() ?? $latestNews->skip(17)->first(); @endphp @if ($overlayPost) @php $articleImage = $overlayPost->topImage ?? $overlayPost->featuredImage; $articleUrl = "/{$overlayPost->slug}"; $shareUrl = urlencode(url($articleUrl)); $shareTitle = urlencode($overlayPost->title); $shareImage = urlencode($articleImage?->file_url ?? ''); $readingTime = calculateReadingTime($overlayPost->body); $authorName = $overlayPost->authorUser?->name ?? ($overlayPost->author_name ?? ($overlayPost->author ?? 'Redação')); $authorAvatar = $overlayPost->authorUser?->avatar_url ?? '/assets/theme/v6/images/profile_1-120x120.jpeg'; @endphp
@if ($articleImage && $articleImage->file_url) {{ $articleImage->alt_text ?? $overlayPost->title }} @endif
@if ($overlayPost->section) {{ $overlayPost->section->name }} @endif

{{ $overlayPost->title }}

@endif
{{-- Bloco de anúncios adicional --}}
-Sponsored-
@include('components.banners', ['regionCode' => 'rodape', 'isHomepage' => true])
{{-- Bloco "Recent posts" --}}

Recent posts

Find more

@php $recentPosts = $latestNews->skip(18)->take(4); @endphp @foreach ($recentPosts as $article) @php $articleImage = $article->topImage ?? $article->featuredImage; $articleUrl = "/{$article->slug}"; $shareUrl = urlencode(url($articleUrl)); $shareTitle = urlencode($article->title); $shareImage = urlencode($articleImage?->file_url ?? ''); $readingTime = calculateReadingTime($article->body); $authorName = $article->authorUser?->name ?? ($article->author_name ?? ($article->author ?? 'Redação')); $authorAvatar = $article->authorUser?->avatar_url ?? '/assets/theme/v6/images/profile_1-120x120.jpeg'; @endphp
@if ($articleImage && $articleImage->file_url) {{ $articleImage->alt_text ?? $article->title }} @endif
@if ($article->section) {{ $article->section->name }} @endif

{{ $article->title }}

@if ($article->headline || $article->excerpt)

{{ Str::limit($article->headline ?? ($article->excerpt ?? ''), 150) }}

@endif
@endforeach
@endsection