2026-02-24 16:55:11 +00:00

70 lines
3.5 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Edit {{ $video->title }} - TAKEONE</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
body { background-color: #0f0f0f; color: #fff; }
</style>
</head>
<body class="min-h-screen">
<header class="bg-[#0f0f0f] border-b border-gray-800">
<div class="max-w-7xl mx-auto px-4 py-3">
<a href="/videos" class="text-2xl font-bold text-red-600">TAKEONE</a>
</div>
</header>
<main class="max-w-3xl mx-auto px-4 py-8">
<h1 class="text-3xl font-bold mb-8">Edit Video</h1>
<form action="{{ route('videos.update', $video->id) }}" method="POST" enctype="multipart/form-data" class="space-y-6">
@csrf
@method('PUT')
<div>
<label class="block text-sm font-medium mb-2">Title</label>
<input type="text" name="title" value="{{ $video->title }}" required class="w-full bg-[#272727] border border-gray-700 rounded-lg px-4 py-3 focus:outline-none focus:border-red-600">
</div>
<div>
<label class="block text-sm font-medium mb-2">Description</label>
<textarea name="description" rows="3" class="w-full bg-[#272727] border border-gray-700 rounded-lg px-4 py-3 focus:outline-none focus:border-red-600">{{ $video->description }}</textarea>
</div>
<div>
<label class="block text-sm font-medium mb-2">Orientation</label>
<div class="grid grid-cols-4 gap-3">
@foreach(['landscape', 'portrait', 'square', 'ultrawide'] as $orientation)
<label class="cursor-pointer border-2 {{ $video->orientation == $orientation ? 'border-red-600' : 'border-gray-700' }} rounded-lg p-3 text-center">
<input type="radio" name="orientation" value="{{ $orientation }}" {{ $video->orientation == $orientation ? 'checked' : '' }} class="d-none">
<span class="text-sm capitalize">{{ $orientation }}</span>
</label>
@endforeach
</div>
</div>
<div>
<label class="block text-sm font-medium mb-2">Thumbnail</label>
@if($video->thumbnail)
<img src="{{ asset('storage/thumbnails/' . $video->thumbnail) }}" class="w-32 h-20 object-cover rounded mb-2">
@endif
<input type="file" name="thumbnail" accept="image/*" class="w-full bg-[#272727] border border-gray-700 rounded-lg px-4 py-3 focus:outline-none focus:border-red-600">
</div>
<div class="flex gap-4">
<button type="submit" class="flex-1 bg-red-600 hover:bg-red-700 text-white font-semibold py-3 rounded-lg">Save Changes</button>
<a href="{{ route('videos.show', $video->id) }}" class="px-6 py-3 bg-gray-700 rounded-lg">Cancel</a>
</div>
</form>
<form action="{{ route('videos.destroy', $video->id) }}" method="POST" class="mt-6" onsubmit="return confirm('Delete this video? This cannot be undone.');">
@csrf
@method('DELETE')
<button type="submit" class="w-full bg-red-900 hover:bg-red-800 text-white font-semibold py-3 rounded-lg">Delete Video</button>
</form>
</main>
</body>
</html>