updated gallery

This commit is contained in:
2026-03-17 18:34:26 +01:00
parent 7b37259a2c
commit 7da0fd39f7
52 changed files with 1216 additions and 870 deletions

View File

@@ -1,59 +1,58 @@
{{-- Sidebar partial for news frontend --}}
{{-- Categories widget --}}
@if(!empty($categories) && $categories->isNotEmpty())
<div class="card mb-4">
<div class="card-header"><strong>Categories</strong></div>
<div class="list-group list-group-flush">
<section class="rounded-[24px] border border-white/[0.06] bg-white/[0.025] p-5">
<div class="mb-4 flex items-center justify-between gap-3">
<h2 class="text-sm font-semibold uppercase tracking-[0.18em] text-white/45">Categories</h2>
<span class="text-xs text-white/30">{{ $categories->count() }}</span>
</div>
<div class="space-y-1.5">
@foreach($categories as $cat)
<a href="{{ route('news.category', $cat->slug) }}"
class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
{{ $cat->name }}
<span class="badge badge-secondary badge-pill">{{ $cat->published_articles_count ?? 0 }}</span>
<a href="{{ route('news.category', $cat->slug) }}" class="flex items-center justify-between rounded-2xl px-3 py-2.5 text-sm text-white/65 transition hover:bg-white/[0.04] hover:text-white">
<span>{{ $cat->name }}</span>
<span class="rounded-full border border-white/[0.06] bg-white/[0.04] px-2 py-0.5 text-[11px] text-white/45">{{ number_format((int) ($cat->published_articles_count ?? 0)) }}</span>
</a>
@endforeach
</div>
</div>
</section>
@endif
{{-- Trending articles --}}
@if(!empty($trending) && $trending->isNotEmpty())
<div class="card mb-4">
<div class="card-header"><strong><i class="fas fa-fire mr-1 text-danger"></i> Trending</strong></div>
<div class="list-group list-group-flush">
<section class="rounded-[24px] border border-white/[0.06] bg-white/[0.025] p-5">
<div class="mb-4 flex items-center gap-2 text-sm font-semibold uppercase tracking-[0.18em] text-white/45">
<i class="fa-solid fa-fire text-[11px] text-rose-300"></i>
Trending
</div>
<div class="space-y-3">
@foreach($trending as $item)
<a href="{{ route('news.show', $item->slug) }}"
class="list-group-item list-group-item-action py-2">
<div class="d-flex justify-content-between align-items-start">
<span class="font-weight-bold small">{{ Str::limit($item->title, 55) }}</span>
<span class="badge badge-info badge-pill ml-2">{{ number_format($item->views) }}</span>
<a href="{{ route('news.show', $item->slug) }}" class="block rounded-2xl border border-white/[0.04] bg-black/10 px-4 py-3 transition hover:border-white/[0.08] hover:bg-white/[0.03]">
<div class="flex items-start justify-between gap-3">
<span class="text-sm font-medium leading-6 text-white/80">{{ Str::limit($item->title, 70) }}</span>
<span class="shrink-0 rounded-full border border-sky-400/20 bg-sky-500/10 px-2 py-0.5 text-[11px] text-sky-200">{{ number_format((int) $item->views) }}</span>
</div>
<small class="text-muted">{{ $item->published_at?->diffForHumans() }}</small>
<p class="mt-1 text-xs text-white/35">{{ $item->published_at?->diffForHumans() }}</p>
</a>
@endforeach
</div>
</div>
</section>
@endif
{{-- Tags cloud --}}
@if(!empty($tags) && $tags->isNotEmpty())
<div class="card mb-4">
<div class="card-header"><strong><i class="fas fa-tags mr-1"></i> Tags</strong></div>
<div class="card-body">
<section class="rounded-[24px] border border-white/[0.06] bg-white/[0.025] p-5">
<div class="mb-4 flex items-center gap-2 text-sm font-semibold uppercase tracking-[0.18em] text-white/45">
<i class="fa-solid fa-tags text-[11px] text-sky-300"></i>
Topics
</div>
<div class="flex flex-wrap gap-2">
@foreach($tags as $tag)
<a href="{{ route('news.tag', $tag->slug) }}" class="badge badge-secondary mr-1 mb-1">
{{ $tag->name }}
</a>
<a href="{{ route('news.tag', $tag->slug) }}" class="inline-flex items-center rounded-full border border-white/[0.08] bg-white/[0.03] px-3 py-1.5 text-xs font-medium text-white/60 transition hover:border-white/[0.14] hover:bg-white/[0.06] hover:text-white">#{{ $tag->name }}</a>
@endforeach
</div>
</div>
</section>
@endif
{{-- RSS link --}}
<div class="card mb-4">
<div class="card-body text-center">
<a href="{{ route('news.rss') }}" class="btn btn-outline-warning btn-sm" target="_blank">
<i class="fas fa-rss mr-1"></i> RSS Feed
</a>
</div>
</div>
<section class="rounded-[24px] border border-amber-400/20 bg-amber-500/10 p-5 text-center">
<p class="text-xs font-semibold uppercase tracking-[0.18em] text-amber-100/70">Stay updated</p>
<a href="{{ route('news.rss') }}" class="mt-3 inline-flex items-center gap-2 rounded-full border border-amber-300/25 bg-amber-500/10 px-4 py-2 text-sm font-medium text-amber-100 transition hover:bg-amber-500/20" target="_blank" rel="noopener noreferrer">
<i class="fa-solid fa-rss text-xs"></i>
RSS Feed
</a>
</section>