Remove legacy frontend assets and update gallery routes

This commit is contained in:
2026-03-14 15:06:28 +01:00
parent 4f576ceb04
commit 78151aabfe
550 changed files with 826 additions and 108930 deletions

View File

@@ -0,0 +1,42 @@
@extends('layouts.nova')
@section('content')
<div class="mx-auto max-w-6xl px-4 py-8">
<div class="mb-4 flex items-center justify-between">
<h1 class="text-xl font-semibold text-gray-100">Stories Management</h1>
<div class="flex items-center gap-2">
<a href="{{ route('admin.stories.review') }}" class="rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-sm text-amber-200">Review queue</a>
<a href="{{ route('admin.stories.create') }}" class="rounded-lg border border-sky-500/40 bg-sky-500/10 px-3 py-2 text-sm text-sky-200">Create story</a>
</div>
</div>
<div class="overflow-hidden rounded-xl border border-gray-700 bg-gray-900">
<table class="min-w-full divide-y divide-gray-700 text-sm">
<thead class="bg-gray-800 text-gray-300">
<tr>
<th class="px-4 py-3 text-left">Title</th>
<th class="px-4 py-3 text-left">Creator</th>
<th class="px-4 py-3 text-left">Status</th>
<th class="px-4 py-3 text-left">Actions</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-800 text-gray-200">
@foreach($stories as $story)
<tr>
<td class="px-4 py-3">{{ $story->title }}</td>
<td class="px-4 py-3">{{ $story->creator?->username ?? 'n/a' }}</td>
<td class="px-4 py-3">{{ $story->status }}</td>
<td class="px-4 py-3">
<a href="{{ route('admin.stories.show', ['story' => $story->id]) }}" class="text-amber-300">View</a>
<span class="mx-1 text-gray-500">|</span>
<a href="{{ route('admin.stories.edit', ['story' => $story->id]) }}" class="text-sky-300">Edit</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="mt-4">{{ $stories->links() }}</div>
</div>
@endsection

View File

@@ -0,0 +1,46 @@
@extends('layouts.nova')
@section('content')
<div class="mx-auto max-w-6xl px-4 py-8">
<div class="mb-5 flex items-center justify-between gap-3">
<div>
<h1 class="text-xl font-semibold text-gray-100">Stories Review Queue</h1>
<p class="text-sm text-gray-300">Pending creator stories waiting for moderation.</p>
</div>
<a href="{{ route('admin.stories.index') }}" class="rounded-lg border border-gray-600 px-3 py-2 text-sm text-gray-200">All stories</a>
</div>
<div class="overflow-hidden rounded-xl border border-gray-700 bg-gray-900">
<table class="min-w-full divide-y divide-gray-700 text-sm">
<thead class="bg-gray-800 text-gray-300">
<tr>
<th class="px-4 py-3 text-left">Story</th>
<th class="px-4 py-3 text-left">Creator</th>
<th class="px-4 py-3 text-left">Submitted</th>
<th class="px-4 py-3 text-left">Status</th>
<th class="px-4 py-3 text-left">Actions</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-800 text-gray-200">
@forelse($stories as $story)
<tr>
<td class="px-4 py-3">{{ $story->title }}</td>
<td class="px-4 py-3">{{ $story->creator?->username ?? 'n/a' }}</td>
<td class="px-4 py-3">{{ optional($story->submitted_for_review_at)->diffForHumans() ?? optional($story->updated_at)->diffForHumans() }}</td>
<td class="px-4 py-3"><span class="rounded-full border border-amber-500/40 px-2 py-1 text-xs text-amber-200">{{ $story->status }}</span></td>
<td class="px-4 py-3">
<a href="{{ route('admin.stories.show', ['story' => $story->id]) }}" class="text-sky-300 hover:text-sky-200">Review</a>
</td>
</tr>
@empty
<tr>
<td colspan="5" class="px-4 py-6 text-center text-gray-400">No stories pending review.</td>
</tr>
@endforelse
</tbody>
</table>
</div>
<div class="mt-4">{{ $stories->links() }}</div>
</div>
@endsection

View File

@@ -0,0 +1,49 @@
@extends('layouts.nova')
@section('content')
<div class="mx-auto max-w-6xl px-4 py-8">
<div class="mb-4 flex items-center justify-between gap-3">
<h1 class="text-xl font-semibold text-gray-100">Review Story</h1>
<a href="{{ route('admin.stories.review') }}" class="rounded-lg border border-gray-600 px-3 py-2 text-sm text-gray-200">Back to queue</a>
</div>
<div class="grid gap-6 lg:grid-cols-12">
<article class="lg:col-span-8 rounded-xl border border-gray-700 bg-gray-900/80 p-5">
<p class="text-xs uppercase tracking-wide text-gray-400">{{ $story->story_type }}</p>
<h2 class="mt-2 text-2xl font-semibold text-white">{{ $story->title }}</h2>
<p class="mt-1 text-sm text-gray-300">Creator: @{{ $story->creator?->username ?? 'unknown' }}</p>
@if($story->excerpt)
<p class="mt-3 text-sm text-gray-200">{{ $story->excerpt }}</p>
@endif
<div class="prose prose-invert mt-5 max-w-none prose-a:text-sky-300">
{!! preg_replace('/<(script|style)\\b[^>]*>.*?<\\/\\1>/is', '', (string) $story->content) !!}
</div>
</article>
<aside class="space-y-4 lg:col-span-4">
<div class="rounded-xl border border-gray-700 bg-gray-800/70 p-4">
<h3 class="text-sm font-semibold uppercase tracking-wide text-gray-300">Moderation Actions</h3>
<form method="POST" action="{{ route('admin.stories.approve', ['story' => $story->id]) }}" class="mt-3">
@csrf
<button class="w-full rounded-lg border border-emerald-500/40 bg-emerald-500/10 px-3 py-2 text-sm text-emerald-200 transition hover:scale-[1.02]">Approve & Publish</button>
</form>
<form method="POST" action="{{ route('admin.stories.reject', ['story' => $story->id]) }}" class="mt-3 space-y-2">
@csrf
<label class="block text-xs uppercase tracking-wide text-gray-400">Rejection feedback</label>
<textarea name="reason" rows="4" required class="w-full rounded-lg border border-gray-700 bg-gray-900 px-3 py-2 text-sm text-white" placeholder="Explain what needs to change..."></textarea>
<button class="w-full rounded-lg border border-rose-500/40 bg-rose-500/10 px-3 py-2 text-sm text-rose-200 transition hover:scale-[1.02]">Reject Story</button>
</form>
</div>
<div class="rounded-xl border border-gray-700 bg-gray-800/70 p-4">
<h3 class="text-sm font-semibold uppercase tracking-wide text-gray-300">Quick Links</h3>
<div class="mt-3 flex flex-col gap-2 text-sm">
<a href="{{ route('admin.stories.edit', ['story' => $story->id]) }}" class="rounded-lg border border-gray-600 px-3 py-2 text-gray-200">Edit in admin form</a>
<a href="{{ route('creator.stories.preview', ['story' => $story->id]) }}" class="rounded-lg border border-gray-600 px-3 py-2 text-gray-200">Open creator preview</a>
</div>
</div>
</aside>
</div>
</div>
@endsection