File size: 16,532 Bytes
c63d60d e933e48 c63d60d e933e48 c63d60d e933e48 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
<!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 -->
<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 Content -->
<main class="container mx-auto px-4 py-8">
<!-- Login Panel (shown by default) -->
<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>
<!-- Subscriptions Panel (hidden by default) -->
<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>
<!-- Channel Grid -->
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6" id="channelsGrid">
<!-- Skeleton loading -->
<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>
<!-- Channel Videos Modal -->
<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">
<!-- Videos will be inserted here -->
</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 -->
<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>
// Sample channel data
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" }
]
}
];
// DOM elements
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');
// Simulate login
simulateLogin.addEventListener('click', () => {
loginPanel.classList.add('hidden');
subscriptionsPanel.classList.remove('hidden');
loginBtn.textContent = "My Account";
// Simulate loading
setTimeout(() => {
renderChannels();
}, 1500);
});
// Render channels
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);
});
}
// Open channel modal
function openChannelModal(channel) {
modalChannelName.textContent = channel.name;
modalChannelLogo.src = channel.logo;
modalChannelSubs.textContent = `${channel.subscribers} subscribers`;
modalChannelDesc.textContent = channel.description;
// Clear previous videos
channelVideos.innerHTML = '';
// Add videos
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');
}
// Close modal
closeModal.addEventListener('click', () => {
channelModal.classList.add('hidden');
});
// Close modal when clicking outside
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> |