@extends('layouts.public') @section('title', 'Tag: ' . $tagName . ' - Blog Lanyard Tangerang') @section('meta_description', 'Kumpulan artikel dengan tag ' . strtolower($tagName) . ' di Lanyard Tangerang. Temukan panduan, tips, dan insight terbaik dari tim kami.') @section('seo_type', 'website') @section('seo_og_image', '/uploads/lanyardtangerang-logo.webp') @if(request()->integer('page', 1) > 1) @section('seo_noindex', '1') @endif @section('content') @php $page = request()->get('page', 1); $img = fn ($src) => \App\Support\AssetUrl::relative($src); $slugify = function($s) { $s = trim($s); $s = mb_strtolower($s); $s = preg_replace('/[^a-z0-9]+/u', '-', $s); return trim($s, '-'); }; @endphp {{-- Hero Tag --}}
sell

#{{ $tagName }}

Menampilkan {{ $posts->total() }} artikel dengan tag {{ strtolower($tagName) }}. Jelajahi panduan & inspirasi lanyard custom terbaik.

{{-- Blog Grid --}}
@if ($posts->isEmpty())
label_off

Tidak ada artikel untuk tag ini

Coba cari tag lain atau kembali ke halaman blog.

arrow_back Kembali ke Blog
@else
@foreach ($posts as $post) @php $textOnly = trim(strip_tags($post->content ?? '')); $wordCount = $textOnly ? count(preg_split('/\s+/', $textOnly)) : 0; $readingTime = max(1, (int) ceil($wordCount / 200)); // Parse tags for each post $rawTags = $post->tags ?? ''; $parsedTags = collect(explode(',', $rawTags))->map(fn($t) => trim($t))->filter()->take(3); @endphp
{{-- Image --}} @if($post->featuredImage) {{ $post->title }} @else
article
@endif
{{-- Meta Row --}}
@if($post->author && $post->author->avatar) {{ $post->author->name }} @else
{{ strtoupper(substr($post->author->name ?? 'Admin', 0, 1)) }}
@endif {{ $post->author->name ?? 'Tim Lanyard' }}
{{ \Carbon\Carbon::parse($post->createdAt)->translatedFormat('j M Y') }} • {{ $readingTime }} mins
{{-- Body Content --}}
{{-- Title --}}

{{ $post->title }}

{{-- Excerpt --}}

{{ $post->metaDescription ?: 'Baca selengkapnya tentang topik ini di blog Lanyard Tangerang.' }}

{{-- Tags --}} @if($parsedTags->isNotEmpty())
@foreach($parsedTags as $t) @php $tSlug = $slugify($t); @endphp #{{ $t }} @endforeach
@endif
@endforeach
{{-- Pagination --}} @if ($posts->hasPages())
{{ $posts->links() }}
@endif @endif
@include('components.cta') @include('components.footer') @endsection