webclient / app /templates /videos.html
ariansyahdedy's picture
Add UI
b0f2d3d
raw
history blame contribute delete
4.24 kB
{% extends "base.html" %}
{% block title %}Your YouTube Videos{% endblock %}
{% block content %}
<div class="container mx-auto px-4 py-8">
<div class="flex items-center justify-between mb-8">
<h1 class="text-4xl font-extrabold text-gray-800 flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" class="h-10 w-10 mr-4 text-red-600" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M3 5a2 2 0 012-2h10a2 2 0 012 2v10a2 2 0 01-2 2H5a2 2 0 01-2-2V5zm12 1V5H5v1h10zm-5 8.5a3.5 3.5 0 100-7 3.5 3.5 0 000 7z" clip-rule="evenodd" />
</svg>
YouTube Video Management
</h1>
<button class="bg-green-500 text-white px-5 py-2 rounded-lg shadow-md hover:bg-green-600 transition duration-300 flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z" clip-rule="evenodd" />
</svg>
Refresh Videos
</button>
</div>
{% if videos %}
<div class="grid md:grid-cols-3 gap-6">
{% for video in videos %}
<div class="bg-white rounded-xl shadow-lg hover:shadow-xl transition-all duration-300 transform hover:-translate-y-2 border border-gray-100">
<div class="relative">
<img src="{{ video.thumbnail }}" alt="{{ video.title }}" class="w-full h-56 object-cover rounded-t-xl">
<div class="absolute top-2 right-2 bg-black bg-opacity-50 text-white px-3 py-1 rounded-full text-sm">
{{ video.duration }}
</div>
</div>
<div class="p-5">
<h3 class="font-bold text-xl mb-3 text-gray-800 line-clamp-2">{{ video.title }}</h3>
<div class="flex justify-between items-center">
<div class="flex items-center space-x-3">
<span class="text-sm text-gray-600 flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2 text-gray-400" viewBox="0 0 20 20" fill="currentColor">
<path d="M2 5a2 2 0 012-2h12a2 2 0 012 2v10a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm3.5 1a.5.5 0 00-.5.5v1a.5.5 0 00.5.5h2a.5.5 0 00.5-.5v-1a.5.5 0 00-.5-.5h-2zm5 0a.5.5 0 00-.5.5v1a.5.5 0 00.5.5h2a.5.5 0 00.5-.5v-1a.5.5 0 00-.5-.5h-2zM6 9.5a.5.5 0 01.5-.5h2a.5.5 0 01.5.5v1a.5.5 0 01-.5.5h-2a.5.5 0 01-.5-.5v-1zm5 0a.5.5 0 01.5-.5h2a.5.5 0 01.5.5v1a.5.5 0 01-.5.5h-2a.5.5 0 01-.5-.5v-1z" />
</svg>
{{ video.comments_count }} Comments
</span>
</div>
<a href="/video/{{ video.id }}" class="bg-blue-500 text-white px-4 py-2 rounded-lg hover:bg-blue-600 transition duration-300 shadow-md">
Moderate
</a>
</div>
</div>
</div>
{% endfor %}
</div>
{% else %}
<div class="bg-white rounded-xl shadow-lg p-12 text-center">
<div class="flex justify-center mb-6">
<svg xmlns="http://www.w3.org/2000/svg" class="h-24 w-24 text-gray-300" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z" />
</svg>
</div>
<h2 class="text-2xl font-semibold text-gray-700 mb-4">No Videos Found</h2>
<p class="text-gray-500 mb-6">It looks like there are no videos to moderate at the moment.</p>
<button class="bg-blue-500 text-white px-6 py-3 rounded-lg hover:bg-blue-600 transition duration-300 shadow-md">
Refresh Channel
</button>
</div>
{% endif %}
</div>
{% endblock %}