| <!DOCTYPE html> |
| <html lang="hi"> |
| <head> |
| <meta charset="UTF-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <title>YouRuhi - Admin Panel</title> |
| <link rel="stylesheet" href="css/style.css"> |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css"> |
| <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet"> |
| <style> |
| |
| .admin-body { |
| background: #0a0a0a; |
| } |
| |
| .admin-container { |
| margin-top: 56px; |
| min-height: calc(100vh - 56px); |
| padding-bottom: 80px; |
| } |
| |
| |
| .admin-login { |
| display: flex; |
| align-items: center; |
| justify-content: center; |
| min-height: calc(100vh - 56px); |
| padding: 20px; |
| } |
| .login-card { |
| background: var(--bg-secondary); |
| border-radius: 16px; |
| padding: 48px; |
| width: 100%; |
| max-width: 420px; |
| text-align: center; |
| box-shadow: 0 8px 32px rgba(0,0,0,0.4); |
| } |
| .login-card .login-icon { |
| width: 80px; |
| height: 80px; |
| border-radius: 50%; |
| background: linear-gradient(135deg, #ff0000, #cc0000); |
| display: flex; |
| align-items: center; |
| justify-content: center; |
| margin: 0 auto 24px; |
| font-size: 36px; |
| color: white; |
| } |
| .login-card h2 { |
| margin-bottom: 8px; |
| font-size: 24px; |
| } |
| .login-card .login-subtitle { |
| color: var(--text-secondary); |
| margin-bottom: 32px; |
| font-size: 14px; |
| } |
| .login-form { |
| display: flex; |
| flex-direction: column; |
| gap: 16px; |
| } |
| .login-form .form-input { |
| text-align: center; |
| font-size: 18px; |
| letter-spacing: 4px; |
| padding: 14px; |
| } |
| .login-btn { |
| padding: 14px; |
| background: var(--accent-color); |
| color: white; |
| border: none; |
| border-radius: 8px; |
| font-size: 16px; |
| font-weight: 600; |
| cursor: pointer; |
| transition: all 0.2s; |
| font-family: 'Roboto', sans-serif; |
| } |
| .login-btn:hover { |
| background: var(--accent-hover); |
| } |
| .login-error { |
| color: #ff4444; |
| font-size: 13px; |
| display: none; |
| } |
| .login-hint { |
| margin-top: 16px; |
| font-size: 12px; |
| color: #666; |
| } |
| |
| |
| .admin-dashboard { |
| display: none; |
| padding: 24px; |
| max-width: 1400px; |
| margin: 0 auto; |
| } |
| |
| .admin-top-bar { |
| display: flex; |
| justify-content: space-between; |
| align-items: center; |
| margin-bottom: 32px; |
| flex-wrap: wrap; |
| gap: 16px; |
| } |
| .admin-top-bar h1 { |
| font-size: 28px; |
| display: flex; |
| align-items: center; |
| gap: 12px; |
| } |
| .admin-top-bar h1 i { |
| color: var(--accent-color); |
| } |
| .admin-top-bar .admin-actions { |
| display: flex; |
| gap: 12px; |
| flex-wrap: wrap; |
| } |
| .admin-btn { |
| padding: 10px 20px; |
| border-radius: 8px; |
| font-size: 14px; |
| font-weight: 500; |
| cursor: pointer; |
| border: none; |
| display: flex; |
| align-items: center; |
| gap: 8px; |
| transition: all 0.2s; |
| font-family: 'Roboto', sans-serif; |
| } |
| .admin-btn-primary { |
| background: var(--accent-color); |
| color: white; |
| } |
| .admin-btn-primary:hover { |
| background: var(--accent-hover); |
| } |
| .admin-btn-secondary { |
| background: var(--bg-tertiary); |
| color: var(--text-primary); |
| border: 1px solid var(--border-color); |
| } |
| .admin-btn-secondary:hover { |
| background: var(--bg-hover); |
| } |
| .admin-btn-danger { |
| background: #dc3545; |
| color: white; |
| } |
| .admin-btn-danger:hover { |
| background: #c82333; |
| } |
| .admin-btn-success { |
| background: #28a745; |
| color: white; |
| } |
| .admin-btn-success:hover { |
| background: #218838; |
| } |
| .admin-btn-warning { |
| background: #ffc107; |
| color: #000; |
| } |
| |
| |
| .stats-grid { |
| display: grid; |
| grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); |
| gap: 16px; |
| margin-bottom: 32px; |
| } |
| .stat-card { |
| background: var(--bg-secondary); |
| border-radius: 12px; |
| padding: 24px; |
| display: flex; |
| align-items: center; |
| gap: 16px; |
| border: 1px solid var(--border-color); |
| transition: transform 0.2s; |
| } |
| .stat-card:hover { |
| transform: translateY(-2px); |
| } |
| .stat-icon { |
| width: 50px; |
| height: 50px; |
| border-radius: 12px; |
| display: flex; |
| align-items: center; |
| justify-content: center; |
| font-size: 22px; |
| color: white; |
| } |
| .stat-info h3 { |
| font-size: 28px; |
| font-weight: 700; |
| } |
| .stat-info p { |
| font-size: 13px; |
| color: var(--text-secondary); |
| } |
| |
| |
| .admin-tabs { |
| display: flex; |
| gap: 4px; |
| margin-bottom: 24px; |
| overflow-x: auto; |
| -ms-overflow-style: none; |
| scrollbar-width: none; |
| border-bottom: 1px solid var(--border-color); |
| } |
| .admin-tabs::-webkit-scrollbar { |
| display: none; |
| } |
| .admin-tab { |
| padding: 12px 24px; |
| background: none; |
| border: none; |
| color: var(--text-secondary); |
| font-size: 14px; |
| font-weight: 500; |
| cursor: pointer; |
| white-space: nowrap; |
| border-bottom: 2px solid transparent; |
| transition: all 0.2s; |
| font-family: 'Roboto', sans-serif; |
| display: flex; |
| align-items: center; |
| gap: 8px; |
| } |
| .admin-tab:hover { |
| color: var(--text-primary); |
| } |
| .admin-tab.active { |
| color: var(--text-primary); |
| border-bottom-color: var(--accent-color); |
| } |
| .admin-tab .tab-badge { |
| background: var(--accent-color); |
| color: white; |
| padding: 2px 8px; |
| border-radius: 10px; |
| font-size: 11px; |
| } |
| |
| |
| .tab-content { |
| display: none; |
| } |
| .tab-content.active { |
| display: block; |
| } |
| |
| |
| .admin-add-form { |
| background: var(--bg-secondary); |
| border-radius: 12px; |
| padding: 24px; |
| margin-bottom: 24px; |
| border: 1px solid var(--border-color); |
| display: none; |
| } |
| .admin-add-form.visible { |
| display: block; |
| animation: slideDown 0.3s ease; |
| } |
| @keyframes slideDown { |
| from { opacity: 0; transform: translateY(-10px); } |
| to { opacity: 1; transform: translateY(0); } |
| } |
| .admin-add-form h3 { |
| font-size: 18px; |
| margin-bottom: 20px; |
| display: flex; |
| align-items: center; |
| gap: 8px; |
| } |
| .admin-form-grid { |
| display: grid; |
| grid-template-columns: 1fr 1fr; |
| gap: 16px; |
| } |
| .admin-form-grid .full-width { |
| grid-column: 1 / -1; |
| } |
| .admin-form-actions { |
| display: flex; |
| gap: 12px; |
| margin-top: 20px; |
| justify-content: flex-end; |
| } |
| |
| |
| .admin-table-wrapper { |
| background: var(--bg-secondary); |
| border-radius: 12px; |
| overflow: hidden; |
| border: 1px solid var(--border-color); |
| } |
| .admin-table-header { |
| display: flex; |
| justify-content: space-between; |
| align-items: center; |
| padding: 16px 20px; |
| border-bottom: 1px solid var(--border-color); |
| flex-wrap: wrap; |
| gap: 12px; |
| } |
| .admin-table-header h3 { |
| font-size: 16px; |
| display: flex; |
| align-items: center; |
| gap: 8px; |
| } |
| .admin-search { |
| display: flex; |
| align-items: center; |
| gap: 8px; |
| background: var(--bg-tertiary); |
| border-radius: 8px; |
| padding: 6px 12px; |
| border: 1px solid var(--border-color); |
| } |
| .admin-search input { |
| background: transparent; |
| border: none; |
| color: var(--text-primary); |
| outline: none; |
| font-size: 13px; |
| width: 200px; |
| font-family: 'Roboto', sans-serif; |
| } |
| .admin-search i { |
| color: var(--text-secondary); |
| } |
| |
| .admin-table { |
| width: 100%; |
| overflow-x: auto; |
| } |
| |
| .content-list { |
| list-style: none; |
| } |
| .content-item { |
| display: flex; |
| align-items: center; |
| padding: 12px 20px; |
| border-bottom: 1px solid rgba(255,255,255,0.05); |
| gap: 16px; |
| transition: background 0.2s; |
| } |
| .content-item:hover { |
| background: var(--bg-tertiary); |
| } |
| .content-item:last-child { |
| border-bottom: none; |
| } |
| |
| .content-checkbox { |
| width: 18px; |
| height: 18px; |
| cursor: pointer; |
| accent-color: var(--accent-color); |
| } |
| |
| .content-thumb { |
| width: 120px; |
| min-width: 120px; |
| height: 68px; |
| border-radius: 6px; |
| overflow: hidden; |
| background: var(--bg-tertiary); |
| position: relative; |
| } |
| .content-thumb img { |
| width: 100%; |
| height: 100%; |
| object-fit: cover; |
| } |
| .content-thumb .duration-badge { |
| position: absolute; |
| bottom: 2px; |
| right: 2px; |
| background: rgba(0,0,0,0.8); |
| padding: 1px 4px; |
| border-radius: 2px; |
| font-size: 10px; |
| } |
| |
| .content-info { |
| flex: 1; |
| min-width: 0; |
| } |
| .content-info h4 { |
| font-size: 14px; |
| font-weight: 500; |
| margin-bottom: 4px; |
| display: -webkit-box; |
| -webkit-line-clamp: 1; |
| -webkit-box-orient: vertical; |
| overflow: hidden; |
| } |
| .content-info .content-meta { |
| font-size: 12px; |
| color: var(--text-secondary); |
| display: flex; |
| gap: 12px; |
| flex-wrap: wrap; |
| } |
| .content-info .content-meta span { |
| display: flex; |
| align-items: center; |
| gap: 4px; |
| } |
| |
| .content-type-badge { |
| padding: 3px 10px; |
| border-radius: 4px; |
| font-size: 11px; |
| font-weight: 600; |
| text-transform: uppercase; |
| white-space: nowrap; |
| } |
| .badge-video { |
| background: rgba(62,166,255,0.15); |
| color: #3ea6ff; |
| } |
| .badge-short { |
| background: rgba(255,0,0,0.15); |
| color: #ff4444; |
| } |
| .badge-admin { |
| background: rgba(255,215,0,0.15); |
| color: #ffd700; |
| } |
| .badge-user { |
| background: rgba(46,204,113,0.15); |
| color: #2ecc71; |
| } |
| |
| .content-actions-btns { |
| display: flex; |
| gap: 8px; |
| flex-shrink: 0; |
| } |
| .content-action-btn { |
| width: 32px; |
| height: 32px; |
| border-radius: 6px; |
| background: var(--bg-tertiary); |
| border: none; |
| color: var(--text-secondary); |
| cursor: pointer; |
| display: flex; |
| align-items: center; |
| justify-content: center; |
| font-size: 13px; |
| transition: all 0.2s; |
| } |
| .content-action-btn:hover { |
| background: var(--bg-hover); |
| color: var(--text-primary); |
| } |
| .content-action-btn.delete-btn:hover { |
| background: rgba(220,53,69,0.2); |
| color: #ff4444; |
| } |
| .content-action-btn.edit-btn:hover { |
| background: rgba(62,166,255,0.2); |
| color: #3ea6ff; |
| } |
| |
| |
| .modal-overlay { |
| position: fixed; |
| top: 0; |
| left: 0; |
| right: 0; |
| bottom: 0; |
| background: rgba(0,0,0,0.7); |
| z-index: 2000; |
| display: none; |
| align-items: center; |
| justify-content: center; |
| padding: 20px; |
| backdrop-filter: blur(4px); |
| } |
| .modal-overlay.visible { |
| display: flex; |
| animation: fadeIn 0.2s ease; |
| } |
| @keyframes fadeIn { |
| from { opacity: 0; } |
| to { opacity: 1; } |
| } |
| .modal-card { |
| background: var(--bg-secondary); |
| border-radius: 16px; |
| width: 100%; |
| max-width: 600px; |
| max-height: 90vh; |
| overflow-y: auto; |
| box-shadow: 0 16px 48px rgba(0,0,0,0.5); |
| } |
| .modal-header { |
| display: flex; |
| justify-content: space-between; |
| align-items: center; |
| padding: 20px 24px; |
| border-bottom: 1px solid var(--border-color); |
| } |
| .modal-header h3 { |
| font-size: 18px; |
| display: flex; |
| align-items: center; |
| gap: 8px; |
| } |
| .modal-close { |
| width: 36px; |
| height: 36px; |
| border-radius: 50%; |
| background: var(--bg-tertiary); |
| border: none; |
| color: var(--text-primary); |
| cursor: pointer; |
| font-size: 16px; |
| display: flex; |
| align-items: center; |
| justify-content: center; |
| transition: background 0.2s; |
| } |
| .modal-close:hover { |
| background: var(--bg-hover); |
| } |
| .modal-body { |
| padding: 24px; |
| } |
| .modal-footer { |
| padding: 16px 24px; |
| border-top: 1px solid var(--border-color); |
| display: flex; |
| justify-content: flex-end; |
| gap: 12px; |
| } |
| |
| |
| .bulk-actions-bar { |
| display: none; |
| background: #1a237e; |
| padding: 12px 20px; |
| border-radius: 8px; |
| margin-bottom: 16px; |
| align-items: center; |
| justify-content: space-between; |
| animation: slideDown 0.3s ease; |
| } |
| .bulk-actions-bar.visible { |
| display: flex; |
| } |
| .bulk-actions-bar .selected-count { |
| font-size: 14px; |
| font-weight: 500; |
| } |
| .bulk-actions-bar .bulk-btns { |
| display: flex; |
| gap: 8px; |
| } |
| |
| |
| .settings-section { |
| background: var(--bg-secondary); |
| border-radius: 12px; |
| padding: 24px; |
| margin-bottom: 16px; |
| border: 1px solid var(--border-color); |
| } |
| .settings-section h3 { |
| font-size: 16px; |
| margin-bottom: 16px; |
| display: flex; |
| align-items: center; |
| gap: 8px; |
| } |
| .setting-item { |
| display: flex; |
| justify-content: space-between; |
| align-items: center; |
| padding: 12px 0; |
| border-bottom: 1px solid rgba(255,255,255,0.05); |
| } |
| .setting-item:last-child { |
| border-bottom: none; |
| } |
| .setting-info h4 { |
| font-size: 14px; |
| margin-bottom: 2px; |
| } |
| .setting-info p { |
| font-size: 12px; |
| color: var(--text-secondary); |
| } |
| |
| |
| .toggle-switch { |
| position: relative; |
| width: 48px; |
| height: 26px; |
| } |
| .toggle-switch input { |
| opacity: 0; |
| width: 0; |
| height: 0; |
| } |
| .toggle-slider { |
| position: absolute; |
| cursor: pointer; |
| top: 0; |
| left: 0; |
| right: 0; |
| bottom: 0; |
| background: #555; |
| border-radius: 26px; |
| transition: 0.3s; |
| } |
| .toggle-slider:before { |
| content: ''; |
| position: absolute; |
| height: 20px; |
| width: 20px; |
| left: 3px; |
| bottom: 3px; |
| background: white; |
| border-radius: 50%; |
| transition: 0.3s; |
| } |
| .toggle-switch input:checked + .toggle-slider { |
| background: #2ecc71; |
| } |
| .toggle-switch input:checked + .toggle-slider:before { |
| transform: translateX(22px); |
| } |
| |
| |
| .empty-state { |
| text-align: center; |
| padding: 60px 20px; |
| color: var(--text-secondary); |
| } |
| .empty-state i { |
| font-size: 64px; |
| margin-bottom: 16px; |
| opacity: 0.5; |
| } |
| |
| |
| .confirm-dialog { |
| text-align: center; |
| padding: 20px; |
| } |
| .confirm-dialog i { |
| font-size: 48px; |
| color: #ff4444; |
| margin-bottom: 16px; |
| } |
| .confirm-dialog h3 { |
| margin-bottom: 8px; |
| justify-content: center; |
| } |
| .confirm-dialog p { |
| color: var(--text-secondary); |
| margin-bottom: 24px; |
| } |
| |
| @media (max-width: 768px) { |
| .admin-dashboard { |
| padding: 16px; |
| } |
| .admin-form-grid { |
| grid-template-columns: 1fr; |
| } |
| .content-item { |
| flex-wrap: wrap; |
| padding: 12px; |
| } |
| .content-thumb { |
| width: 100px; |
| min-width: 100px; |
| height: 56px; |
| } |
| .content-actions-btns { |
| width: 100%; |
| justify-content: flex-end; |
| margin-top: 8px; |
| } |
| .admin-table-header { |
| flex-direction: column; |
| align-items: flex-start; |
| } |
| .admin-search input { |
| width: 150px; |
| } |
| .stats-grid { |
| grid-template-columns: 1fr 1fr; |
| } |
| .login-card { |
| padding: 32px 24px; |
| } |
| } |
| |
| @media (max-width: 480px) { |
| .stats-grid { |
| grid-template-columns: 1fr; |
| } |
| } |
| </style> |
| </head> |
| <body class="admin-body"> |
| |
| <header class="header"> |
| <div class="header-left"> |
| <button class="menu-btn" onclick="location.href='index.html'"> |
| <i class="fas fa-arrow-left"></i> |
| </button> |
| <a href="index.html" class="logo"> |
| <i class="fas fa-play-circle logo-icon"></i> |
| <span class="logo-text">YouRuhi</span> |
| </a> |
| </div> |
| <div class="header-center"> |
| <div class="search-box"> |
| <input type="text" placeholder="Search"> |
| <button class="search-btn"><i class="fas fa-search"></i></button> |
| </div> |
| </div> |
| <div class="header-right"> |
| <button class="icon-btn" onclick="location.href='index.html'"> |
| <i class="fas fa-home"></i> |
| </button> |
| <div class="avatar" style="background:#ff0000;">A</div> |
| </div> |
| </header> |
|
|
| <div class="admin-container"> |
| |
| <div class="admin-login" id="adminLogin"> |
| <div class="login-card"> |
| <div class="login-icon"> |
| <i class="fas fa-user-shield"></i> |
| </div> |
| <h2>Admin Panel</h2> |
| <p class="login-subtitle">Enter password to access admin features</p> |
| <form class="login-form" onsubmit="adminLogin(event)"> |
| <input type="password" class="form-input" id="adminPassword" |
| placeholder="••••••" autofocus> |
| <p class="login-error" id="loginError">❌ Wrong password! Try again.</p> |
| <button type="submit" class="login-btn"> |
| <i class="fas fa-lock-open"></i> Login |
| </button> |
| </form> |
| <p class="login-hint">💡 Default password: <strong>admin123</strong></p> |
| </div> |
| </div> |
|
|
| |
| <div class="admin-dashboard" id="adminDashboard"> |
| |
| <div class="admin-top-bar"> |
| <h1><i class="fas fa-user-shield"></i> Admin Dashboard</h1> |
| <div class="admin-actions"> |
| <button class="admin-btn admin-btn-primary" onclick="toggleAddForm('video')"> |
| <i class="fas fa-plus"></i> Add Video |
| </button> |
| <button class="admin-btn admin-btn-warning" onclick="toggleAddForm('short')"> |
| <i class="fas fa-bolt"></i> Add Short |
| </button> |
| <button class="admin-btn admin-btn-secondary" onclick="adminLogout()"> |
| <i class="fas fa-sign-out-alt"></i> Logout |
| </button> |
| </div> |
| </div> |
|
|
| |
| <div class="stats-grid" id="statsGrid"> |
| <div class="stat-card"> |
| <div class="stat-icon" style="background:linear-gradient(135deg,#3498db,#2980b9)"> |
| <i class="fas fa-video"></i> |
| </div> |
| <div class="stat-info"> |
| <h3 id="totalVideos">0</h3> |
| <p>Total Videos</p> |
| </div> |
| </div> |
| <div class="stat-card"> |
| <div class="stat-icon" style="background:linear-gradient(135deg,#e74c3c,#c0392b)"> |
| <i class="fas fa-bolt"></i> |
| </div> |
| <div class="stat-info"> |
| <h3 id="totalShorts">0</h3> |
| <p>Total Shorts</p> |
| </div> |
| </div> |
| <div class="stat-card"> |
| <div class="stat-icon" style="background:linear-gradient(135deg,#2ecc71,#27ae60)"> |
| <i class="fas fa-eye"></i> |
| </div> |
| <div class="stat-info"> |
| <h3 id="totalViews">0</h3> |
| <p>Total Views</p> |
| </div> |
| </div> |
| <div class="stat-card"> |
| <div class="stat-icon" style="background:linear-gradient(135deg,#9b59b6,#8e44ad)"> |
| <i class="fas fa-comments"></i> |
| </div> |
| <div class="stat-info"> |
| <h3 id="totalComments">0</h3> |
| <p>Comments</p> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="admin-add-form" id="adminAddForm"> |
| <h3 id="addFormTitle"><i class="fas fa-plus-circle"></i> Add New Video</h3> |
| <form onsubmit="adminAddContent(event)"> |
| <div class="admin-form-grid"> |
| <div class="form-group full-width"> |
| <label>Title <span class="required">*</span></label> |
| <input type="text" class="form-input" id="adminTitle" required placeholder="Enter title"> |
| </div> |
| <div class="form-group full-width"> |
| <label>Video URL <span class="required">*</span></label> |
| <input type="url" class="form-input" id="adminURL" required |
| placeholder="YouTube URL or direct video URL"> |
| </div> |
| <div class="form-group"> |
| <label>Thumbnail URL</label> |
| <input type="url" class="form-input" id="adminThumbnail" |
| placeholder="Thumbnail image URL"> |
| </div> |
| <div class="form-group"> |
| <label>Channel Name</label> |
| <input type="text" class="form-input" id="adminChannel" |
| value="YouRuhi Official" placeholder="Channel name"> |
| </div> |
| <div class="form-group" id="adminCategoryGroup"> |
| <label>Category</label> |
| <select class="form-select" id="adminCategory"> |
| <option value="music">Music</option> |
| <option value="gaming">Gaming</option> |
| <option value="education">Education</option> |
| <option value="comedy">Comedy</option> |
| <option value="tech">Technology</option> |
| <option value="news">News</option> |
| <option value="sports">Sports</option> |
| <option value="cooking">Cooking</option> |
| <option value="travel">Travel</option> |
| <option value="fitness">Fitness</option> |
| <option value="movies">Movies</option> |
| </select> |
| </div> |
| <div class="form-group" id="adminDurationGroup"> |
| <label>Duration</label> |
| <input type="text" class="form-input" id="adminDuration" placeholder="12:34"> |
| </div> |
| <div class="form-group"> |
| <label>Subscribers</label> |
| <input type="text" class="form-input" id="adminSubs" |
| placeholder="1.5M" value="1M"> |
| </div> |
| <div class="form-group"> |
| <label>Initial Views</label> |
| <input type="number" class="form-input" id="adminViews" |
| placeholder="0" value="0" min="0"> |
| </div> |
| <div class="form-group full-width"> |
| <label>Description</label> |
| <textarea class="form-input" id="adminDescription" rows="3" |
| placeholder="Video description..."></textarea> |
| </div> |
| </div> |
| <div class="admin-form-actions"> |
| <button type="button" class="admin-btn admin-btn-secondary" onclick="hideAddForm()"> |
| Cancel |
| </button> |
| <button type="submit" class="admin-btn admin-btn-primary" id="adminSubmitBtn"> |
| <i class="fas fa-plus"></i> Add Video |
| </button> |
| </div> |
| </form> |
| </div> |
|
|
| |
| <div class="admin-tabs"> |
| <button class="admin-tab active" onclick="switchAdminTab('videos', this)"> |
| <i class="fas fa-video"></i> Videos |
| <span class="tab-badge" id="videoBadge">0</span> |
| </button> |
| <button class="admin-tab" onclick="switchAdminTab('shorts', this)"> |
| <i class="fas fa-bolt"></i> Shorts |
| <span class="tab-badge" id="shortBadge">0</span> |
| </button> |
| <button class="admin-tab" onclick="switchAdminTab('comments', this)"> |
| <i class="fas fa-comments"></i> Comments |
| <span class="tab-badge" id="commentBadge">0</span> |
| </button> |
| <button class="admin-tab" onclick="switchAdminTab('settings', this)"> |
| <i class="fas fa-cog"></i> Settings |
| </button> |
| </div> |
|
|
| |
| <div class="tab-content active" id="tab-videos"> |
| <div class="bulk-actions-bar" id="bulkBar"> |
| <span class="selected-count"><span id="selectedCount">0</span> selected</span> |
| <div class="bulk-btns"> |
| <button class="admin-btn admin-btn-danger" onclick="bulkDelete()"> |
| <i class="fas fa-trash"></i> Delete Selected |
| </button> |
| <button class="admin-btn admin-btn-secondary" onclick="clearSelection()"> |
| Cancel |
| </button> |
| </div> |
| </div> |
| <div class="admin-table-wrapper"> |
| <div class="admin-table-header"> |
| <h3><i class="fas fa-film"></i> All Videos</h3> |
| <div class="admin-search"> |
| <i class="fas fa-search"></i> |
| <input type="text" id="adminVideoSearch" placeholder="Search videos..." |
| oninput="filterAdminContent('videos')"> |
| </div> |
| </div> |
| <div class="admin-table"> |
| <ul class="content-list" id="adminVideoList"> |
| |
| </ul> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="tab-content" id="tab-shorts"> |
| <div class="admin-table-wrapper"> |
| <div class="admin-table-header"> |
| <h3><i class="fas fa-bolt"></i> All Shorts</h3> |
| <div class="admin-search"> |
| <i class="fas fa-search"></i> |
| <input type="text" id="adminShortSearch" placeholder="Search shorts..." |
| oninput="filterAdminContent('shorts')"> |
| </div> |
| </div> |
| <div class="admin-table"> |
| <ul class="content-list" id="adminShortList"> |
| |
| </ul> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="tab-content" id="tab-comments"> |
| <div class="admin-table-wrapper"> |
| <div class="admin-table-header"> |
| <h3><i class="fas fa-comments"></i> All Comments</h3> |
| <div style="display:flex; gap:8px;"> |
| <button class="admin-btn admin-btn-danger" onclick="deleteAllComments()" style="font-size:12px;"> |
| <i class="fas fa-trash"></i> Delete All |
| </button> |
| </div> |
| </div> |
| <div class="admin-table"> |
| <ul class="content-list" id="adminCommentList"> |
| |
| </ul> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="tab-content" id="tab-settings"> |
| <div class="settings-section"> |
| <h3><i class="fas fa-palette"></i> General Settings</h3> |
| <div class="setting-item"> |
| <div class="setting-info"> |
| <h4>Dark Mode</h4> |
| <p>Enable dark theme (always on)</p> |
| </div> |
| <label class="toggle-switch"> |
| <input type="checkbox" checked> |
| <span class="toggle-slider"></span> |
| </label> |
| </div> |
| <div class="setting-item"> |
| <div class="setting-info"> |
| <h4>Allow User Uploads</h4> |
| <p>Let users upload videos and shorts</p> |
| </div> |
| <label class="toggle-switch"> |
| <input type="checkbox" checked> |
| <span class="toggle-slider"></span> |
| </label> |
| </div> |
| <div class="setting-item"> |
| <div class="setting-info"> |
| <h4>Show Comments</h4> |
| <p>Display comments on videos</p> |
| </div> |
| <label class="toggle-switch"> |
| <input type="checkbox" checked> |
| <span class="toggle-slider"></span> |
| </label> |
| </div> |
| <div class="setting-item"> |
| <div class="setting-info"> |
| <h4>Auto-play Videos</h4> |
| <p>Automatically play next video</p> |
| </div> |
| <label class="toggle-switch"> |
| <input type="checkbox" checked> |
| <span class="toggle-slider"></span> |
| </label> |
| </div> |
| </div> |
|
|
| <div class="settings-section"> |
| <h3><i class="fas fa-key"></i> Security</h3> |
| <div class="setting-item"> |
| <div class="setting-info"> |
| <h4>Change Password</h4> |
| <p>Update admin panel password</p> |
| </div> |
| <button class="admin-btn admin-btn-secondary" onclick="changePassword()"> |
| <i class="fas fa-key"></i> Change |
| </button> |
| </div> |
| </div> |
|
|
| <div class="settings-section"> |
| <h3><i class="fas fa-database"></i> Data Management</h3> |
| <div class="setting-item"> |
| <div class="setting-info"> |
| <h4>Export Data</h4> |
| <p>Download all data as JSON</p> |
| </div> |
| <button class="admin-btn admin-btn-success" onclick="exportData()"> |
| <i class="fas fa-download"></i> Export |
| </button> |
| </div> |
| <div class="setting-item"> |
| <div class="setting-info"> |
| <h4>Import Data</h4> |
| <p>Import data from JSON file</p> |
| </div> |
| <button class="admin-btn admin-btn-secondary" onclick="document.getElementById('importFile').click()"> |
| <i class="fas fa-upload"></i> Import |
| </button> |
| <input type="file" id="importFile" accept=".json" style="display:none" onchange="importData(this)"> |
| </div> |
| <div class="setting-item"> |
| <div class="setting-info"> |
| <h4>Reset Demo Data</h4> |
| <p>Reload default demo content</p> |
| </div> |
| <button class="admin-btn admin-btn-warning" onclick="resetDemoData()"> |
| <i class="fas fa-redo"></i> Reset |
| </button> |
| </div> |
| <div class="setting-item"> |
| <div class="setting-info"> |
| <h4>Delete All Data</h4> |
| <p>⚠️ This will remove everything permanently</p> |
| </div> |
| <button class="admin-btn admin-btn-danger" onclick="deleteAllData()"> |
| <i class="fas fa-trash-alt"></i> Delete All |
| </button> |
| </div> |
| </div> |
|
|
| <div class="settings-section"> |
| <h3><i class="fas fa-info-circle"></i> About</h3> |
| <div class="setting-item"> |
| <div class="setting-info"> |
| <h4>YouRuhi v1.0</h4> |
| <p>YouTube Clone - Built with ❤️ | Pure HTML, CSS, JavaScript</p> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="modal-overlay" id="editModal"> |
| <div class="modal-card"> |
| <div class="modal-header"> |
| <h3><i class="fas fa-edit"></i> Edit Content</h3> |
| <button class="modal-close" onclick="closeEditModal()"> |
| <i class="fas fa-times"></i> |
| </button> |
| </div> |
| <div class="modal-body"> |
| <form id="editForm" onsubmit="saveEdit(event)"> |
| <div class="admin-form-grid"> |
| <input type="hidden" id="editId"> |
| <input type="hidden" id="editType"> |
| <div class="form-group full-width"> |
| <label>Title</label> |
| <input type="text" class="form-input" id="editTitle" required> |
| </div> |
| <div class="form-group full-width"> |
| <label>URL</label> |
| <input type="url" class="form-input" id="editURL" required> |
| </div> |
| <div class="form-group"> |
| <label>Thumbnail URL</label> |
| <input type="url" class="form-input" id="editThumbnail"> |
| </div> |
| <div class="form-group"> |
| <label>Channel Name</label> |
| <input type="text" class="form-input" id="editChannel"> |
| </div> |
| <div class="form-group"> |
| <label>Category</label> |
| <select class="form-select" id="editCategory"> |
| <option value="music">Music</option> |
| <option value="gaming">Gaming</option> |
| <option value="education">Education</option> |
| <option value="comedy">Comedy</option> |
| <option value="tech">Technology</option> |
| <option value="news">News</option> |
| <option value="sports">Sports</option> |
| <option value="cooking">Cooking</option> |
| <option value="travel">Travel</option> |
| <option value="fitness">Fitness</option> |
| <option value="movies">Movies</option> |
| </select> |
| </div> |
| <div class="form-group"> |
| <label>Duration</label> |
| <input type="text" class="form-input" id="editDuration"> |
| </div> |
| <div class="form-group full-width"> |
| <label>Description</label> |
| <textarea class="form-input" id="editDescription" rows="3"></textarea> |
| </div> |
| </div> |
| </form> |
| </div> |
| <div class="modal-footer"> |
| <button class="admin-btn admin-btn-secondary" onclick="closeEditModal()">Cancel</button> |
| <button class="admin-btn admin-btn-primary" onclick="document.getElementById('editForm').dispatchEvent(new Event('submit'))"> |
| <i class="fas fa-save"></i> Save Changes |
| </button> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="modal-overlay" id="confirmModal"> |
| <div class="modal-card" style="max-width:420px;"> |
| <div class="modal-body"> |
| <div class="confirm-dialog"> |
| <i class="fas fa-exclamation-triangle"></i> |
| <h3 id="confirmTitle">Are you sure?</h3> |
| <p id="confirmMessage">This action cannot be undone.</p> |
| <div style="display:flex; gap:12px; justify-content:center;"> |
| <button class="admin-btn admin-btn-secondary" onclick="closeConfirmModal()">Cancel</button> |
| <button class="admin-btn admin-btn-danger" id="confirmAction">Delete</button> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <nav class="mobile-bottom-nav" style="display:none;"> |
| <a href="index.html" class="mobile-nav-item"> |
| <i class="fas fa-home"></i><span>Home</span> |
| </a> |
| <a href="shorts.html" class="mobile-nav-item"> |
| <i class="fas fa-bolt"></i><span>Shorts</span> |
| </a> |
| <a href="upload.html" class="mobile-nav-item upload-nav"> |
| <i class="fas fa-plus-circle"></i><span>Upload</span> |
| </a> |
| <a href="#" class="mobile-nav-item"> |
| <i class="fas fa-bell"></i><span>Alerts</span> |
| </a> |
| <a href="admin.html" class="mobile-nav-item active"> |
| <i class="fas fa-user"></i><span>Admin</span> |
| </a> |
| </nav> |
|
|
| <script src="js/app.js"></script> |
| <script src="js/admin.js"></script> |
| </body> |
| </html> |
|
|