- Created base.html template with navigation and flash messages - Created dashboard.html for video listing sorted by date - Created channels.html for channel management - Created add_channel.html with subscription form - Created watch.html with HTML5 video player - Created static/style.css with YouTube-inspired dark theme - Updated main.py with frontend routes: - / (index): Dashboard with all videos - /channels: Channel management page - /add-channel: Add new channel form (GET/POST) - /watch/<video_id>: Video player page - Added new API endpoints: - /api/videos/refresh/<channel_id>: Refresh channel videos - /api/video/stream/<video_id>: Stream/download video files - Enhanced /api/download/<video_id> with status checks - Updated CLAUDE.md with comprehensive frontend documentation Features: - Video grid with thumbnails and download status badges - Inline download buttons for pending videos - Channel subscription and refresh functionality - HTML5 video player for downloaded videos - Auto-refresh during video downloads - Responsive design for mobile/desktop - Flash message system for user feedback - Dark theme with hover effects and animations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
576 lines
9.6 KiB
CSS
576 lines
9.6 KiB
CSS
/* Global Styles */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
:root {
|
|
--primary-color: #ff0000;
|
|
--secondary-color: #282828;
|
|
--background-color: #0f0f0f;
|
|
--card-background: #1f1f1f;
|
|
--text-primary: #ffffff;
|
|
--text-secondary: #aaaaaa;
|
|
--border-color: #303030;
|
|
--success-color: #00aa00;
|
|
--error-color: #cc0000;
|
|
--info-color: #0066cc;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
background-color: var(--background-color);
|
|
color: var(--text-primary);
|
|
line-height: 1.6;
|
|
}
|
|
|
|
/* Navigation */
|
|
.navbar {
|
|
background-color: var(--secondary-color);
|
|
border-bottom: 1px solid var(--border-color);
|
|
padding: 1rem 0;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.nav-container {
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
padding: 0 2rem;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.logo a {
|
|
color: var(--primary-color);
|
|
text-decoration: none;
|
|
font-size: 1.5rem;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.nav-menu {
|
|
display: flex;
|
|
list-style: none;
|
|
gap: 2rem;
|
|
}
|
|
|
|
.nav-menu a {
|
|
color: var(--text-primary);
|
|
text-decoration: none;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 4px;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.nav-menu a:hover,
|
|
.nav-menu a.active {
|
|
background-color: var(--border-color);
|
|
}
|
|
|
|
/* Container */
|
|
.container {
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
padding: 2rem;
|
|
min-height: calc(100vh - 200px);
|
|
}
|
|
|
|
/* Alerts */
|
|
.alert {
|
|
padding: 1rem;
|
|
margin-bottom: 1rem;
|
|
border-radius: 4px;
|
|
border-left: 4px solid;
|
|
}
|
|
|
|
.alert-success {
|
|
background-color: rgba(0, 170, 0, 0.1);
|
|
border-color: var(--success-color);
|
|
}
|
|
|
|
.alert-error {
|
|
background-color: rgba(204, 0, 0, 0.1);
|
|
border-color: var(--error-color);
|
|
}
|
|
|
|
.alert-info {
|
|
background-color: rgba(0, 102, 204, 0.1);
|
|
border-color: var(--info-color);
|
|
}
|
|
|
|
/* Dashboard */
|
|
.dashboard-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.video-count {
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* Video Grid */
|
|
.video-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
.video-card {
|
|
background-color: var(--card-background);
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
transition: transform 0.2s, box-shadow 0.2s;
|
|
}
|
|
|
|
.video-card:hover {
|
|
transform: translateY(-4px);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.video-thumbnail {
|
|
position: relative;
|
|
display: block;
|
|
aspect-ratio: 16/9;
|
|
overflow: hidden;
|
|
background-color: var(--secondary-color);
|
|
}
|
|
|
|
.video-thumbnail img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.thumbnail-placeholder {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.video-duration {
|
|
position: absolute;
|
|
bottom: 8px;
|
|
right: 8px;
|
|
}
|
|
|
|
.video-info {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.video-title {
|
|
font-size: 1rem;
|
|
margin-bottom: 0.5rem;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.video-title a {
|
|
color: var(--text-primary);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.video-title a:hover {
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.video-channel {
|
|
color: var(--text-secondary);
|
|
font-size: 0.9rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.video-meta {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.video-date {
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* Badges */
|
|
.badge {
|
|
padding: 0.25rem 0.5rem;
|
|
border-radius: 4px;
|
|
font-size: 0.75rem;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.badge-success {
|
|
background-color: var(--success-color);
|
|
color: white;
|
|
}
|
|
|
|
.badge-info {
|
|
background-color: var(--info-color);
|
|
color: white;
|
|
}
|
|
|
|
.badge-error {
|
|
background-color: var(--error-color);
|
|
color: white;
|
|
}
|
|
|
|
/* Buttons */
|
|
.btn {
|
|
padding: 0.5rem 1rem;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
display: inline-block;
|
|
font-size: 0.9rem;
|
|
transition: opacity 0.2s;
|
|
}
|
|
|
|
.btn:hover {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.btn-primary {
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background-color: var(--border-color);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.btn-link {
|
|
background-color: transparent;
|
|
color: var(--primary-color);
|
|
border: 1px solid var(--primary-color);
|
|
}
|
|
|
|
.btn-download {
|
|
background-color: transparent;
|
|
color: var(--primary-color);
|
|
border: none;
|
|
cursor: pointer;
|
|
font-size: 0.85rem;
|
|
padding: 0.25rem 0.5rem;
|
|
}
|
|
|
|
.btn-download:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* Empty State */
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: 4rem 2rem;
|
|
}
|
|
|
|
.empty-state h3 {
|
|
margin-bottom: 1rem;
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.empty-state p {
|
|
color: var(--text-secondary);
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
/* Channels Page */
|
|
.page-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.channels-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.channel-card {
|
|
background-color: var(--card-background);
|
|
border-radius: 8px;
|
|
padding: 1.5rem;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.channel-info h3 {
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.channel-url {
|
|
color: var(--text-secondary);
|
|
font-size: 0.9rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.channel-url a {
|
|
color: var(--text-secondary);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.channel-url a:hover {
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.channel-meta {
|
|
display: flex;
|
|
gap: 2rem;
|
|
font-size: 0.85rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.channel-actions {
|
|
display: flex;
|
|
gap: 1rem;
|
|
}
|
|
|
|
/* Form */
|
|
.form-container {
|
|
max-width: 600px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.channel-form {
|
|
background-color: var(--card-background);
|
|
padding: 2rem;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.form-group label {
|
|
display: block;
|
|
margin-bottom: 0.5rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.form-input {
|
|
width: 100%;
|
|
padding: 0.75rem;
|
|
background-color: var(--secondary-color);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 4px;
|
|
color: var(--text-primary);
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.form-input:focus {
|
|
outline: none;
|
|
border-color: var(--primary-color);
|
|
}
|
|
|
|
.form-help {
|
|
display: block;
|
|
margin-top: 0.5rem;
|
|
color: var(--text-secondary);
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.form-actions {
|
|
display: flex;
|
|
gap: 1rem;
|
|
}
|
|
|
|
/* Help Section */
|
|
.help-section {
|
|
max-width: 800px;
|
|
margin: 3rem auto 0;
|
|
padding: 2rem;
|
|
background-color: var(--card-background);
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.help-section h3,
|
|
.help-section h4 {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.help-section ol,
|
|
.help-section ul {
|
|
margin-left: 2rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.help-section li {
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.help-section code {
|
|
background-color: var(--secondary-color);
|
|
padding: 0.2rem 0.4rem;
|
|
border-radius: 3px;
|
|
font-family: 'Courier New', monospace;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
/* Watch Page */
|
|
.watch-page {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.video-player-container {
|
|
width: 100%;
|
|
aspect-ratio: 16/9;
|
|
background-color: var(--secondary-color);
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.video-player {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.video-placeholder {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
text-align: center;
|
|
}
|
|
|
|
.placeholder-content {
|
|
padding: 2rem;
|
|
}
|
|
|
|
.placeholder-thumbnail {
|
|
max-width: 100%;
|
|
max-height: 300px;
|
|
margin-bottom: 1rem;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.video-details {
|
|
background-color: var(--card-background);
|
|
padding: 2rem;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.video-details .video-title {
|
|
font-size: 1.5rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.video-metadata {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding-bottom: 1rem;
|
|
margin-bottom: 1rem;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.channel-info h3 {
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.channel-link {
|
|
color: var(--text-secondary);
|
|
text-decoration: none;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.channel-link:hover {
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.video-stats {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-end;
|
|
font-size: 0.9rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.video-description {
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.video-description h4 {
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.video-description p {
|
|
color: var(--text-secondary);
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
.video-links {
|
|
display: flex;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.back-link {
|
|
margin-top: 2rem;
|
|
}
|
|
|
|
.back-link a {
|
|
color: var(--text-secondary);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.back-link a:hover {
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
/* Footer */
|
|
.footer {
|
|
background-color: var(--secondary-color);
|
|
border-top: 1px solid var(--border-color);
|
|
padding: 2rem;
|
|
text-align: center;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 768px) {
|
|
.nav-container {
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.video-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.channel-card {
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.channel-actions {
|
|
width: 100%;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.page-header {
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.video-metadata {
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.video-stats {
|
|
align-items: flex-start;
|
|
}
|
|
}
|