@extends('layouts.web') @php $catColors = ['teal' => '#3E7C77', 'amber' => '#D0A03A', 'purple' => '#8A5BB0', 'blue' => '#3F6FB0', 'coral' => '#B5503A', 'gray' => '#79847B']; $cc = $catColors[$post->category->color_key ?? 'gray'] ?? '#79847B'; @endphp @section('seo') @endsection @push('head') @if($post->published_at)@endif @if($post->updated_at)@endif @if($post->category)@endif @php $metaKeywords = $post->meta_keywords ?: $post->tags->pluck('name')->implode(', '); @endphp @if($metaKeywords)@endif @php $ld = array_filter([ '@context' => 'https://schema.org', '@type' => 'BlogPosting', 'headline' => $post->title, 'description' => $post->meta_description ?: $post->excerpt, 'image' => $post->og_image_url, 'datePublished' => $post->published_at?->toIso8601String(), 'dateModified' => $post->updated_at?->toIso8601String(), 'author' => $post->author ? ['@type' => 'Person', 'name' => $post->author->name] : null, 'publisher' => ['@type' => 'Organization', 'name' => config('seo.site_name', 'Fermenty'), 'logo' => ['@type' => 'ImageObject', 'url' => url(config('seo.organization.logo', '/img/favicon/fermenty-512.png'))]], 'mainEntityOfPage' => ruta('blog.show', $post->slug), 'keywords' => $metaKeywords ?: null, 'articleSection' => $post->category?->name, ], fn ($v) => $v !== null && $v !== ''); @endphp @endpush @section('content')
{{-- Header image first --}}
{{-- El LCP de la entrada: webp si existe y prioridad alta (fase 5). --}} {{ $post->title }}
@if($post->category){{ $post->category->name }}@endif

{{ $post->title }}

{{-- Small data line: category · date · author --}}
{!! \Illuminate\Support\Str::markdown($post->body ?? '') !!}
@if($post->tags->isNotEmpty())
@foreach($post->tags as $tag) #{{ $tag->name }} @endforeach
@endif {{-- Compartir: enlaces share simples, sin SDKs ni cookies de terceros (RGPD — paquete legal). La tarjeta de previsualización al pegar el enlace sale de los og: del (x-seo), no de estos botones. --}} @php $shareUrl = ruta('blog.show', $post->slug); $shareTitle = $post->meta_title ?: $post->title; @endphp {{-- Author box — the warm, personal touch --}} @if($post->author)
@include('blog.partials.author', ['author' => $post->author])
@endif
{{-- Related --}} @if($related->isNotEmpty())

Sigue leyendo

@foreach($related as $r)
{{ $r->title }}
{{ $r->read_time_minutes }} min
@endforeach
@endif {{-- Comments --}}
{{-- Con cero comentarios no se enseña el contador: «Comentarios (0)» repetido dice "aquí no viene nadie" (auditoría §2) --}}

{{ $commentCount > 0 ? 'Comentarios (' . $commentCount . ')' : 'Deja un comentario' }}

Los comentarios son moderados antes de publicarse.

@if(session('comment_ok'))
{{ is_string(session('comment_ok')) ? session('comment_ok') : '¡Gracias! Tu comentario está pendiente de aprobación.' }}
@endif @if($errors->any())
    @foreach($errors->all() as $e)
  • {{ $e }}
  • @endforeach
@endif {{-- List --}} @forelse($comments as $c)
{{ $c->author_name }} {{ $c->created_at->locale('es')->isoFormat('D MMM YYYY') }}
{{ $c->body }}
@foreach($c->replies as $reply)
{{ $reply->author_name }} {{ $reply->created_at->locale('es')->isoFormat('D MMM YYYY') }}
{{ $reply->body }}
@endforeach
@empty @endforelse {{-- Form --}}
@csrf
@endsection