Spaces:
Running
Running
Download index.html from LexStrike-7/hello: direct link, hf CLI and curl.
- Browser
- Download file 18.1 kB
-
https://huggingface.co/spaces/LexStrike-7/hello/resolve/main/index.html
- Command line
-
hf download hf://spaces/LexStrike-7/hello/index.html
-
curl -L -o index.html https://huggingface.co/spaces/LexStrike-7/hello/resolve/main/index.html
18.1 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta name="theme-color" content="#1a1a2e"> | |
| <meta name="description" content="Premium Music Streaming - Ad-free high quality audio, offline downloads, lyrics, and personalized recommendations"> | |
| <title>Harmony+ | Premium Music Streaming</title> | |
| <link rel="manifest" href="/manifest.json"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet"> | |
| <script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <style> | |
| .player-container { | |
| background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); | |
| } | |
| .playlist-item:hover { | |
| background: rgba(255, 255, 255, 0.1); | |
| } | |
| .progress-bar { | |
| height: 4px; | |
| background: rgba(255, 255, 255, 0.2); | |
| } | |
| .progress { | |
| height: 100%; | |
| background: #f72585; | |
| } | |
| .blur-bg { | |
| backdrop-filter: blur(10px); | |
| background: rgba(0, 0, 0, 0.5); | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-900 text-white min-h-screen"> | |
| <div id="vanta-bg" class="fixed inset-0 z-0"></div> | |
| <div class="relative z-10 max-w-6xl mx-auto px-4 py-8"> | |
| <!-- Header --> | |
| <header class="flex justify-between items-center mb-10"> | |
| <div class="flex items-center"> | |
| <i data-feather="music" class="text-pink-500 mr-2"></i> | |
| <h1 class="text-2xl font-bold bg-gradient-to-r from-pink-500 to-purple-600 bg-clip-text text-transparent">Harmony+</h1> | |
| </div> | |
| <div class="flex space-x-4"> | |
| <button class="bg-pink-600 hover:bg-pink-700 px-4 py-2 rounded-full flex items-center"> | |
| <i data-feather="user" class="mr-2"></i> | |
| Login | |
| </button> | |
| </div> | |
| </header> | |
| <!-- Main Content --> | |
| <main class="grid grid-cols-1 lg:grid-cols-3 gap-8"> | |
| <!-- Playlist Input Section --> | |
| <div class="lg:col-span-2"> | |
| <div class="player-container rounded-xl p-6 shadow-xl mb-8" data-aos="fade-up"> | |
| <h2 class="text-xl font-semibold mb-4">Discover Premium Music</h2> | |
| <div class="grid grid-cols-2 md:grid-cols-4 gap-4"> | |
| <div class="bg-gradient-to-br from-pink-600 to-purple-700 p-4 rounded-lg cursor-pointer hover:scale-105 transition-transform"> | |
| <i data-feather="trending-up" class="w-6 h-6 mb-2"></i> | |
| <h3 class="font-medium">Trending Now</h3> | |
| </div> | |
| <div class="bg-gradient-to-br from-blue-600 to-indigo-700 p-4 rounded-lg cursor-pointer hover:scale-105 transition-transform"> | |
| <i data-feather="activity" class="w-6 h-6 mb-2"></i> | |
| <h3 class="font-medium">Workout Mix</h3> | |
| </div> | |
| <div class="bg-gradient-to-br from-green-600 to-teal-700 p-4 rounded-lg cursor-pointer hover:scale-105 transition-transform"> | |
| <i data-feather="moon" class="w-6 h-6 mb-2"></i> | |
| <h3 class="font-medium">Chill Vibes</h3> | |
| </div> | |
| <div class="bg-gradient-to-br from-yellow-600 to-orange-700 p-4 rounded-lg cursor-pointer hover:scale-105 transition-transform"> | |
| <i data-feather="book" class="w-6 h-6 mb-2"></i> | |
| <h3 class="font-medium">Focus Flow</h3> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Now Playing --> | |
| <div class="player-container rounded-xl p-6 shadow-xl" data-aos="fade-up" data-aos-delay="100"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <div class="flex space-x-2"> | |
| <span class="text-xs bg-pink-600 px-2 py-1 rounded-full">PREMIUM</span> | |
| <span class="text-xs bg-gray-700 px-2 py-1 rounded-full">HQ Audio</span> | |
| </div> | |
| <button class="text-gray-400 hover:text-white"> | |
| <i data-feather="download" class="w-5 h-5"></i> | |
| </button> | |
| </div> | |
| <div class="flex items-center mb-6"> | |
| <img src="http://static.photos/music/640x360/1" id="current-track-art" class="w-24 h-24 rounded-lg object-cover mr-4"> | |
| <div> | |
| <h3 id="current-track-title" class="text-xl font-bold">No track selected</h3> | |
| <p id="current-track-artist" class="text-gray-400">Select a playlist first</p> | |
| </div> | |
| </div> | |
| <div class="progress-bar rounded-full mb-4"> | |
| <div class="progress rounded-full w-0"></div> | |
| </div> | |
| <div class="flex justify-between items-center"> | |
| <span id="current-time" class="text-sm text-gray-400">0:00</span> | |
| <span id="duration" class="text-sm text-gray-400">0:00</span> | |
| </div> | |
| <div class="flex justify-center items-center mt-6 space-x-8"> | |
| <button class="text-gray-400 hover:text-white"> | |
| <i data-feather="repeat" class="w-5 h-5"></i> | |
| </button> | |
| <button class="text-gray-400 hover:text-white"> | |
| <i data-feather="skip-back" class="w-6 h-6"></i> | |
| </button> | |
| <button id="play-btn" class="bg-pink-600 hover:bg-pink-700 w-12 h-12 rounded-full flex items-center justify-center"> | |
| <i data-feather="play" class="w-6 h-6"></i> | |
| </button> | |
| <button class="text-gray-400 hover:text-white"> | |
| <i data-feather="skip-forward" class="w-6 h-6"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Playlist & Lyrics Section --> | |
| <div class="lg:col-span-1 space-y-6"> | |
| <div class="player-container rounded-xl p-6 shadow-xl" data-aos="fade-up" data-aos-delay="200"> | |
| <h2 class="text-xl font-semibold mb-4">Lyrics</h2> | |
| <div class="text-center py-10 text-gray-500"> | |
| <i data-feather="mic" class="w-8 h-8 mx-auto mb-2"></i> | |
| <p>Lyrics available for premium tracks</p> | |
| <p class="text-sm">Play a song to view synchronized lyrics</p> | |
| </div> | |
| </div> | |
| <div class="player-container rounded-xl p-6 shadow-xl" data-aos="fade-up" data-aos-delay="300"> | |
| <div class="player-container rounded-xl p-6 shadow-xl h-full" data-aos="fade-up" data-aos-delay="200"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h2 class="text-xl font-semibold">Playlist</h2> | |
| <button id="shuffle-btn" class="text-gray-400 hover:text-white flex items-center"> | |
| <i data-feather="shuffle" class="w-4 h-4 mr-1"></i> Shuffle | |
| </button> | |
| </div> | |
| <div id="playlist-container" class="overflow-y-auto max-h-96"> | |
| <div class="text-center py-10 text-gray-500"> | |
| <i data-feather="music" class="w-8 h-8 mx-auto mb-2"></i> | |
| <p>No playlist loaded</p> | |
| <p class="text-sm">Paste a YouTube Music playlist URL above</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| <script> | |
| // Register service worker for PWA | |
| if ('serviceWorker' in navigator) { | |
| window.addEventListener('load', () => { | |
| navigator.serviceWorker.register('/sw.js') | |
| .then(registration => { | |
| console.log('ServiceWorker registration successful'); | |
| }) | |
| .catch(err => { | |
| console.log('ServiceWorker registration failed: ', err); | |
| }); | |
| }); | |
| } | |
| // Show install prompt | |
| let deferredPrompt; | |
| window.addEventListener('beforeinstallprompt', (e) => { | |
| e.preventDefault(); | |
| deferredPrompt = e; | |
| // Show install button | |
| const installBtn = document.createElement('button'); | |
| installBtn.className = 'bg-purple-600 hover:bg-purple-700 px-4 py-2 rounded-full flex items-center ml-4'; | |
| installBtn.innerHTML = '<i data-feather="download" class="mr-2"></i> Install App'; | |
| installBtn.addEventListener('click', async () => { | |
| deferredPrompt.prompt(); | |
| const { outcome } = await deferredPrompt.userChoice; | |
| if (outcome === 'accepted') { | |
| installBtn.remove(); | |
| } | |
| deferredPrompt = null; | |
| }); | |
| document.querySelector('header div.flex.space-x-4').appendChild(installBtn); | |
| feather.replace(); | |
| }); | |
| // Initialize animations and icons | |
| document.addEventListener('DOMContentLoaded', function() { | |
| AOS.init(); | |
| feather.replace(); | |
| // Vanta.js background | |
| VANTA.GLOBE({ | |
| el: "#vanta-bg", | |
| mouseControls: true, | |
| touchControls: true, | |
| gyroControls: false, | |
| minHeight: 200.00, | |
| minWidth: 200.00, | |
| scale: 1.00, | |
| scaleMobile: 1.00, | |
| color: 0xf72585, | |
| backgroundColor: 0x111827, | |
| size: 0.8 | |
| }); | |
| // Mock player functionality | |
| const playBtn = document.getElementById('play-btn'); | |
| let isPlaying = false; | |
| playBtn.addEventListener('click', function() { | |
| isPlaying = !isPlaying; | |
| if (isPlaying) { | |
| playBtn.innerHTML = '<i data-feather="pause" class="w-6 h-6"></i>'; | |
| feather.replace(); | |
| simulatePlayback(); | |
| } else { | |
| playBtn.innerHTML = '<i data-feather="play" class="w-6 h-6"></i>'; | |
| feather.replace(); | |
| clearInterval(playbackInterval); | |
| } | |
| }); | |
| // Mock playlist loading | |
| const loadBtn = document.getElementById('load-playlist'); | |
| loadBtn.addEventListener('click', function() { | |
| const url = document.getElementById('playlist-url').value; | |
| if (url) { | |
| loadMockPlaylist(); | |
| } else { | |
| alert('Please enter a YouTube Music playlist URL'); | |
| } | |
| }); | |
| function loadMockPlaylist() { | |
| const playlistContainer = document.getElementById('playlist-container'); | |
| playlistContainer.innerHTML = ''; | |
| // Mock playlist data | |
| const mockPlaylist = [ | |
| { title: "Blinding Lights", artist: "The Weeknd", duration: "3:20", art: "http://static.photos/music/200x200/1" }, | |
| { title: "Save Your Tears", artist: "The Weeknd", duration: "3:35", art: "http://static.photos/music/200x200/2" }, | |
| { title: "Stay", artist: "The Kid LAROI, Justin Bieber", duration: "2:21", art: "http://static.photos/music/200x200/3" }, | |
| { title: "good 4 u", artist: "Olivia Rodrigo", duration: "2:58", art: "http://static.photos/music/200x200/4" }, | |
| { title: "Levitating", artist: "Dua Lipa", duration: "3:23", art: "http://static.photos/music/200x200/5" }, | |
| { title: "Montero", artist: "Lil Nas X", duration: "2:17", art: "http://static.photos/music/200x200/6" }, | |
| { title: "Peaches", artist: "Justin Bieber", duration: "3:18", art: "http://static.photos/music/200x200/7" }, | |
| { title: "Kiss Me More", artist: "Doja Cat ft. SZA", duration: "3:28", art: "http://static.photos/music/200x200/8" }, | |
| ]; | |
| mockPlaylist.forEach((track, index) => { | |
| const trackElement = document.createElement('div'); | |
| trackElement.className = 'playlist-item flex items-center p-3 rounded-lg cursor-pointer mb-2'; | |
| trackElement.innerHTML = ` | |
| <img src="${track.art}" class="w-10 h-10 rounded mr-3"> | |
| <div class="flex-grow"> | |
| <div class="font-medium">${track.title}</div> | |
| <div class="text-sm text-gray-400">${track.artist}</div> | |
| </div> | |
| <div class="text-gray-400 text-sm">${track.duration}</div> | |
| `; | |
| trackElement.addEventListener('click', function() { | |
| playTrack(track, index); | |
| }); | |
| playlistContainer.appendChild(trackElement); | |
| }); | |
| // Play the first track | |
| if (mockPlaylist.length > 0) { | |
| playTrack(mockPlaylist[0], 0); | |
| } | |
| } | |
| let currentTrackIndex = 0; | |
| let playbackInterval; | |
| function playTrack(track, index) { | |
| currentTrackIndex = index; | |
| document.getElementById('current-track-title').textContent = track.title; | |
| document.getElementById('current-track-artist').textContent = track.artist; | |
| document.getElementById('current-track-art').src = track.art; | |
| // Reset playback | |
| document.querySelector('.progress').style.width = '0%'; | |
| document.getElementById('current-time').textContent = '0:00'; | |
| // Parse duration (mock) | |
| const durationParts = track.duration.split(':'); | |
| const durationSeconds = parseInt(durationParts[0]) * 60 + parseInt(durationParts[1]); | |
| document.getElementById('duration').textContent = track.duration; | |
| // Update play button | |
| isPlaying = false; | |
| playBtn.innerHTML = '<i data-feather="play" class="w-6 h-6"></i>'; | |
| feather.replace(); | |
| // Highlight current track in playlist | |
| const playlistItems = document.querySelectorAll('.playlist-item'); | |
| playlistItems.forEach(item => item.classList.remove('bg-gray-800')); | |
| playlistItems[index].classList.add('bg-gray-800'); | |
| } | |
| function simulatePlayback() { | |
| const progressBar = document.querySelector('.progress'); | |
| const currentTime = document.getElementById('current-time'); | |
| const duration = document.getElementById('duration').textContent; | |
| // Parse duration (mock) | |
| const durationParts = duration.split(':'); | |
| const durationSeconds = parseInt(durationParts[0]) * 60 + parseInt(durationParts[1]); | |
| let currentSeconds = 0; | |
| progressBar.style.width = '0%'; | |
| playbackInterval = setInterval(() => { | |
| currentSeconds++; | |
| const progressPercent = (currentSeconds / durationSeconds) * 100; | |
| progressBar.style.width = `${progressPercent}%`; | |
| // Format current time | |
| const minutes = Math.floor(currentSeconds / 60); | |
| const seconds = currentSeconds % 60; | |
| currentTime.textContent = `${minutes}:${seconds < 10 ? '0' + seconds : seconds}`; | |
| if (currentSeconds >= durationSeconds) { | |
| clearInterval(playbackInterval); | |
| // Play next track | |
| const playlistItems = document.querySelectorAll('.playlist-item'); | |
| if (currentTrackIndex < playlistItems.length - 1) { | |
| playlistItems[currentTrackIndex + 1].click(); | |
| playBtn.click(); // Auto play next track | |
| } else { | |
| playBtn.innerHTML = '<i data-feather="play" class="w-6 h-6"></i>'; | |
| feather.replace(); | |
| } | |
| } | |
| }, 1000); | |
| } | |
| // Shuffle functionality | |
| document.getElementById('shuffle-btn').addEventListener('click', function() { | |
| const playlistContainer = document.getElementById('playlist-container'); | |
| const items = Array.from(playlistContainer.children); | |
| // Fisher-Yates shuffle algorithm | |
| for (let i = items.length - 1; i > 0; i--) { | |
| const j = Math.floor(Math.random() * (i + 1)); | |
| playlistContainer.insertBefore(items[j], items[i]); | |
| } | |
| }); | |
| }); | |
| </script> | |
| </body> | |
| </html> | |