@extends('layouts.site') @section('content') @if(isset($carouselPosts) && $carouselPosts->count() > 0) @foreach($carouselPosts as $cPost) @php $cTitle = method_exists($cPost, 'translate') ? $cPost->translate('title') : $cPost->title; $cExcerpt = method_exists($cPost, 'translate') ? $cPost->translate('excerpt') : ($cPost->excerpt ?? ''); $cCategoryName = $cPost->category ? $cPost->category->name : ''; $cCategorySlug = $cPost->category ? $cPost->category->slug : ''; $cDate = $cPost->published_at ? $cPost->published_at->format('d M Y') : $cPost->created_at->format('d M Y'); $cImage = $cPost->featured_image ? asset('storage/' . $cPost->featured_image) : asset('assets/img/photos/tb1.jpg'); $cUrl = route('blog.show', $cPost->slug); @endphp @if($cCategoryName) {{ $cCategoryName }} @endif {{ \Illuminate\Support\Str::limit($cTitle, 60) }} {{ $cDate }} @if($cPost->author || $cPost->careerApplication) {{ $cPost->author_name }} @endif @endforeach @endif Merhaba! Biz Trunçgil. Blogumuza hoş geldiniz. Burada web tasarım, yazılım geliştirme ve teknolojik yeniliklere dair ipuçlarını ve deneyimlerimizi paylaşıyoruz. @if(isset($highlightCategories) && $highlightCategories->count() > 0) @foreach($highlightCategories as $index => $hCat) @php $images = [ 'teknoloji-cozumleri' => 'assets/img/photos/blog_cat_tech.png', 'yapay-zeka' => 'assets/img/photos/blog_cat_ai.png', 'muzik-teknolojileri' => 'assets/img/photos/blog_cat_music.png', 'uygulama-gelistirme' => 'assets/img/photos/blog_cat_app.png', ]; $hImg = isset($images[$hCat->slug]) ? asset($images[$hCat->slug]) : asset('assets/img/photos/blog_cat_tech.png'); $hUrl = route('blog.index', ['category' => $hCat->slug]); @endphp Keşfet {{ $hCat->name }} @endforeach @endif @include('blog.partials.posts') @push('structured-data') @php $siteName = setting('site_name', 'Trunçgil Teknoloji'); $siteLogo = setting('site_logo') ? (str_starts_with(setting('site_logo'), 'http') ? setting('site_logo') : asset('storage/' . ltrim(setting('site_logo'), '/'))) : asset('assets/img/logo.png'); $sitePhone = setting('contact_phone', '+902244431620'); $siteEmail = setting('contact_email', 'info@truncgil.com'); $siteAddress = setting('contact_address', 'Gaziantep Teknopark, Şahinbey, Gaziantep'); $socialLinksRaw = setting('social_links'); $socialLinks = []; if ($socialLinksRaw) { $decoded = json_decode($socialLinksRaw, true); if (is_array($decoded)) { $socialLinks = array_values(array_filter($decoded)); } elseif (is_string($socialLinksRaw)) { $socialLinks = [$socialLinksRaw]; } } if (empty($socialLinks)) { $socialLinks = [ 'https://twitter.com/truncgil', 'https://facebook.com/truncgil', 'https://instagram.com/truncgil', 'https://youtube.com/truncgil', 'https://linkedin.com/company/truncgil' ]; } // 1. Organization & LocalBusiness combined $publisherData = [ "@context" => "https://schema.org", "@type" => "ProfessionalService", "@id" => url('/') . "#organization", "name" => $siteName, "url" => url('/'), "logo" => [ "@type" => "ImageObject", "url" => $siteLogo ], "image" => $siteLogo, "telephone" => $sitePhone, "email" => $siteEmail, "address" => [ "@type" => "PostalAddress", "streetAddress" => $siteAddress, "addressLocality" => "Şahinbey", "addressRegion" => "Gaziantep", "postalCode" => "27010", "addressCountry" => "TR" ], "geo" => [ "@type" => "GeoCoordinates", "latitude" => 37.0274446, "longitude" => 37.3074315 ], "hasMap" => "https://maps.google.com/?q=37.0274446,37.3074315", "sameAs" => $socialLinks, "areaServed" => [ ["@type" => "Country", "name" => "TR"], ["@type" => "Country", "name" => "DE"], ["@type" => "Country", "name" => "RU"], ["@type" => "Country", "name" => "US"], ["@type" => "AdministrativeArea", "name" => "Gaziantep"], ["@type" => "AdministrativeArea", "name" => "Bursa"] ], "priceRange" => "$$" ]; // 2. Breadcrumbs $activeCategorySlug = request()->query('category'); $activeCategory = null; if ($activeCategorySlug && isset($sidebarCategories)) { $activeCategory = $sidebarCategories->firstWhere('slug', $activeCategorySlug); } if (!$activeCategory && $activeCategorySlug && isset($highlightCategories)) { $activeCategory = $highlightCategories->firstWhere('slug', $activeCategorySlug); } $activeCategoryName = $activeCategory ? $activeCategory->name : null; $breadcrumbList = [ [ "@type" => "ListItem", "position" => 1, "name" => "Anasayfa", "item" => url('/') ], [ "@type" => "ListItem", "position" => 2, "name" => "Blog", "item" => route('blog.index') ] ]; if ($activeCategorySlug && $activeCategoryName) { $breadcrumbList[] = [ "@type" => "ListItem", "position" => 3, "name" => $activeCategoryName, "item" => route('blog.index', ['category' => $activeCategorySlug]) ]; } $breadcrumbs = [ "@context" => "https://schema.org", "@type" => "BreadcrumbList", "itemListElement" => $breadcrumbList ]; // 3. Blog List & Posts $blogPostsList = []; if (isset($posts) && count($posts) > 0) { foreach ($posts as $p) { $pTitle = method_exists($p, 'translate') ? $p->translate('title') : $p->title; $pExcerpt = method_exists($p, 'translate') ? $p->translate('excerpt') : ($p->excerpt ?? ''); $pContent = method_exists($p, 'translate') ? $p->translate('content') : ($p->content ?? ''); $pExcerptText = trim(strip_tags($pExcerpt)); if (empty($pExcerptText)) { $pExcerptText = \Illuminate\Support\Str::limit(trim(strip_tags($pContent)), 160); } $pUrl = route('blog.show', $p->slug); $pImageUrl = $p->featured_image ? asset('storage/' . $p->featured_image) : ($p->featured_image_url ?? asset('assets/img/photos/tb10.jpg')); $blogPostsList[] = [ "@type" => "BlogPosting", "headline" => $pTitle, "description" => $pExcerptText, "image" => $pImageUrl, "url" => $pUrl, "datePublished" => $p->published_at ? $p->published_at->toIso8601String() : $p->created_at->toIso8601String(), "author" => [ "@type" => "Person", "name" => $p->author_name ] ]; } } $blogSchema = [ "@context" => "https://schema.org", "@type" => "Blog", "@id" => route('blog.index') . "#blog", "name" => $siteName . " Blog", "description" => "Merhaba! Biz Trunçgil. Blogumuza hoş geldiniz. Burada web tasarım, yazılım geliştirme ve teknolojik yeniliklere dair ipuçlarını ve deneyimlerimizi paylaşıyoruz.", "url" => route('blog.index'), "publisher" => [ "@type" => "Organization", "name" => $siteName, "logo" => [ "@type" => "ImageObject", "url" => $siteLogo ] ], "blogPost" => $blogPostsList ]; @endphp @endpush @push('styles') @endpush @push('scripts') @endpush @endsection