Spaces:
Running
Running
File size: 8,857 Bytes
0df20ca 5f4cbfa 0df20ca 5f4cbfa 0df20ca 5f4cbfa 0df20ca |
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 |
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>VoidScape Player</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
colors: {
primary: {
50: '#f0f9ff',
100: '#e0f2fe',
200: '#bae6fd',
300: '#7dd3fc',
400: '#38bdf8',
500: '#0ea5e9',
600: '#0284c7',
700: '#0369a1',
800: '#075985',
900: '#0c4a6e',
},
secondary: {
50: '#f5f3ff',
100: '#ede9fe',
200: '#ddd6fe',
300: '#c4b5fd',
400: '#a78bfa',
500: '#8b5cf6',
600: '#7c3aed',
700: '#6d28d9',
800: '#5b21b6',
900: '#4c1d95',
}
}
}
}
}
</script>
</head>
<body class="bg-gray-900 text-gray-100 min-h-screen">
<custom-navbar></custom-navbar>
<main class="container mx-auto px-4 py-12">
<div class="max-w-6xl mx-auto">
<h1 class="text-4xl font-bold mb-8 text-transparent bg-clip-text bg-gradient-to-r from-primary-500 to-secondary-500">
VoidScape Player
</h1>
<div class="relative mb-8">
<input type="text" id="search-input" placeholder="Search for music..."
class="w-full bg-gray-800 border border-gray-700 rounded-lg px-6 py-4 text-lg focus:outline-none focus:ring-2 focus:ring-primary-500">
<button id="search-btn" class="absolute right-3 top-1/2 transform -translate-y-1/2 bg-primary-600 hover:bg-primary-700 rounded-lg px-4 py-2 transition-all">
Search
</button>
</div>
<div class="flex justify-between items-center mb-6">
<h2 class="text-2xl font-semibold">Your Playlist</h2>
<div class="flex gap-4">
<button id="download-all" class="px-4 py-2 bg-green-600 hover:bg-green-700 rounded-lg font-medium">
Download New
</button>
<div class="flex gap-2">
<button id="zoom-out" class="p-2 bg-gray-800 rounded-lg hover:bg-gray-700">
<i data-feather="minus"></i>
</button>
<button id="zoom-in" class="p-2 bg-gray-800 rounded-lg hover:bg-gray-700">
<i data-feather="plus"></i>
</button>
</div>
</div>
</div>
<div id="playlist-grid" class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4">
<!-- Playlist items will be inserted here -->
</div>
</div>
</main>
<!-- Search Modal -->
<div id="search-modal" class="fixed inset-0 bg-black bg-opacity-90 z-50 hidden overflow-y-auto">
<div class="container mx-auto px-4 py-12">
<div class="flex justify-between items-center mb-8">
<h2 class="text-2xl font-semibold">Search Results</h2>
<button id="back-btn" class="px-4 py-2 bg-gray-800 hover:bg-gray-700 rounded-lg">
Back to Playlist
</button>
</div>
<div id="search-grid" class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4">
<!-- Search results will be inserted here -->
</div>
</div>
</div>
<!-- Mini Player -->
<div id="mini-player" class="fixed bottom-4 right-4 bg-gray-800 border border-gray-700 rounded-lg shadow-xl w-80 overflow-hidden draggable">
<div class="p-4 cursor-move">
<div class="flex items-center gap-4">
<img id="mini-player-thumb" src="http://static.photos/music/200x200/1" class="w-12 h-12 rounded-lg object-cover">
<div class="flex-1 min-w-0">
<h3 id="mini-player-title" class="font-medium truncate">Song Title</h3>
<p id="mini-player-artist" class="text-sm text-gray-400 truncate">Artist Name</p>
</div>
<div class="flex items-center gap-2">
<span id="mini-player-count" class="text-sm text-gray-400">1/10</span>
</div>
</div>
<div class="flex justify-between items-center mt-4">
<button id="shuffle-btn" class="p-2 text-gray-400 hover:text-white">
<i data-feather="shuffle"></i>
</button>
<button id="prev-btn" class="p-2 text-gray-400 hover:text-white">
<i data-feather="skip-back"></i>
</button>
<button id="play-btn" class="p-2 bg-primary-600 hover:bg-primary-700 rounded-full">
<i data-feather="play"></i>
</button>
<button id="next-btn" class="p-2 text-gray-400 hover:text-white">
<i data-feather="skip-forward"></i>
</button>
<button id="close-player" class="p-2 text-gray-400 hover:text-white">
<i data-feather="x"></i>
</button>
</div>
<div class="mt-2 flex items-center gap-2">
<span class="text-xs text-gray-400">0:00</span>
<div class="flex-1 h-1 bg-gray-700 rounded-full">
<div id="progress-bar" class="h-full bg-primary-500 rounded-full w-0"></div>
</div>
<span class="text-xs text-gray-400">3:45</span>
</div>
</div>
</div>
<script src="components/navbar.js"></script>
<script src="script.js"></script>
<script>
feather.replace();
// Make mini-player draggable
const player = document.getElementById('mini-player');
let isDragging = false;
let offsetX, offsetY;
player.addEventListener('mousedown', (e) => {
if (e.target.closest('button')) return;
isDragging = true;
offsetX = e.clientX - player.getBoundingClientRect().left;
offsetY = e.clientY - player.getBoundingClientRect().top;
player.style.cursor = 'grabbing';
});
document.addEventListener('mousemove', (e) => {
if (!isDragging) return;
player.style.left = `${e.clientX - offsetX}px`;
player.style.top = `${e.clientY - offsetY}px`;
});
document.addEventListener('mouseup', () => {
isDragging = false;
player.style.cursor = 'grab';
});
// Modal functionality
const searchBtn = document.getElementById('search-btn');
const searchModal = document.getElementById('search-modal');
const backBtn = document.getElementById('back-btn');
searchBtn.addEventListener('click', () => {
searchModal.classList.remove('hidden');
// Here you would fetch search results and populate the search grid
});
backBtn.addEventListener('click', () => {
searchModal.classList.add('hidden');
});
// Zoom functionality
const zoomIn = document.getElementById('zoom-in');
const zoomOut = document.getElementById('zoom-out');
const playlistGrid = document.getElementById('playlist-grid');
let zoomLevel = 5; // Default to 5 columns
zoomIn.addEventListener('click', () => {
if (zoomLevel < 8) {
zoomLevel++;
updateGridColumns();
}
});
zoomOut.addEventListener('click', () => {
if (zoomLevel > 2) {
zoomLevel--;
updateGridColumns();
}
});
function updateGridColumns() {
playlistGrid.className = `grid gap-4 grid-cols-${zoomLevel}`;
}
</script>
</body>
</html> |