|
<!DOCTYPE html> |
|
<html lang="en"> |
|
<head> |
|
<meta charset="UTF-8"> |
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
<title>My YouTube Subscriptions</title> |
|
<script src="https://cdn.tailwindcss.com"></script> |
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> |
|
<style> |
|
.channel-card:hover { |
|
transform: translateY(-5px); |
|
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); |
|
} |
|
.channel-logo { |
|
transition: all 0.3s ease; |
|
} |
|
.channel-card:hover .channel-logo { |
|
transform: scale(1.1); |
|
} |
|
.skeleton { |
|
animation: pulse 2s infinite ease-in-out; |
|
} |
|
@keyframes pulse { |
|
0%, 100% { |
|
opacity: 0.6; |
|
} |
|
50% { |
|
opacity: 0.3; |
|
} |
|
} |
|
</style> |
|
</head> |
|
<body class="bg-gray-100 min-h-screen"> |
|
|
|
<header class="bg-white shadow-sm sticky top-0 z-10"> |
|
<div class="container mx-auto px-4 py-3 flex items-center justify-between"> |
|
<div class="flex items-center space-x-4"> |
|
<div class="text-red-600 text-2xl"> |
|
<i class="fab fa-youtube"></i> |
|
</div> |
|
<h1 class="text-xl font-bold text-gray-800">My Subscriptions</h1> |
|
</div> |
|
<div class="flex items-center space-x-4"> |
|
<button id="loginBtn" class="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded-md font-medium transition-colors"> |
|
Sign In |
|
</button> |
|
<button class="text-gray-600 hover:text-gray-900"> |
|
<i class="fas fa-search text-xl"></i> |
|
</button> |
|
</div> |
|
</div> |
|
</header> |
|
|
|
|
|
<main class="container mx-auto px-4 py-8"> |
|
|
|
<div id="loginPanel" class="max-w-md mx-auto bg-white rounded-xl shadow-md overflow-hidden p-8 text-center"> |
|
<div class="text-red-600 text-5xl mb-6"> |
|
<i class="fab fa-youtube"></i> |
|
</div> |
|
<h2 class="text-2xl font-bold text-gray-800 mb-4">View Your YouTube Subscriptions</h2> |
|
<p class="text-gray-600 mb-6">Sign in to see all the channels you're subscribed to in one place.</p> |
|
<button id="simulateLogin" class="bg-red-600 hover:bg-red-700 text-white px-6 py-3 rounded-md font-medium transition-colors w-full"> |
|
<i class="fab fa-google mr-2"></i> Sign in with Google |
|
</button> |
|
<p class="text-xs text-gray-500 mt-4">This is a demo. No actual YouTube API connection is made.</p> |
|
</div> |
|
|
|
|
|
<div id="subscriptionsPanel" class="hidden"> |
|
<div class="flex items-center justify-between mb-8"> |
|
<h2 class="text-2xl font-bold text-gray-800">Your Subscriptions</h2> |
|
<div class="relative"> |
|
<select class="appearance-none bg-white border border-gray-300 rounded-md px-4 py-2 pr-8 focus:outline-none focus:ring-2 focus:ring-red-500"> |
|
<option>Recently updated</option> |
|
<option>Alphabetical</option> |
|
<option>Most subscribed</option> |
|
</select> |
|
<div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700"> |
|
<i class="fas fa-chevron-down"></i> |
|
</div> |
|
</div> |
|
</div> |
|
|
|
|
|
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6" id="channelsGrid"> |
|
|
|
<div class="bg-white rounded-lg shadow-md overflow-hidden p-4 skeleton"> |
|
<div class="flex items-center space-x-4"> |
|
<div class="w-12 h-12 rounded-full bg-gray-200"></div> |
|
<div class="flex-1"> |
|
<div class="h-4 bg-gray-200 rounded w-3/4 mb-2"></div> |
|
<div class="h-3 bg-gray-200 rounded w-1/2"></div> |
|
</div> |
|
</div> |
|
</div> |
|
<div class="bg-white rounded-lg shadow-md overflow-hidden p-4 skeleton"> |
|
<div class="flex items-center space-x-4"> |
|
<div class="w-12 h-12 rounded-full bg-gray-200"></div> |
|
<div class="flex-1"> |
|
<div class="h-4 bg-gray-200 rounded w-3/4 mb-2"></div> |
|
<div class="h-3 bg-gray-200 rounded w-1/2"></div> |
|
</div> |
|
</div> |
|
</div> |
|
<div class="bg-white rounded-lg shadow-md overflow-hidden p-4 skeleton"> |
|
<div class="flex items-center space-x-4"> |
|
<div class="w-12 h-12 rounded-full bg-gray-200"></div> |
|
<div class="flex-1"> |
|
<div class="h-4 bg-gray-200 rounded w-3/4 mb-2"></div> |
|
<div class="h-3 bg-gray-200 rounded w-1/2"></div> |
|
</div> |
|
</div> |
|
</div> |
|
<div class="bg-white rounded-lg shadow-md overflow-hidden p-4 skeleton"> |
|
<div class="flex items-center space-x-4"> |
|
<div class="w-12 h-12 rounded-full bg-gray-200"></div> |
|
<div class="flex-1"> |
|
<div class="h-4 bg-gray-200 rounded w-3/4 mb-2"></div> |
|
<div class="h-3 bg-gray-200 rounded w-1/2"></div> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
|
|
|
|
<div id="channelModal" class="fixed inset-0 bg-black bg-opacity-50 z-20 hidden flex items-center justify-center p-4"> |
|
<div class="bg-white rounded-lg max-w-4xl w-full max-h-[90vh] overflow-hidden flex flex-col"> |
|
<div class="flex justify-between items-center border-b p-4"> |
|
<h3 class="text-xl font-bold" id="modalChannelName">Channel Name</h3> |
|
<button id="closeModal" class="text-gray-500 hover:text-gray-700"> |
|
<i class="fas fa-times text-xl"></i> |
|
</button> |
|
</div> |
|
<div class="p-4 overflow-y-auto flex-1"> |
|
<div class="flex items-center space-x-4 mb-6"> |
|
<img id="modalChannelLogo" src="" alt="Channel Logo" class="w-16 h-16 rounded-full channel-logo"> |
|
<div> |
|
<p class="text-gray-600" id="modalChannelSubs">Subscribers</p> |
|
<p class="text-sm text-gray-500 mt-1" id="modalChannelDesc">Channel description will appear here.</p> |
|
</div> |
|
</div> |
|
|
|
<h4 class="font-medium text-lg mb-4">Recent Videos</h4> |
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4" id="channelVideos"> |
|
|
|
</div> |
|
</div> |
|
<div class="border-t p-4 flex justify-end"> |
|
<button class="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded-md font-medium transition-colors"> |
|
Visit Channel |
|
</button> |
|
</div> |
|
</div> |
|
</div> |
|
</main> |
|
|
|
|
|
<footer class="bg-white border-t mt-8"> |
|
<div class="container mx-auto px-4 py-6"> |
|
<div class="flex flex-col md:flex-row justify-between items-center"> |
|
<div class="flex items-center space-x-4 mb-4 md:mb-0"> |
|
<div class="text-red-600 text-2xl"> |
|
<i class="fab fa-youtube"></i> |
|
</div> |
|
<span class="text-gray-600">My YouTube Subscriptions</span> |
|
</div> |
|
<div class="flex space-x-6"> |
|
<a href="#" class="text-gray-600 hover:text-red-600">About</a> |
|
<a href="#" class="text-gray-600 hover:text-red-600">Privacy</a> |
|
<a href="#" class="text-gray-600 hover:text-red-600">Terms</a> |
|
<a href="#" class="text-gray-600 hover:text-red-600">Contact</a> |
|
</div> |
|
</div> |
|
<div class="mt-4 text-center md:text-left text-sm text-gray-500"> |
|
<p>This is a demo application. Not affiliated with YouTube.</p> |
|
</div> |
|
</div> |
|
</footer> |
|
|
|
<script> |
|
|
|
const channels = [ |
|
{ |
|
id: 1, |
|
name: "Tech Today", |
|
logo: "https://randomuser.me/api/portraits/lego/1.jpg", |
|
subscribers: "1.2M", |
|
description: "The latest in technology news and reviews.", |
|
videos: [ |
|
{ title: "iPhone 15 Pro Review", thumbnail: "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg", views: "1.4M", date: "3 days ago" }, |
|
{ title: "Best Laptops 2023", thumbnail: "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg", views: "890K", date: "1 week ago" }, |
|
{ title: "Windows 11 Tips & Tricks", thumbnail: "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg", views: "560K", date: "2 weeks ago" } |
|
] |
|
}, |
|
{ |
|
id: 2, |
|
name: "Cooking Master", |
|
logo: "https://randomuser.me/api/portraits/lego/2.jpg", |
|
subscribers: "850K", |
|
description: "Delicious recipes from around the world.", |
|
videos: [ |
|
{ title: "Perfect Chocolate Cake", thumbnail: "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg", views: "2.1M", date: "5 days ago" }, |
|
{ title: "5 Minute Breakfast Ideas", thumbnail: "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg", views: "1.3M", date: "2 weeks ago" } |
|
] |
|
}, |
|
{ |
|
id: 3, |
|
name: "Fitness Journey", |
|
logo: "https://randomuser.me/api/portraits/lego/3.jpg", |
|
subscribers: "450K", |
|
description: "Workout routines and fitness tips for everyone.", |
|
videos: [ |
|
{ title: "30 Min Full Body Workout", thumbnail: "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg", views: "320K", date: "1 day ago" }, |
|
{ title: "Morning Yoga Routine", thumbnail: "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg", views: "210K", date: "4 days ago" }, |
|
{ title: "Meal Prep for Weight Loss", thumbnail: "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg", views: "180K", date: "1 week ago" } |
|
] |
|
}, |
|
{ |
|
id: 4, |
|
name: "Travel Vlogs", |
|
logo: "https://randomuser.me/api/portraits/lego/4.jpg", |
|
subscribers: "1.8M", |
|
description: "Exploring beautiful destinations around the globe.", |
|
videos: [ |
|
{ title: "Bali Travel Guide 2023", thumbnail: "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg", views: "3.2M", date: "2 days ago" }, |
|
{ title: "Hidden Gems in Italy", thumbnail: "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg", views: "1.7M", date: "1 week ago" } |
|
] |
|
} |
|
]; |
|
|
|
|
|
const loginBtn = document.getElementById('loginBtn'); |
|
const simulateLogin = document.getElementById('simulateLogin'); |
|
const loginPanel = document.getElementById('loginPanel'); |
|
const subscriptionsPanel = document.getElementById('subscriptionsPanel'); |
|
const channelsGrid = document.getElementById('channelsGrid'); |
|
const channelModal = document.getElementById('channelModal'); |
|
const closeModal = document.getElementById('closeModal'); |
|
const modalChannelName = document.getElementById('modalChannelName'); |
|
const modalChannelLogo = document.getElementById('modalChannelLogo'); |
|
const modalChannelSubs = document.getElementById('modalChannelSubs'); |
|
const modalChannelDesc = document.getElementById('modalChannelDesc'); |
|
const channelVideos = document.getElementById('channelVideos'); |
|
|
|
|
|
simulateLogin.addEventListener('click', () => { |
|
loginPanel.classList.add('hidden'); |
|
subscriptionsPanel.classList.remove('hidden'); |
|
loginBtn.textContent = "My Account"; |
|
|
|
|
|
setTimeout(() => { |
|
renderChannels(); |
|
}, 1500); |
|
}); |
|
|
|
|
|
function renderChannels() { |
|
channelsGrid.innerHTML = ''; |
|
|
|
channels.forEach(channel => { |
|
const channelCard = document.createElement('div'); |
|
channelCard.className = 'bg-white rounded-lg shadow-md overflow-hidden p-4 channel-card transition-transform duration-300 cursor-pointer'; |
|
channelCard.innerHTML = ` |
|
<div class="flex items-center space-x-4"> |
|
<img src="${channel.logo}" alt="${channel.name}" class="w-12 h-12 rounded-full channel-logo"> |
|
<div> |
|
<h3 class="font-medium text-gray-800">${channel.name}</h3> |
|
<p class="text-sm text-gray-500">${channel.subscribers} subscribers</p> |
|
</div> |
|
</div> |
|
`; |
|
|
|
channelCard.addEventListener('click', () => openChannelModal(channel)); |
|
channelsGrid.appendChild(channelCard); |
|
}); |
|
} |
|
|
|
|
|
function openChannelModal(channel) { |
|
modalChannelName.textContent = channel.name; |
|
modalChannelLogo.src = channel.logo; |
|
modalChannelSubs.textContent = `${channel.subscribers} subscribers`; |
|
modalChannelDesc.textContent = channel.description; |
|
|
|
|
|
channelVideos.innerHTML = ''; |
|
|
|
|
|
channel.videos.forEach(video => { |
|
const videoCard = document.createElement('div'); |
|
videoCard.className = 'bg-gray-50 rounded-lg overflow-hidden'; |
|
videoCard.innerHTML = ` |
|
<img src="${video.thumbnail}" alt="${video.title}" class="w-full h-32 object-cover"> |
|
<div class="p-3"> |
|
<h4 class="font-medium text-gray-800 mb-1 line-clamp-2">${video.title}</h4> |
|
<p class="text-xs text-gray-500">${video.views} views • ${video.date}</p> |
|
</div> |
|
`; |
|
channelVideos.appendChild(videoCard); |
|
}); |
|
|
|
channelModal.classList.remove('hidden'); |
|
} |
|
|
|
|
|
closeModal.addEventListener('click', () => { |
|
channelModal.classList.add('hidden'); |
|
}); |
|
|
|
|
|
channelModal.addEventListener('click', (e) => { |
|
if (e.target === channelModal) { |
|
channelModal.classList.add('hidden'); |
|
} |
|
}); |
|
</script> |
|
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=fmk25/youtube" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> |
|
</html> |