@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') {{-- Banner no topo da página --}}
@include('components.banners', ['regionCode' => 'topo', 'isHomepage' => true])
Últimas
@foreach ($latestNews as $index => $article) @php $articleUrl = "/{$article->slug}"; $shareUrl = urlencode(url($articleUrl)); $shareTitle = urlencode($article->title); $readingTime = function_exists('calculateReadingTime') ? calculateReadingTime($article->body) : 2; @endphp @endforeach
@if ($featuredTop5->count() > 0) @php // Garantir que artigo fixado apareça primeiro $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
@endif
@php // Excluir o artigo principal (fixado ou primeiro) da lista dos 4 pequenos $remainingArticles = $featuredTop5 ->reject(function ($article) use ($mainArticle) { return $article->id === $mainArticle->id; }) ->take(4); @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

Aqui os colunistas


Mais Destaques

{{--

Find more

--}}
@foreach ($featuredOffset5 as $index => $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
@php $sectionsData = [ [ 'articles' => $sectionArticles1 ?? collect(), 'blockId' => '4d64b26', ], [ 'articles' => $sectionArticles2 ?? collect(), 'blockId' => '88a3a36', ], ['articles' => $sectionArticles3 ?? collect(), 'blockId' => '449ba50'], ]; @endphp
@foreach ($sectionsData as $sectionData) @if ($sectionData['articles']->count() > 0) @php $listArticles = $sectionData['articles']; @endphp
{{-- Lista de artigos secundários --}} @foreach ($listArticles as $article) @php $articleImage = $article->featuredImage; $articleUrl = "/{$article->slug}"; $articleShareUrl = urlencode(url($articleUrl)); $articleShareTitle = urlencode($article->title); $articleReadingTime = calculateReadingTime( $article->body, ); $articleSection = $article->section; @endphp
@if ($articleImage && $articleImage->file_url)
@if ($articleImage && $articleImage->file_url) {{ $article->title }} @else {{ $article->title }} @endif
@endif
@if ($articleSection) {{ $articleSection->name }} @endif

{{ $article->title }}

@endforeach
@endif @endforeach

Famosos & TV

Veja mais

{{-- Exibe os 4 últimos artigos da seção com drupal_tid=26 --}}
@php // Usar $famososTvArticles já passado do controller e pegar os 4 primeiros $famososTvArticlesDisplay = $famososTvArticles->take(4); @endphp @foreach ($famososTvArticlesDisplay as $article)
{{ $article->featuredImage?->alt_text ?? $article->title }}featuredImage?->file_url)) data-src="{{ $article->featuredImage->file_url }}" @endif >

{{ $article->title }}

{{ $article->summary ?? \Illuminate\Support\Str::limit(strip_tags($article->body ?? ''), 120) }}

@endforeach
@if (1 > 2)
Business

CEO arrested and accused of running an Adderall drug ring

What’s made Amazon shoppers fall in love with Tozos? Superior audio quality, of course, courtesy of 6-millimeter speaker drivers that produce powerful,...

Tech

Life Lately + My Favorite Coffee for the New Year

What’s made Amazon shoppers fall in love with Tozos? Superior audio quality, of course, courtesy of 6-millimeter speaker drivers that produce powerful,...

Business

CEO arrested and accused of running an Adderall drug ring

What’s made Amazon shoppers fall in love with Tozos? Superior audio quality, of course, courtesy of 6-millimeter speaker drivers that produce powerful,...

Tech

Life Lately + My Favorite Coffee for the New Year

What’s made Amazon shoppers fall in love with Tozos? Superior audio quality, of course, courtesy of 6-millimeter speaker drivers that produce powerful,...

Editor pick's

Find more

Sports

How to make your life routine more fun and eco-friendly

What’s made Amazon shoppers fall in love with Tozos? Superior audio quality,...

Business

Recovery and Cleanup in Florida After Hurricane Ian

What’s made Amazon shoppers fall in love with Tozos? Superior audio quality,...

Health

Why Is the Most American Fruit So Hard to Buy?

What’s made Amazon shoppers fall in love with Tozos? Superior audio quality,...

Health

Winners of Wildlife Photographer of the Year 2022

What’s made Amazon shoppers fall in love with Tozos? Superior audio quality,...

-Sponsored-
ads image

Recent Articles

Find more

Inspiration

The Dress Style Influencers are Wearing Right Now

What’s made Amazon shoppers fall in love with Tozos? Superior audio quality, of course, courtesy of 6-millimeter speaker drivers that produce powerful, crystal-clear...

Sports

The Unorthodox Solution to the World’s Migration Woes

What’s made Amazon shoppers fall in love with Tozos? Superior audio quality, of course, courtesy of 6-millimeter speaker drivers that produce powerful, crystal-clear...

Inspiration

The Books We Read Too Late And That You Should Read Now

What’s made Amazon shoppers fall in love with Tozos? Superior audio quality, of course, courtesy of 6-millimeter speaker drivers that produce powerful, crystal-clear...

Active

The Unexpected Power of Seeing Yourself as a Villain

What’s made Amazon shoppers fall in love with Tozos? Superior audio quality, of course, courtesy of 6-millimeter speaker drivers that produce powerful, crystal-clear...

Health

7 food myths dietitians wish people would stop believing

What’s made Amazon shoppers fall in love with Tozos? Superior audio quality, of course, courtesy of 6-millimeter speaker drivers that produce powerful, crystal-clear...

Active

Outdoor Photo Shooting With clean and Beautiful

What’s made Amazon shoppers fall in love with Tozos? Superior audio quality, of course, courtesy of 6-millimeter speaker drivers that produce powerful, crystal-clear...

Sports

How To Season 3: When Expectations Don’t Meet Reality

What’s made Amazon shoppers fall in love with Tozos? Superior audio quality, of course, courtesy of 6-millimeter speaker drivers that produce powerful, crystal-clear...

Health

Is This the Beginning of the End of the Internet?

What’s made Amazon shoppers fall in love with Tozos? Superior audio quality, of course, courtesy of 6-millimeter speaker drivers that produce powerful, crystal-clear...

@endif
@endsection