first commit

This commit is contained in:
Doar Mihai
2026-08-08 18:03:29 +03:00
commit df2128ebff
183 changed files with 18719 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
<x-layouts.app :title="$title" :description="$description" :canonical="$canonical">
@push('jsonld')
<script type="application/ld+json">
{!! json_encode([
'@context' => 'https://schema.org',
'@type' => 'BreadcrumbList',
'itemListElement' => [
['@type' => 'ListItem', 'position' => 1, 'name' => 'Blog', 'item' => route('blog.index')],
['@type' => 'ListItem', 'position' => 2, 'name' => $category->name, 'item' => $canonical],
],
]) !!}
</script>
@endpush
<p class="text-sm text-neutral-500">
<a href="{{ route('blog.index') }}" class="hover:underline">Blog</a>
<span aria-hidden="true">/</span>
{{ $category->name }}
</p>
<h1 class="mt-2 text-3xl font-bold tracking-tight">{{ $category->name }}</h1>
@if ($category->description)
<p class="mt-2 text-neutral-600">{{ $category->description }}</p>
@endif
<div class="mt-8">
@forelse ($posts as $post)
<x-post-card :post="$post" />
@empty
<p class="text-neutral-500">No posts in this category yet.</p>
@endforelse
</div>
<div class="mt-10">
{{ $posts->links() }}
</div>
</x-layouts.app>
+19
View File
@@ -0,0 +1,19 @@
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ config('app.name') }}</title>
<link>{{ route('blog.index') }}</link>
<atom:link href="{{ route('blog.feed') }}" rel="self" type="application/rss+xml" />
<description>Latest articles from {{ config('app.name') }}.</description>
<language>{{ str_replace('_', '-', app()->getLocale()) }}</language>
@foreach ($posts as $post)
<item>
<title>{{ $post->title }}</title>
<link>{{ route('blog.show', $post) }}</link>
<guid isPermaLink="true">{{ route('blog.show', $post) }}</guid>
<pubDate>{{ $post->published_at->toRfc2822String() }}</pubDate>
<description>{{ $post->excerpt_or_summary }}</description>
</item>
@endforeach
</channel>
</rss>
+26
View File
@@ -0,0 +1,26 @@
<x-layouts.app :title="$title" :description="$description" :canonical="$canonical">
@push('jsonld')
<script type="application/ld+json">
{!! json_encode([
'@context' => 'https://schema.org',
'@type' => 'Blog',
'name' => config('app.name'),
'url' => $canonical,
]) !!}
</script>
@endpush
<h1 class="text-3xl font-bold tracking-tight">Blog</h1>
<div class="mt-8">
@forelse ($posts as $post)
<x-post-card :post="$post" />
@empty
<p class="text-neutral-500">No posts published yet.</p>
@endforelse
</div>
<div class="mt-10">
{{ $posts->links() }}
</div>
</x-layouts.app>
+57
View File
@@ -0,0 +1,57 @@
<x-layouts.app :title="$title" :description="$description" :canonical="$canonical" :image="$image ?? null" type="article">
@push('jsonld')
<script type="application/ld+json">
{!! json_encode([
'@context' => 'https://schema.org',
'@type' => 'BlogPosting',
'headline' => $post->title,
'description' => $description,
'datePublished' => $post->published_at->toIso8601String(),
'dateModified' => $post->updated_at->toIso8601String(),
'author' => [
'@type' => 'Person',
'name' => $post->user->name,
],
'mainEntityOfPage' => [
'@type' => 'WebPage',
'@id' => $canonical,
],
...($image ?? null ? ['image' => [$image]] : []),
]) !!}
</script>
@endpush
<article>
<p class="text-sm text-neutral-500">
<a href="{{ route('blog.index') }}" class="hover:underline">Blog</a>
@if ($post->category)
<span aria-hidden="true">/</span>
<a href="{{ route('blog.category', $post->category) }}" class="hover:underline">{{ $post->category->name }}</a>
@endif
</p>
<h1 class="mt-2 text-4xl font-bold tracking-tight">{{ $post->title }}</h1>
<div class="mt-3 flex flex-wrap items-center gap-3 text-sm text-neutral-500">
<time datetime="{{ $post->published_at->toIso8601String() }}">{{ $post->published_at->format('F j, Y') }}</time>
<span aria-hidden="true">&middot;</span>
<span>{{ $post->user->name }}</span>
</div>
@if ($post->featured_image)
<img src="{{ asset('storage/'.$post->featured_image) }}" alt="{{ $post->title }}" class="mt-8 w-full rounded-lg">
@endif
<div class="prose prose-neutral mt-8 max-w-none">
{!! $post->body_html !!}
</div>
@if ($post->tags->isNotEmpty())
<div class="mt-10 flex flex-wrap gap-2 border-t border-neutral-200 pt-6">
@foreach ($post->tags as $tag)
<a href="{{ route('blog.tag', $tag) }}" class="rounded-full bg-neutral-100 px-3 py-1 text-sm hover:bg-neutral-200">#{{ $tag->name }}</a>
@endforeach
</div>
@endif
</article>
</x-layouts.app>
+33
View File
@@ -0,0 +1,33 @@
<x-layouts.app :title="$title" :description="$description" :canonical="$canonical">
@push('jsonld')
<script type="application/ld+json">
{!! json_encode([
'@context' => 'https://schema.org',
'@type' => 'BreadcrumbList',
'itemListElement' => [
['@type' => 'ListItem', 'position' => 1, 'name' => 'Blog', 'item' => route('blog.index')],
['@type' => 'ListItem', 'position' => 2, 'name' => '#'.$tag->name, 'item' => $canonical],
],
]) !!}
</script>
@endpush
<p class="text-sm text-neutral-500">
<a href="{{ route('blog.index') }}" class="hover:underline">Blog</a>
<span aria-hidden="true">/</span>
#{{ $tag->name }}
</p>
<h1 class="mt-2 text-3xl font-bold tracking-tight">#{{ $tag->name }}</h1>
<div class="mt-8">
@forelse ($posts as $post)
<x-post-card :post="$post" />
@empty
<p class="text-neutral-500">No posts tagged with #{{ $tag->name }} yet.</p>
@endforelse
</div>
<div class="mt-10">
{{ $posts->links() }}
</div>
</x-layouts.app>