This commit is contained in:
Doar Mihai
2026-05-01 03:14:52 +03:00
parent 17097c3bb1
commit 96e8fa3859
9 changed files with 284 additions and 1 deletions
+51
View File
@@ -0,0 +1,51 @@
@extends('layouts.app')
@section('title', 'Blog - JobifyGarden')
@section('description', 'Career advice, job search tips, and hiring insights from the JobifyGarden team.')
@section('canonical', route('blog.index'))
@section('content')
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
<div class="mb-10">
<h1 class="text-4xl font-bold text-gray-900">Blog</h1>
<p class="text-gray-600 mt-2">Career advice, job search tips, and hiring insights.</p>
</div>
@if($articles->isEmpty())
<div class="bg-white rounded-lg shadow-sm border border-gray-200 p-12 text-center">
<p class="text-gray-500 text-lg">No articles published yet. Check back soon.</p>
</div>
@else
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
@foreach($articles as $article)
<article class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden hover:shadow-md transition-shadow duration-200 flex flex-col">
<div class="p-6 flex flex-col flex-1">
<div class="text-xs text-gray-500 mb-3">
{{ $article->published_at->format('M j, Y') }}
</div>
<h2 class="text-xl font-semibold text-gray-900 mb-3 leading-snug">
<a href="{{ route('blog.show', $article) }}" class="hover:text-emerald-600">
{{ $article->title }}
</a>
</h2>
@if($article->excerpt)
<p class="text-gray-600 text-sm flex-1 mb-4">{{ $article->excerpt }}</p>
@endif
<a href="{{ route('blog.show', $article) }}"
class="inline-flex items-center text-sm font-medium text-emerald-600 hover:text-emerald-700 mt-auto">
Read more
<svg class="ml-1 w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
</svg>
</a>
</div>
</article>
@endforeach
</div>
<div class="mt-10">
{{ $articles->links() }}
</div>
@endif
</div>
@endsection
+48
View File
@@ -0,0 +1,48 @@
@extends('layouts.app')
@section('title', $article->title . ' - JobifyGarden Blog')
@section('description', $article->excerpt ?? Str::limit(strip_tags($article->body), 155))
@section('canonical', route('blog.show', $article))
@push('structured_data')
<script type="application/ld+json">
{!! json_encode([
'@context' => 'https://schema.org',
'@type' => 'BlogPosting',
'headline' => $article->title,
'description' => $article->excerpt ?? Str::limit(strip_tags($article->body), 155),
'datePublished' => $article->published_at->toIso8601String(),
'dateModified' => $article->updated_at->toIso8601String(),
'url' => route('blog.show', $article),
'publisher' => ['@type' => 'Organization', 'name' => 'JobifyGarden'],
], JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT) !!}
</script>
@endpush
@section('content')
<div class="max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
<!-- Back -->
<div class="mb-8">
<a href="{{ route('blog.index') }}" class="inline-flex items-center text-emerald-600 hover:text-emerald-700 text-sm">
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"/>
</svg>
Back to Blog
</a>
</div>
<article class="bg-white rounded-lg shadow-sm border border-gray-200 p-8 sm:p-12">
<header class="mb-8 pb-8 border-b border-gray-200">
<div class="text-sm text-gray-500 mb-3">{{ $article->published_at->format('F j, Y') }}</div>
<h1 class="text-3xl sm:text-4xl font-bold text-gray-900 leading-tight">{{ $article->title }}</h1>
@if($article->excerpt)
<p class="mt-4 text-xl text-gray-600 leading-relaxed">{{ $article->excerpt }}</p>
@endif
</header>
<div class="prose prose-emerald max-w-none text-gray-700 leading-relaxed">
{!! nl2br(e($article->body)) !!}
</div>
</article>
</div>
@endsection
+8
View File
@@ -80,6 +80,10 @@
class="inline-flex items-center px-1 pt-1 text-sm font-medium {{ request()->routeIs('jobs.remote') ? 'border-b-2 border-emerald-500 text-gray-900' : 'text-gray-500 hover:text-gray-700 hover:border-gray-300' }}">
Remote Jobs
</a>
<a href="{{ route('blog.index') }}"
class="inline-flex items-center px-1 pt-1 text-sm font-medium {{ request()->routeIs('blog.*') ? 'border-b-2 border-emerald-500 text-gray-900' : 'text-gray-500 hover:text-gray-700 hover:border-gray-300' }}">
Blog
</a>
</div>
</div>
@@ -139,6 +143,10 @@
class="block pl-3 pr-4 py-2 border-l-4 text-base font-medium {{ request()->routeIs('jobs.remote') ? 'border-emerald-500 text-emerald-700 bg-emerald-50' : 'border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700' }}">
Remote Jobs
</a>
<a href="{{ route('blog.index') }}"
class="block pl-3 pr-4 py-2 border-l-4 text-base font-medium {{ request()->routeIs('blog.*') ? 'border-emerald-500 text-emerald-700 bg-emerald-50' : 'border-transparent text-gray-500 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-700' }}">
Blog
</a>
</div>
<div class="pt-2 pb-3 border-t border-gray-200 space-y-1">
@auth