Spaces:
Running
Running
π³ 13/04 - 18:17 - Transform the platform into a full music discovery and artist ecosystem with clear user flows: Upload β Profile β Discovery β Engagement.1. CORE APP STRUCTUREBuild the app with 4 ma
Browse files- analytics.html +2 -1
- app.js +324 -0
- artist.html +2 -1
- discover.html +2 -1
- index.html +182 -1090
- library.html +2 -1
- profile.html +257 -0
- responsive.css +24 -0
- search.html +264 -0
- track.html +2 -1
- upload.html +1 -400
analytics.html
CHANGED
|
@@ -363,8 +363,9 @@
|
|
| 363 |
|
| 364 |
</div>
|
| 365 |
|
| 366 |
-
<script src="
|
| 367 |
<script>
|
|
|
|
| 368 |
lucide.createIcons();
|
| 369 |
|
| 370 |
// Generate chart bars on load
|
|
|
|
| 363 |
|
| 364 |
</div>
|
| 365 |
|
| 366 |
+
<script src="app.js"></script>
|
| 367 |
<script>
|
| 368 |
+
BF.init('home');
|
| 369 |
lucide.createIcons();
|
| 370 |
|
| 371 |
// Generate chart bars on load
|
app.js
ADDED
|
@@ -0,0 +1,324 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// BeatFridge - Core Application Logic
|
| 2 |
+
const BF = (() => {
|
| 3 |
+
// ===== DEFAULT DATA =====
|
| 4 |
+
const defaultTracks = [
|
| 5 |
+
{ id: 1, title: "Neon Horizons", artist: "Aurora Void", artistId: "aurora-void", duration: "4:32", image: "http://static.photos/technology/400x400/1", plays: "12.5K", genre: "techno", date: "2 days ago" },
|
| 6 |
+
{ id: 2, title: "Digital Rain", artist: "Aurora Void", artistId: "aurora-void", duration: "3:45", image: "http://static.photos/technology/400x400/2", plays: "8.2K", genre: "ambient", date: "5 days ago" },
|
| 7 |
+
{ id: 3, title: "Cybernetic Dreams", artist: "Aurora Void", artistId: "aurora-void", duration: "5:18", image: "http://static.photos/technology/400x400/3", plays: "24.1K", genre: "techno", date: "1 week ago" },
|
| 8 |
+
{ id: 4, title: "Analog Heart", artist: "Aurora Void", artistId: "aurora-void", duration: "3:22", image: "http://static.photos/technology/400x400/4", plays: "15.3K", genre: "synthwave", date: "2 weeks ago" },
|
| 9 |
+
{ id: 5, title: "Midnight Synthesis", artist: "Aurora Void", artistId: "aurora-void", duration: "4:08", image: "http://static.photos/technology/400x400/5", plays: "32.7K", genre: "techno", date: "3 weeks ago" },
|
| 10 |
+
{ id: 6, title: "Void Walker", artist: "Aurora Void", artistId: "aurora-void", duration: "6:14", image: "http://static.photos/technology/400x400/6", plays: "9.8K", genre: "ambient", date: "1 month ago" },
|
| 11 |
+
{ id: 7, title: "Electric Soul", artist: "Neon Prophet", artistId: "neon-prophet", duration: "3:55", image: "http://static.photos/technology/400x400/7", plays: "18.4K", genre: "house", date: "3 days ago" },
|
| 12 |
+
{ id: 8, title: "Digital Horizon", artist: "Cyber Dreamer", artistId: "cyber-dreamer", duration: "4:15", image: "http://static.photos/technology/400x400/8", plays: "11.2K", genre: "synthwave", date: "1 week ago" },
|
| 13 |
+
{ id: 9, title: "Deep Pulse", artist: "Deep Frequencies", artistId: "deep-freq", duration: "6:18", image: "http://static.photos/technology/400x400/9", plays: "7.6K", genre: "techno", date: "4 days ago" },
|
| 14 |
+
{ id: 10, title: "Neon City", artist: "Neon Prophet", artistId: "neon-prophet", duration: "4:22", image: "http://static.photos/technology/400x400/10", plays: "14.1K", genre: "synthwave", date: "6 days ago" },
|
| 15 |
+
{ id: 11, title: "Binary Sunset", artist: "Synth Wanderer", artistId: "synth-wanderer", duration: "5:02", image: "http://static.photos/technology/400x400/11", plays: "6.3K", genre: "ambient", date: "2 weeks ago" },
|
| 16 |
+
{ id: 12, title: "Crystal Waves", artist: "Cyber Dreamer", artistId: "cyber-dreamer", duration: "3:38", image: "http://static.photos/technology/400x400/12", plays: "19.7K", genre: "house", date: "1 day ago" }
|
| 17 |
+
];
|
| 18 |
+
|
| 19 |
+
const defaultArtists = [
|
| 20 |
+
{ id: "aurora-void", name: "Aurora Void", followers: "128.5K", image: "http://static.photos/people/200x200/77", genre: "Electronic", verified: true },
|
| 21 |
+
{ id: "neon-prophet", name: "Neon Prophet", followers: "45.2K", image: "http://static.photos/people/200x200/10", genre: "Techno", verified: false },
|
| 22 |
+
{ id: "cyber-dreamer", name: "Cyber Dreamer", followers: "32.8K", image: "http://static.photos/people/200x200/11", genre: "Synthwave", verified: false },
|
| 23 |
+
{ id: "synth-wanderer", name: "Synth Wanderer", followers: "28.1K", image: "http://static.photos/people/200x200/12", genre: "Ambient", verified: false },
|
| 24 |
+
{ id: "deep-freq", name: "Deep Frequencies", followers: "15.7K", image: "http://static.photos/people/200x200/13", genre: "Techno", verified: false },
|
| 25 |
+
{ id: "bass-architect", name: "Bass Architect", followers: "22.4K", image: "http://static.photos/people/200x200/14", genre: "Drum & Bass", verified: true }
|
| 26 |
+
];
|
| 27 |
+
|
| 28 |
+
const genres = [
|
| 29 |
+
{ name: "Techno", icon: "waves", color: "cyan" },
|
| 30 |
+
{ name: "Ambient", icon: "cloud", color: "purple" },
|
| 31 |
+
{ name: "House", icon: "flame", color: "orange" },
|
| 32 |
+
{ name: "Synthwave", icon: "zap", color: "pink" },
|
| 33 |
+
{ name: "Lo-Fi", icon: "leaf", color: "green" },
|
| 34 |
+
{ name: "Drum & Bass", icon: "activity", color: "red" }
|
| 35 |
+
];
|
| 36 |
+
|
| 37 |
+
// ===== AUTH =====
|
| 38 |
+
const isLoggedIn = () => localStorage.getItem('isLoggedIn') === 'true';
|
| 39 |
+
|
| 40 |
+
const getCurrentUser = () => {
|
| 41 |
+
try {
|
| 42 |
+
return JSON.parse(localStorage.getItem('beatfridge_current_user')) || null;
|
| 43 |
+
} catch { return null; }
|
| 44 |
+
};
|
| 45 |
+
|
| 46 |
+
const signIn = (identifier, password) => {
|
| 47 |
+
try {
|
| 48 |
+
const users = JSON.parse(localStorage.getItem('beatfridge_users') || '[]');
|
| 49 |
+
const user = users.find(u => (u.username === identifier || u.email === identifier) && u.password === password);
|
| 50 |
+
if (user) {
|
| 51 |
+
localStorage.setItem('beatfridge_current_user', JSON.stringify(user));
|
| 52 |
+
localStorage.setItem('isLoggedIn', 'true');
|
| 53 |
+
localStorage.setItem('currentUserId', user.id);
|
| 54 |
+
return { success: true, user };
|
| 55 |
+
}
|
| 56 |
+
return { success: false, error: 'Invalid username or password' };
|
| 57 |
+
} catch {
|
| 58 |
+
return { success: false, error: 'Sign in failed' };
|
| 59 |
+
}
|
| 60 |
+
};
|
| 61 |
+
|
| 62 |
+
const signOut = () => {
|
| 63 |
+
localStorage.removeItem('beatfridge_current_user');
|
| 64 |
+
localStorage.removeItem('isLoggedIn');
|
| 65 |
+
localStorage.removeItem('currentUserId');
|
| 66 |
+
window.location.href = 'index.html';
|
| 67 |
+
};
|
| 68 |
+
|
| 69 |
+
// ===== TRACKS =====
|
| 70 |
+
const getAllTracks = () => {
|
| 71 |
+
try {
|
| 72 |
+
const userTracks = JSON.parse(localStorage.getItem('userTracks') || '[]');
|
| 73 |
+
const bfTracks = JSON.parse(localStorage.getItem('beatfridge_tracks') || '[]');
|
| 74 |
+
const seen = new Set();
|
| 75 |
+
const all = [...defaultTracks, ...userTracks, ...bfTracks];
|
| 76 |
+
return all.filter(t => {
|
| 77 |
+
if (seen.has(t.id)) return false;
|
| 78 |
+
seen.add(t.id);
|
| 79 |
+
return true;
|
| 80 |
+
});
|
| 81 |
+
} catch { return [...defaultTracks]; }
|
| 82 |
+
};
|
| 83 |
+
|
| 84 |
+
const getArtists = () => {
|
| 85 |
+
try {
|
| 86 |
+
const user = getCurrentUser();
|
| 87 |
+
if (user) {
|
| 88 |
+
const exists = defaultArtists.find(a => a.id === user.id);
|
| 89 |
+
if (!exists) {
|
| 90 |
+
return [{ id: user.id, name: user.displayName || user.username, followers: "0", image: user.avatar || `http://static.photos/people/200x200/${Math.floor(Math.random()*100)}`, genre: "Electronic", verified: false, isUser: true }, ...defaultArtists];
|
| 91 |
+
}
|
| 92 |
+
}
|
| 93 |
+
} catch {}
|
| 94 |
+
return [...defaultArtists];
|
| 95 |
+
};
|
| 96 |
+
|
| 97 |
+
const getGenres = () => [...genres];
|
| 98 |
+
|
| 99 |
+
const getTrendingTracks = () => {
|
| 100 |
+
return getAllTracks().sort((a, b) => {
|
| 101 |
+
const parsePlays = s => { const n = parseFloat(s); return s.includes('K') ? n * 1000 : n; };
|
| 102 |
+
return parsePlays(b.plays) - parsePlays(a.plays);
|
| 103 |
+
});
|
| 104 |
+
};
|
| 105 |
+
|
| 106 |
+
const getFreshUploads = () => {
|
| 107 |
+
return getAllTracks().filter(t => t.date && (t.date.includes('day') || t.date.includes('hour') || t.date.includes('Just') || t.date.includes('minute')));
|
| 108 |
+
};
|
| 109 |
+
|
| 110 |
+
const searchTracks = (query) => {
|
| 111 |
+
const q = query.toLowerCase().trim();
|
| 112 |
+
if (!q) return [];
|
| 113 |
+
return getAllTracks().filter(t => t.title.toLowerCase().includes(q) || t.artist.toLowerCase().includes(q) || (t.genre && t.genre.toLowerCase().includes(q)));
|
| 114 |
+
};
|
| 115 |
+
|
| 116 |
+
const searchArtists = (query) => {
|
| 117 |
+
const q = query.toLowerCase().trim();
|
| 118 |
+
if (!q) return [];
|
| 119 |
+
return getArtists().filter(a => a.name.toLowerCase().includes(q) || (a.genre && a.genre.toLowerCase().includes(q)));
|
| 120 |
+
};
|
| 121 |
+
|
| 122 |
+
// ===== UI: STYLES =====
|
| 123 |
+
const injectStyles = () => {
|
| 124 |
+
if (document.getElementById('bf-app-styles')) return;
|
| 125 |
+
const style = document.createElement('style');
|
| 126 |
+
style.id = 'bf-app-styles';
|
| 127 |
+
style.textContent = `
|
| 128 |
+
.bottom-tab-bar {
|
| 129 |
+
position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
|
| 130 |
+
display: flex; align-items: center; justify-content: space-around;
|
| 131 |
+
height: 56px; background: rgba(15,15,15,0.95); backdrop-filter: blur(12px);
|
| 132 |
+
-webkit-backdrop-filter: blur(12px); border-top: 1px solid rgba(255,255,255,0.08);
|
| 133 |
+
padding: 0 8px; padding-bottom: env(safe-area-inset-bottom, 0px);
|
| 134 |
+
}
|
| 135 |
+
.bottom-tab {
|
| 136 |
+
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
| 137 |
+
flex: 1; height: 100%; text-decoration: none; color: #6b7280;
|
| 138 |
+
transition: color 0.2s; font-size: 10px; gap: 2px; position: relative;
|
| 139 |
+
}
|
| 140 |
+
.bottom-tab i, .bottom-tab svg { width: 20px; height: 20px; }
|
| 141 |
+
.bottom-tab.active { color: #00d4ff; }
|
| 142 |
+
.bottom-tab:hover { color: #9ca3af; }
|
| 143 |
+
.bottom-tab.active:hover { color: #00d4ff; }
|
| 144 |
+
.bottom-tab-center {
|
| 145 |
+
position: relative; top: -10px;
|
| 146 |
+
background: linear-gradient(135deg, #00d4ff, #7c3aed);
|
| 147 |
+
border-radius: 50%; width: 48px; height: 48px; flex: none;
|
| 148 |
+
display: flex; align-items: center; justify-content: center;
|
| 149 |
+
box-shadow: 0 0 20px rgba(0,212,255,0.3); margin: 0 4px;
|
| 150 |
+
}
|
| 151 |
+
.bottom-tab-center i, .bottom-tab-center svg { width: 24px; height: 24px; color: #000; }
|
| 152 |
+
.bottom-tab-center span { display: none; }
|
| 153 |
+
.bottom-tab-center.active { box-shadow: 0 0 30px rgba(0,212,255,0.5); }
|
| 154 |
+
@media (min-width: 768px) {
|
| 155 |
+
.bottom-tab-bar { display: none; }
|
| 156 |
+
}
|
| 157 |
+
.bf-signin-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); z-index: 70; }
|
| 158 |
+
.bf-signin-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 71; width: 100%; max-width: 420px; padding: 0 1rem; }
|
| 159 |
+
.bf-signin-card { background: #111; border: 1px solid rgba(255,255,255,0.1); border-radius: 1rem; padding: 1.5rem; }
|
| 160 |
+
.bf-content-shift { padding-bottom: 0 !important; }
|
| 161 |
+
@media (max-width: 767px) {
|
| 162 |
+
.sticky-player { bottom: 56px !important; }
|
| 163 |
+
body { padding-bottom: 120px !important; }
|
| 164 |
+
}
|
| 165 |
+
`;
|
| 166 |
+
document.head.appendChild(style);
|
| 167 |
+
};
|
| 168 |
+
|
| 169 |
+
// ===== UI: BOTTOM NAV =====
|
| 170 |
+
const injectBottomNav = (activeTab) => {
|
| 171 |
+
if (document.getElementById('bottomTabBar')) return;
|
| 172 |
+
const loggedIn = isLoggedIn();
|
| 173 |
+
const tabs = [
|
| 174 |
+
{ id: 'home', icon: 'home', label: 'Home', href: 'index.html' },
|
| 175 |
+
{ id: 'search', icon: 'search', label: 'Search', href: 'search.html' },
|
| 176 |
+
{ id: 'upload', icon: 'plus', label: 'Upload', href: 'upload.html', center: true },
|
| 177 |
+
{ id: loggedIn ? 'profile' : 'signin', icon: loggedIn ? 'user' : 'log-in', label: loggedIn ? 'Profile' : 'Sign In', href: loggedIn ? 'profile.html' : '#' }
|
| 178 |
+
];
|
| 179 |
+
|
| 180 |
+
const nav = document.createElement('nav');
|
| 181 |
+
nav.className = 'bottom-tab-bar';
|
| 182 |
+
nav.id = 'bottomTabBar';
|
| 183 |
+
nav.innerHTML = tabs.map(tab => {
|
| 184 |
+
const isActive = activeTab === tab.id;
|
| 185 |
+
const isCenter = tab.center;
|
| 186 |
+
return `<a href="${tab.href}" class="bottom-tab${isCenter ? ' bottom-tab-center' : ''}${isActive ? ' active' : ''}" ${!loggedIn && tab.id === 'signin' ? 'onclick="BF.showSignInModal(); return false;"' : ''}>
|
| 187 |
+
<i data-lucide="${tab.icon}"></i><span>${tab.label}</span>
|
| 188 |
+
</a>`;
|
| 189 |
+
}).join('');
|
| 190 |
+
|
| 191 |
+
document.body.appendChild(nav);
|
| 192 |
+
};
|
| 193 |
+
|
| 194 |
+
// ===== UI: SIGN IN MODAL =====
|
| 195 |
+
const showSignInModal = () => {
|
| 196 |
+
if (document.getElementById('bfSignInModal')) return;
|
| 197 |
+
const modal = document.createElement('div');
|
| 198 |
+
modal.id = 'bfSignInModal';
|
| 199 |
+
modal.innerHTML = `
|
| 200 |
+
<div class="bf-signin-overlay" onclick="BF.closeSignInModal()"></div>
|
| 201 |
+
<div class="bf-signin-modal">
|
| 202 |
+
<div class="bf-signin-card">
|
| 203 |
+
<div class="flex items-center justify-between mb-6">
|
| 204 |
+
<h3 class="text-xl font-bold text-white">Sign In to BeatFridge</h3>
|
| 205 |
+
<button onclick="BF.closeSignInModal()" class="text-gray-400 hover:text-white transition"><i data-lucide="x" class="w-6 h-6"></i></button>
|
| 206 |
+
</div>
|
| 207 |
+
<div class="space-y-4">
|
| 208 |
+
<div>
|
| 209 |
+
<label class="block text-xs font-medium text-gray-500 uppercase tracking-wider mb-2">Username or Email</label>
|
| 210 |
+
<input type="text" id="bfSigninId" placeholder="Enter username or email" class="w-full bg-white/5 border border-white/10 rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-cyan-500/50 text-white">
|
| 211 |
+
</div>
|
| 212 |
+
<div>
|
| 213 |
+
<label class="block text-xs font-medium text-gray-500 uppercase tracking-wider mb-2">Password</label>
|
| 214 |
+
<input type="password" id="bfSigninPw" placeholder="Enter password" class="w-full bg-white/5 border border-white/10 rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-cyan-500/50 text-white" onkeydown="if(event.key==='Enter')BF.handleSignIn()">
|
| 215 |
+
</div>
|
| 216 |
+
<div id="bfSigninError" class="hidden text-red-400 text-sm"></div>
|
| 217 |
+
<button onclick="BF.handleSignIn()" class="w-full py-3 bg-cyan-500 hover:bg-cyan-400 text-black font-semibold rounded-xl transition">Sign In</button>
|
| 218 |
+
<p class="text-sm text-gray-500 text-center">No account? <a href="upload.html" class="text-cyan-400 hover:underline">Sign up when uploading a track</a></p>
|
| 219 |
+
</div>
|
| 220 |
+
</div>
|
| 221 |
+
</div>
|
| 222 |
+
`;
|
| 223 |
+
document.body.appendChild(modal);
|
| 224 |
+
if (window.lucide) lucide.createIcons();
|
| 225 |
+
document.getElementById('bfSigninId')?.focus();
|
| 226 |
+
};
|
| 227 |
+
|
| 228 |
+
const closeSignInModal = () => {
|
| 229 |
+
document.getElementById('bfSignInModal')?.remove();
|
| 230 |
+
};
|
| 231 |
+
|
| 232 |
+
const handleSignIn = () => {
|
| 233 |
+
const id = document.getElementById('bfSigninId')?.value.trim();
|
| 234 |
+
const pw = document.getElementById('bfSigninPw')?.value;
|
| 235 |
+
const err = document.getElementById('bfSigninError');
|
| 236 |
+
if (!id || !pw) { err.textContent = 'Please fill in all fields'; err.classList.remove('hidden'); return; }
|
| 237 |
+
const result = signIn(id, pw);
|
| 238 |
+
if (result.success) {
|
| 239 |
+
closeSignInModal();
|
| 240 |
+
showToast('Welcome back, ' + result.user.username + '!');
|
| 241 |
+
setTimeout(() => window.location.reload(), 500);
|
| 242 |
+
} else {
|
| 243 |
+
err.textContent = result.error;
|
| 244 |
+
err.classList.remove('hidden');
|
| 245 |
+
}
|
| 246 |
+
};
|
| 247 |
+
|
| 248 |
+
// ===== UI: TOAST =====
|
| 249 |
+
const showToast = (message) => {
|
| 250 |
+
const toast = document.createElement('div');
|
| 251 |
+
toast.className = 'fixed bottom-24 left-1/2 -translate-x-1/2 bg-cyan-500 text-black px-4 py-2 rounded-full text-sm font-medium z-[80] whitespace-nowrap';
|
| 252 |
+
toast.style.boxShadow = '0 0 20px rgba(0,212,255,0.3)';
|
| 253 |
+
toast.textContent = message;
|
| 254 |
+
document.body.appendChild(toast);
|
| 255 |
+
setTimeout(() => { toast.style.opacity = '0'; toast.style.transition = 'opacity 0.3s'; setTimeout(() => toast.remove(), 300); }, 2500);
|
| 256 |
+
};
|
| 257 |
+
|
| 258 |
+
// ===== PLAYER SYNC =====
|
| 259 |
+
const syncPlayer = () => {
|
| 260 |
+
try {
|
| 261 |
+
const track = JSON.parse(localStorage.getItem('currentTrack'));
|
| 262 |
+
const playing = localStorage.getItem('isPlaying') === 'true';
|
| 263 |
+
const t = document.getElementById('playerTitle');
|
| 264 |
+
const a = document.getElementById('playerArtist');
|
| 265 |
+
const i = document.getElementById('playerArt');
|
| 266 |
+
const p = document.getElementById('playIcon');
|
| 267 |
+
if (track && t) t.textContent = track.title;
|
| 268 |
+
if (track && a) a.textContent = track.artist;
|
| 269 |
+
if (track && i) i.src = track.image;
|
| 270 |
+
if (p) { p.setAttribute('data-lucide', playing ? 'pause' : 'play'); if (window.lucide) lucide.createIcons(); }
|
| 271 |
+
} catch {}
|
| 272 |
+
};
|
| 273 |
+
|
| 274 |
+
// ===== PLAYER CONTROLS =====
|
| 275 |
+
const playTrack = (track) => {
|
| 276 |
+
localStorage.setItem('currentTrack', JSON.stringify(track));
|
| 277 |
+
localStorage.setItem('isPlaying', 'true');
|
| 278 |
+
syncPlayer();
|
| 279 |
+
// Add to recently played
|
| 280 |
+
try {
|
| 281 |
+
let rp = JSON.parse(localStorage.getItem('recentlyPlayed') || '[]');
|
| 282 |
+
rp = rp.filter(t => t.id !== track.id);
|
| 283 |
+
rp.unshift({ ...track, playedAt: new Date().toISOString() });
|
| 284 |
+
if (rp.length > 50) rp.pop();
|
| 285 |
+
localStorage.setItem('recentlyPlayed', JSON.stringify(rp));
|
| 286 |
+
} catch {}
|
| 287 |
+
};
|
| 288 |
+
|
| 289 |
+
const togglePlay = () => {
|
| 290 |
+
const current = localStorage.getItem('isPlaying') === 'true';
|
| 291 |
+
localStorage.setItem('isPlaying', current ? 'false' : 'true');
|
| 292 |
+
syncPlayer();
|
| 293 |
+
};
|
| 294 |
+
|
| 295 |
+
// ===== TOP NAV AUTH UPDATE =====
|
| 296 |
+
const updateTopNav = () => {
|
| 297 |
+
const user = getCurrentUser();
|
| 298 |
+
const avatarEl = document.getElementById('topNavAvatar');
|
| 299 |
+
if (avatarEl && user) {
|
| 300 |
+
avatarEl.src = user.avatar || `http://static.photos/people/200x200/42`;
|
| 301 |
+
avatarEl.onclick = () => { window.location.href = 'profile.html'; };
|
| 302 |
+
}
|
| 303 |
+
};
|
| 304 |
+
|
| 305 |
+
// ===== INIT =====
|
| 306 |
+
const init = (activeTab) => {
|
| 307 |
+
injectStyles();
|
| 308 |
+
injectBottomNav(activeTab);
|
| 309 |
+
syncPlayer();
|
| 310 |
+
updateTopNav();
|
| 311 |
+
if (window.lucide) lucide.createIcons();
|
| 312 |
+
|
| 313 |
+
// Re-sync player every 2 seconds
|
| 314 |
+
setInterval(syncPlayer, 2000);
|
| 315 |
+
};
|
| 316 |
+
|
| 317 |
+
return {
|
| 318 |
+
isLoggedIn, getCurrentUser, signIn, signOut,
|
| 319 |
+
getAllTracks, getArtists, getGenres, getTrendingTracks, getFreshUploads,
|
| 320 |
+
searchTracks, searchArtists,
|
| 321 |
+
init, showSignInModal, closeSignInModal, handleSignIn,
|
| 322 |
+
showToast, syncPlayer, playTrack, togglePlay
|
| 323 |
+
};
|
| 324 |
+
})();
|
artist.html
CHANGED
|
@@ -584,8 +584,9 @@
|
|
| 584 |
</div>
|
| 585 |
</div>
|
| 586 |
|
| 587 |
-
<script src="
|
| 588 |
<script>
|
|
|
|
| 589 |
lucide.createIcons();
|
| 590 |
|
| 591 |
const tracks = [
|
|
|
|
| 584 |
</div>
|
| 585 |
</div>
|
| 586 |
|
| 587 |
+
<script src="app.js"></script>
|
| 588 |
<script>
|
| 589 |
+
BF.init('home');
|
| 590 |
lucide.createIcons();
|
| 591 |
|
| 592 |
const tracks = [
|
discover.html
CHANGED
|
@@ -348,8 +348,9 @@
|
|
| 348 |
</div>
|
| 349 |
</div>
|
| 350 |
|
| 351 |
-
<script src="
|
| 352 |
<script>
|
|
|
|
| 353 |
lucide.createIcons();
|
| 354 |
|
| 355 |
// Sample tracks data
|
|
|
|
| 348 |
</div>
|
| 349 |
</div>
|
| 350 |
|
| 351 |
+
<script src="app.js"></script>
|
| 352 |
<script>
|
| 353 |
+
BF.init('search');
|
| 354 |
lucide.createIcons();
|
| 355 |
|
| 356 |
// Sample tracks data
|
index.html
CHANGED
|
@@ -3,1152 +3,244 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>BeatFridge -
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<script src="https://unpkg.com/lucide@latest"></script>
|
| 9 |
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
|
| 10 |
<link rel="stylesheet" href="responsive.css">
|
| 11 |
<style>
|
| 12 |
-
* {
|
| 13 |
-
|
| 14 |
-
}
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
}
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
}
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
}
|
| 29 |
-
::-
|
| 30 |
-
|
| 31 |
-
border-radius: 4px;
|
| 32 |
-
}
|
| 33 |
-
::-webkit-scrollbar-thumb:hover {
|
| 34 |
-
background: #3d3d3d;
|
| 35 |
-
}
|
| 36 |
-
|
| 37 |
-
/* Glassmorphism */
|
| 38 |
-
.glass {
|
| 39 |
-
background: rgba(20, 20, 20, 0.6);
|
| 40 |
-
backdrop-filter: blur(12px);
|
| 41 |
-
-webkit-backdrop-filter: blur(12px);
|
| 42 |
-
border: 1px solid rgba(255, 255, 255, 0.08);
|
| 43 |
-
}
|
| 44 |
-
|
| 45 |
-
.glass-panel {
|
| 46 |
-
background: rgba(30, 30, 30, 0.4);
|
| 47 |
-
backdrop-filter: blur(16px);
|
| 48 |
-
-webkit-backdrop-filter: blur(16px);
|
| 49 |
-
border: 1px solid rgba(255, 255, 255, 0.05);
|
| 50 |
-
}
|
| 51 |
-
|
| 52 |
-
/* Neon Gradients */
|
| 53 |
-
.neon-gradient {
|
| 54 |
-
background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 50%, #f97316 100%);
|
| 55 |
-
}
|
| 56 |
-
|
| 57 |
-
.neon-text {
|
| 58 |
-
background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
|
| 59 |
-
-webkit-background-clip: text;
|
| 60 |
-
-webkit-text-fill-color: transparent;
|
| 61 |
-
background-clip: text;
|
| 62 |
-
}
|
| 63 |
-
|
| 64 |
-
/* Waveform Animation */
|
| 65 |
-
.waveform-bar {
|
| 66 |
-
animation: wave 1.2s ease-in-out infinite;
|
| 67 |
-
}
|
| 68 |
-
|
| 69 |
-
@keyframes wave {
|
| 70 |
-
0%, 100% { height: 20%; }
|
| 71 |
-
50% { height: 100%; }
|
| 72 |
-
}
|
| 73 |
-
|
| 74 |
-
.waveform-bar:nth-child(1) { animation-delay: 0s; }
|
| 75 |
-
.waveform-bar:nth-child(2) { animation-delay: 0.1s; }
|
| 76 |
-
.waveform-bar:nth-child(3) { animation-delay: 0.2s; }
|
| 77 |
-
.waveform-bar:nth-child(4) { animation-delay: 0.3s; }
|
| 78 |
-
.waveform-bar:nth-child(5) { animation-delay: 0.4s; }
|
| 79 |
-
|
| 80 |
-
/* Hover Effects */
|
| 81 |
-
.track-card {
|
| 82 |
-
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
| 83 |
-
}
|
| 84 |
-
.track-card:hover {
|
| 85 |
-
transform: translateY(-4px);
|
| 86 |
-
box-shadow: 0 20px 40px -10px rgba(0, 212, 255, 0.15);
|
| 87 |
-
}
|
| 88 |
-
|
| 89 |
-
.play-btn-overlay {
|
| 90 |
-
opacity: 0;
|
| 91 |
-
transition: all 0.3s ease;
|
| 92 |
-
}
|
| 93 |
-
.track-card:hover .play-btn-overlay {
|
| 94 |
-
opacity: 1;
|
| 95 |
-
}
|
| 96 |
-
|
| 97 |
-
/* Progress Bar Waveform */
|
| 98 |
-
.progress-wave {
|
| 99 |
-
background: linear-gradient(90deg, #333 0%, #333 100%);
|
| 100 |
-
position: relative;
|
| 101 |
-
overflow: hidden;
|
| 102 |
-
}
|
| 103 |
-
.progress-wave::before {
|
| 104 |
-
content: '';
|
| 105 |
-
position: absolute;
|
| 106 |
-
left: 0;
|
| 107 |
-
top: 0;
|
| 108 |
-
height: 100%;
|
| 109 |
-
width: var(--progress, 30%);
|
| 110 |
-
background: linear-gradient(90deg, #00d4ff, #7c3aed);
|
| 111 |
-
transition: width 0.1s linear;
|
| 112 |
-
}
|
| 113 |
-
|
| 114 |
-
/* Glow Effects */
|
| 115 |
-
.glow-cyan {
|
| 116 |
-
box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
|
| 117 |
-
}
|
| 118 |
-
.glow-orange {
|
| 119 |
-
box-shadow: 0 0 20px rgba(249, 115, 22, 0.3);
|
| 120 |
-
}
|
| 121 |
-
|
| 122 |
-
/* Sticky Player */
|
| 123 |
-
.sticky-player {
|
| 124 |
-
position: fixed;
|
| 125 |
-
bottom: 0;
|
| 126 |
-
left: 0;
|
| 127 |
-
right: 0;
|
| 128 |
-
z-index: 50;
|
| 129 |
-
}
|
| 130 |
-
|
| 131 |
-
/* Banner Gradient */
|
| 132 |
-
.banner-gradient {
|
| 133 |
-
background: linear-gradient(135deg, rgba(0, 212, 255, 0.8) 0%, rgba(124, 58, 237, 0.8) 50%, rgba(249, 115, 22, 0.6) 100%);
|
| 134 |
-
mix-blend-mode: multiply;
|
| 135 |
-
}
|
| 136 |
-
|
| 137 |
-
/* Avatar Ring */
|
| 138 |
-
.avatar-ring {
|
| 139 |
-
box-shadow: 0 0 0 4px #0a0a0a, 0 0 0 6px rgba(0, 212, 255, 0.5);
|
| 140 |
-
}
|
| 141 |
-
|
| 142 |
-
.premium-glow {
|
| 143 |
-
box-shadow: 0 0 30px rgba(249, 115, 22, 0.4), 0 0 60px rgba(249, 115, 22, 0.2);
|
| 144 |
-
}
|
| 145 |
-
|
| 146 |
-
.exclusive-badge {
|
| 147 |
-
background: linear-gradient(135deg, #f97316 0%, #dc2626 100%);
|
| 148 |
-
}
|
| 149 |
-
|
| 150 |
-
.locked-overlay {
|
| 151 |
-
background: rgba(0, 0, 0, 0.7);
|
| 152 |
-
backdrop-filter: blur(4px);
|
| 153 |
-
}
|
| 154 |
-
|
| 155 |
-
@keyframes pulse-glow {
|
| 156 |
-
0%, 100% { box-shadow: 0 0 20px rgba(249, 115, 22, 0.4); }
|
| 157 |
-
50% { box-shadow: 0 0 40px rgba(249, 115, 22, 0.6); }
|
| 158 |
-
}
|
| 159 |
-
|
| 160 |
-
.animate-pulse-glow {
|
| 161 |
-
animation: pulse-glow 2s infinite;
|
| 162 |
-
}
|
| 163 |
-
|
| 164 |
-
.glass-panel {
|
| 165 |
-
transition: all 0.3s ease;
|
| 166 |
-
}
|
| 167 |
-
|
| 168 |
-
.glass-panel:hover {
|
| 169 |
-
border-color: rgba(255, 255, 255, 0.15);
|
| 170 |
-
}
|
| 171 |
</style>
|
| 172 |
</head>
|
| 173 |
-
<body class="bg-black text-white overflow-x-hidden
|
| 174 |
|
| 175 |
-
<!-- Navigation -->
|
| 176 |
<nav class="fixed top-0 left-0 right-0 z-40 glass border-b border-white/5">
|
| 177 |
-
<div class="max-w-[1600px] mx-auto px-6 h-
|
| 178 |
-
<
|
| 179 |
-
|
| 180 |
-
<div class="flex items-center gap-2 cursor-pointer hover:opacity-80 transition">
|
| 181 |
<div class="w-8 h-8 rounded-lg flex items-center justify-center bg-white/10 border border-white/20">
|
| 182 |
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-5 h-5 text-white">
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
</
|
| 189 |
-
<
|
| 190 |
-
</div>
|
| 191 |
-
|
| 192 |
-
<!-- Nav Links -->
|
| 193 |
-
<div class="hidden md:flex items-center gap-6 text-sm font-medium text-gray-400">
|
| 194 |
-
<a href="index.html" class="text-cyan-400 transition">Home</a>
|
| 195 |
-
<a href="discover.html" class="hover:text-cyan-400 transition">Discover</a>
|
| 196 |
<a href="library.html" class="hover:text-cyan-400 transition">Library</a>
|
| 197 |
-
<a href="upload.html" class="hover:text-cyan-400 transition flex items-center gap-1">
|
| 198 |
-
<i data-lucide="upload-cloud" class="w-4 h-4"></i>
|
| 199 |
-
Upload
|
| 200 |
-
</a>
|
| 201 |
-
<a href="analytics.html" class="hover:text-orange-400 transition flex items-center gap-1">
|
| 202 |
-
<i data-lucide="bar-chart-2" class="w-4 h-4"></i>
|
| 203 |
-
Analytics
|
| 204 |
-
</a>
|
| 205 |
</div>
|
| 206 |
</div>
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
<input type="text" placeholder="Search artists, tracks..."
|
| 212 |
-
class="w-64 bg-white/5 border border-white/10 rounded-full px-4 py-2 pl-10 text-sm focus:outline-none focus:border-cyan-500/50 focus:bg-white/10 transition">
|
| 213 |
-
<i data-lucide="search" class="w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"></i>
|
| 214 |
-
</div>
|
| 215 |
-
|
| 216 |
-
<button id="mobileMenuBtn" class="md:hidden w-10 h-10 rounded-full bg-white/5 border border-white/10 flex items-center justify-center hover:bg-white/10 transition" onclick="toggleMobileMenu()">
|
| 217 |
-
<i data-lucide="menu" class="w-5 h-5 text-gray-300"></i>
|
| 218 |
-
</button>
|
| 219 |
-
<button class="w-10 h-10 rounded-full bg-white/5 border border-white/10 flex items-center justify-center hover:bg-white/10 transition relative">
|
| 220 |
-
<i data-lucide="bell" class="w-5 h-5 text-gray-300"></i>
|
| 221 |
-
<span class="absolute top-2 right-2 w-2 h-2 bg-orange-500 rounded-full"></span>
|
| 222 |
</button>
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
<img src="http://static.photos/people/200x200/42" alt="Profile" class="w-full h-full rounded-full object-cover">
|
| 226 |
</div>
|
| 227 |
</div>
|
| 228 |
</div>
|
| 229 |
</nav>
|
| 230 |
|
| 231 |
-
<!--
|
| 232 |
-
<
|
| 233 |
-
<!-- Mobile Nav Panel -->
|
| 234 |
-
<div id="mobileNavPanel" class="mobile-nav-panel">
|
| 235 |
-
<div class="flex items-center justify-between mb-8">
|
| 236 |
-
<div class="flex items-center gap-2">
|
| 237 |
-
<div class="w-8 h-8 rounded-lg flex items-center justify-center bg-white/10 border border-white/20">
|
| 238 |
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-5 h-5 text-white">
|
| 239 |
-
<rect x="4" y="2" width="16" height="20" rx="2"/>
|
| 240 |
-
<line x1="4" y1="9" x2="20" y2="9"/>
|
| 241 |
-
<line x1="15" y1="5" x2="15" y2="7"/>
|
| 242 |
-
<line x1="15" y1="12" x2="15" y2="18"/>
|
| 243 |
-
</svg>
|
| 244 |
-
</div>
|
| 245 |
-
<span class="text-xl font-bold">BeatFridge</span>
|
| 246 |
-
</div>
|
| 247 |
-
<button onclick="closeMobileMenu()" class="w-10 h-10 rounded-full bg-white/5 border border-white/10 flex items-center justify-center hover:bg-white/10 transition">
|
| 248 |
-
<i data-lucide="x" class="w-5 h-5"></i>
|
| 249 |
-
</button>
|
| 250 |
-
</div>
|
| 251 |
-
<nav class="space-y-1">
|
| 252 |
-
<a href="index.html" class="flex items-center gap-3 px-4 py-3 rounded-xl bg-white/5 text-cyan-400 font-medium">
|
| 253 |
-
<i data-lucide="home" class="w-5 h-5"></i> Home
|
| 254 |
-
</a>
|
| 255 |
-
<a href="discover.html" class="flex items-center gap-3 px-4 py-3 rounded-xl hover:bg-white/5 transition text-gray-300 hover:text-white">
|
| 256 |
-
<i data-lucide="compass" class="w-5 h-5"></i> Discover
|
| 257 |
-
</a>
|
| 258 |
-
<a href="library.html" class="flex items-center gap-3 px-4 py-3 rounded-xl hover:bg-white/5 transition text-gray-300 hover:text-white">
|
| 259 |
-
<i data-lucide="library" class="w-5 h-5"></i> Library
|
| 260 |
-
</a>
|
| 261 |
-
<a href="upload.html" class="flex items-center gap-3 px-4 py-3 rounded-xl hover:bg-white/5 transition text-gray-300 hover:text-white">
|
| 262 |
-
<i data-lucide="upload-cloud" class="w-5 h-5"></i> Upload
|
| 263 |
-
</a>
|
| 264 |
-
<a href="analytics.html" class="flex items-center gap-3 px-4 py-3 rounded-xl hover:bg-white/5 transition text-gray-300 hover:text-white">
|
| 265 |
-
<i data-lucide="bar-chart-2" class="w-5 h-5"></i> Analytics
|
| 266 |
-
</a>
|
| 267 |
-
</nav>
|
| 268 |
-
</div>
|
| 269 |
-
|
| 270 |
-
<!-- Main Layout -->
|
| 271 |
-
<div class="max-w-[1600px] mx-auto pt-16 flex gap-6 px-6 min-h-screen">
|
| 272 |
|
| 273 |
-
<!--
|
| 274 |
-
<
|
| 275 |
-
<
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
Live Feed
|
| 279 |
-
</h3>
|
| 280 |
-
|
| 281 |
-
<div class="space-y-4">
|
| 282 |
-
<!-- Feed Items -->
|
| 283 |
-
<div class="flex gap-3 group cursor-pointer">
|
| 284 |
-
<div class="w-10 h-10 rounded-lg bg-gradient-to-br from-purple-500 to-pink-500 flex-shrink-0 overflow-hidden">
|
| 285 |
-
<img src="http://static.photos/people/200x200/1" class="w-full h-full object-cover opacity-80 group-hover:opacity-100 transition">
|
| 286 |
-
</div>
|
| 287 |
-
<div class="flex-1 min-w-0">
|
| 288 |
-
<p class="text-sm font-medium text-gray-200 group-hover:text-cyan-400 transition truncate">Sarah Chen</p>
|
| 289 |
-
<p class="text-xs text-gray-500 truncate">liked "Midnight Synth"</p>
|
| 290 |
-
<p class="text-xs text-gray-600 mt-1">2m ago</p>
|
| 291 |
-
</div>
|
| 292 |
-
</div>
|
| 293 |
-
|
| 294 |
-
<div class="flex gap-3 group cursor-pointer">
|
| 295 |
-
<div class="w-10 h-10 rounded-lg bg-gradient-to-br from-cyan-500 to-blue-500 flex-shrink-0 overflow-hidden">
|
| 296 |
-
<img src="http://static.photos/people/200x200/2" class="w-full h-full object-cover opacity-80 group-hover:opacity-100 transition">
|
| 297 |
-
</div>
|
| 298 |
-
<div class="flex-1 min-w-0">
|
| 299 |
-
<p class="text-sm font-medium text-gray-200 group-hover:text-cyan-400 transition truncate">Marcus Vale</p>
|
| 300 |
-
<p class="text-xs text-gray-500 truncate">uploaded new track</p>
|
| 301 |
-
<p class="text-xs text-gray-600 mt-1">15m ago</p>
|
| 302 |
-
</div>
|
| 303 |
-
</div>
|
| 304 |
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
<div class="flex-1 min-w-0">
|
| 310 |
-
<p class="text-sm font-medium text-gray-200 group-hover:text-cyan-400 transition truncate">Luna Ray</p>
|
| 311 |
-
<p class="text-xs text-gray-500 truncate">started following you</p>
|
| 312 |
-
<p class="text-xs text-gray-600 mt-1">1h ago</p>
|
| 313 |
-
</div>
|
| 314 |
-
</div>
|
| 315 |
-
</div>
|
| 316 |
-
</div>
|
| 317 |
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
<span class="px-3 py-1 rounded-full bg-white/5 border border-white/10 text-xs hover:bg-orange-500/20 hover:border-orange-500/50 hover:text-orange-400 transition cursor-pointer">#ambient</span>
|
| 327 |
-
<span class="px-3 py-1 rounded-full bg-white/5 border border-white/10 text-xs hover:bg-pink-500/20 hover:border-pink-500/50 hover:text-pink-400 transition cursor-pointer">#electronic</span>
|
| 328 |
-
<span class="px-3 py-1 rounded-full bg-white/5 border border-white/10 text-xs hover:bg-cyan-500/20 hover:border-cyan-500/50 hover:text-cyan-400 transition cursor-pointer">#lofi</span>
|
| 329 |
-
</div>
|
| 330 |
</div>
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
<
|
| 335 |
-
|
| 336 |
-
<div class="
|
| 337 |
-
<
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
<div class="absolute inset-0 bg-gradient-to-t from-black via-transparent to-transparent"></div>
|
| 342 |
-
</div>
|
| 343 |
-
|
| 344 |
-
<!-- Profile Info -->
|
| 345 |
-
<div class="relative px-6 pb-6 -mt-20 sm:-mt-24">
|
| 346 |
-
<div class="flex flex-col sm:flex-row items-start sm:items-end gap-6">
|
| 347 |
-
<!-- Avatar -->
|
| 348 |
-
<div class="relative">
|
| 349 |
-
<div class="w-32 h-32 sm:w-40 sm:h-40 rounded-full overflow-hidden avatar-ring bg-black">
|
| 350 |
-
<img src="http://static.photos/people/400x400/77" alt="Artist" class="w-full h-full object-cover">
|
| 351 |
-
</div>
|
| 352 |
-
<div class="absolute bottom-2 right-2 w-6 h-6 bg-cyan-400 rounded-full border-4 border-black flex items-center justify-center">
|
| 353 |
-
<i data-lucide="check" class="w-3 h-3 text-black"></i>
|
| 354 |
-
</div>
|
| 355 |
-
</div>
|
| 356 |
-
|
| 357 |
-
<!-- Info -->
|
| 358 |
-
<div class="flex-1 min-w-0 mb-2">
|
| 359 |
-
<div class="flex flex-wrap items-center gap-3 mb-1">
|
| 360 |
-
<h1 class="text-3xl sm:text-4xl font-bold tracking-tight">Aurora Void</h1>
|
| 361 |
-
<span class="px-2 py-0.5 rounded bg-white/10 border border-white/20 text-xs text-gray-300">PRO</span>
|
| 362 |
-
</div>
|
| 363 |
-
<p class="text-gray-400 text-sm mb-2">@auroravoid β’ Electronic Producer β’ Berlin, DE</p>
|
| 364 |
-
|
| 365 |
-
<div class="flex flex-wrap items-center gap-2 md:gap-4 text-sm text-gray-300">
|
| 366 |
-
<span class="flex items-center gap-1">
|
| 367 |
-
<i data-lucide="map-pin" class="w-4 h-4 text-cyan-400"></i>
|
| 368 |
-
Berlin, Germany
|
| 369 |
-
</span>
|
| 370 |
-
<span class="flex items-center gap-1">
|
| 371 |
-
<i data-lucide="link" class="w-4 h-4 text-cyan-400"></i>
|
| 372 |
-
auroravoid.bandcamp.com
|
| 373 |
-
</span>
|
| 374 |
-
</div>
|
| 375 |
-
</div>
|
| 376 |
-
|
| 377 |
-
<!-- Actions -->
|
| 378 |
-
<div class="flex items-center gap-3 mb-2 w-full sm:w-auto">
|
| 379 |
-
<button class="flex-1 sm:flex-none px-6 py-2.5 bg-cyan-500 hover:bg-cyan-400 text-black font-semibold rounded-full transition glow-cyan flex items-center justify-center gap-2" onclick="toggleFollow(this)">
|
| 380 |
-
<i data-lucide="user-plus" class="w-4 h-4"></i>
|
| 381 |
-
<span>Follow</span>
|
| 382 |
-
</button>
|
| 383 |
-
<button class="w-10 h-10 rounded-full bg-white/10 border border-white/20 flex items-center justify-center hover:bg-white/20 transition">
|
| 384 |
-
<i data-lucide="more-horizontal" class="w-5 h-5"></i>
|
| 385 |
-
</button>
|
| 386 |
-
</div>
|
| 387 |
-
</div>
|
| 388 |
-
|
| 389 |
-
<!-- Stats -->
|
| 390 |
-
<div class="flex flex-wrap items-center gap-4 md:gap-8 mt-6 pt-6 border-t border-white/10">
|
| 391 |
-
<div class="text-center sm:text-left">
|
| 392 |
-
<p class="text-2xl font-bold neon-text">247</p>
|
| 393 |
-
<p class="text-xs text-gray-500 uppercase tracking-wider mt-1">Tracks</p>
|
| 394 |
-
</div>
|
| 395 |
-
<div class="text-center sm:text-left">
|
| 396 |
-
<p class="text-2xl font-bold text-white">128.5K</p>
|
| 397 |
-
<p class="text-xs text-gray-500 uppercase tracking-wider mt-1">Followers</p>
|
| 398 |
-
</div>
|
| 399 |
-
<div class="text-center sm:text-left">
|
| 400 |
-
<p class="text-2xl font-bold text-white">842</p>
|
| 401 |
-
<p class="text-xs text-gray-500 uppercase tracking-wider mt-1">Following</p>
|
| 402 |
-
</div>
|
| 403 |
-
<div class="hidden sm:block ml-auto">
|
| 404 |
-
<div class="flex items-center gap-2 text-sm text-gray-400">
|
| 405 |
-
<span>Member since 2019</span>
|
| 406 |
-
<span class="w-1 h-1 rounded-full bg-gray-600"></span>
|
| 407 |
-
<span class="text-cyan-400">Online</span>
|
| 408 |
-
</div>
|
| 409 |
-
</div>
|
| 410 |
-
</div>
|
| 411 |
-
</div>
|
| 412 |
</div>
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
</
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
<button class="px-4 py-2 rounded-full bg-white/5 border border-white/10 text-sm hover:bg-white/10 transition text-gray-400">Popular</button>
|
| 424 |
-
<button class="px-4 py-2 rounded-full bg-white/5 border border-white/10 text-sm hover:bg-white/10 transition text-gray-400">Albums</button>
|
| 425 |
-
</div>
|
| 426 |
-
</div>
|
| 427 |
-
|
| 428 |
-
<!-- Track Grid -->
|
| 429 |
-
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4" id="trackGrid">
|
| 430 |
-
<!-- Tracks will be injected here via JS -->
|
| 431 |
-
</div>
|
| 432 |
</div>
|
| 433 |
-
|
| 434 |
-
|
| 435 |
-
|
| 436 |
-
|
| 437 |
-
|
| 438 |
-
|
| 439 |
-
<
|
| 440 |
-
|
| 441 |
-
|
| 442 |
-
|
| 443 |
-
|
| 444 |
-
</p>
|
| 445 |
-
<div class="flex items-center gap-4 mt-4 pt-4 border-t border-white/10">
|
| 446 |
-
<a href="#" class="text-gray-400 hover:text-white transition"><i data-lucide="instagram" class="w-5 h-5"></i></a>
|
| 447 |
-
<a href="#" class="text-gray-400 hover:text-white transition"><i data-lucide="twitter" class="w-5 h-5"></i></a>
|
| 448 |
-
<a href="#" class="text-gray-400 hover:text-white transition"><i data-lucide="youtube" class="w-5 h-5"></i></a>
|
| 449 |
-
<a href="#" class="text-gray-400 hover:text-white transition"><i data-lucide="globe" class="w-5 h-5"></i></a>
|
| 450 |
-
</div>
|
| 451 |
</div>
|
|
|
|
|
|
|
| 452 |
|
| 453 |
-
|
| 454 |
-
<div class="glass-panel rounded-2xl p-6 mt-6">
|
| 455 |
-
<div class="flex items-center justify-between mb-4">
|
| 456 |
-
<h3 class="text-sm font-semibold text-gray-300 flex items-center gap-2">
|
| 457 |
-
<i data-lucide="crown" class="w-4 h-4 text-orange-400"></i>
|
| 458 |
-
Membership Tiers
|
| 459 |
-
</h3>
|
| 460 |
-
<span class="text-xs text-orange-400 font-medium">3 tiers available</span>
|
| 461 |
-
</div>
|
| 462 |
-
|
| 463 |
-
<div class="space-y-3">
|
| 464 |
-
<!-- Tier 1 -->
|
| 465 |
-
<div class="p-4 rounded-xl bg-white/5 border border-white/10 hover:border-cyan-500/30 transition cursor-pointer group" onclick="selectTier(1)">
|
| 466 |
-
<div class="flex items-center justify-between">
|
| 467 |
-
<div class="flex items-center gap-3">
|
| 468 |
-
<div class="w-10 h-10 rounded-full bg-cyan-500/20 flex items-center justify-center">
|
| 469 |
-
<i data-lucide="coffee" class="w-5 h-5 text-cyan-400"></i>
|
| 470 |
-
</div>
|
| 471 |
-
<div>
|
| 472 |
-
<p class="font-semibold text-white group-hover:text-cyan-400 transition">Supporter</p>
|
| 473 |
-
<p class="text-xs text-gray-500">β¬3/month</p>
|
| 474 |
-
</div>
|
| 475 |
-
</div>
|
| 476 |
-
<span class="text-xs text-gray-400">12 members</span>
|
| 477 |
-
</div>
|
| 478 |
-
<p class="text-xs text-gray-500 mt-2">Early access to new tracks + exclusive WIP previews</p>
|
| 479 |
-
</div>
|
| 480 |
-
|
| 481 |
-
<!-- Tier 2 -->
|
| 482 |
-
<div class="p-4 rounded-xl bg-white/5 border border-orange-500/30 relative overflow-hidden cursor-pointer" onclick="selectTier(2)">
|
| 483 |
-
<div class="absolute top-0 right-0 px-3 py-1 bg-orange-500 text-black text-xs font-bold rounded-bl-lg">POPULAR</div>
|
| 484 |
-
<div class="flex items-center justify-between">
|
| 485 |
-
<div class="flex items-center gap-3">
|
| 486 |
-
<div class="w-10 h-10 rounded-full bg-orange-500/20 flex items-center justify-center">
|
| 487 |
-
<i data-lucide="zap" class="w-5 h-5 text-orange-400"></i>
|
| 488 |
-
</div>
|
| 489 |
-
<div>
|
| 490 |
-
<p class="font-semibold text-white">Producer Circle</p>
|
| 491 |
-
<p class="text-xs text-gray-500">β¬8/month</p>
|
| 492 |
-
</div>
|
| 493 |
-
</div>
|
| 494 |
-
<span class="text-xs text-gray-400">48 members</span>
|
| 495 |
-
</div>
|
| 496 |
-
<p class="text-xs text-gray-500 mt-2">All previous perks + stems & project files + monthly Q&A</p>
|
| 497 |
-
</div>
|
| 498 |
-
|
| 499 |
-
<!-- Tier 3 -->
|
| 500 |
-
<div class="p-4 rounded-xl bg-white/5 border border-white/10 hover:border-purple-500/30 transition cursor-pointer group" onclick="selectTier(3)">
|
| 501 |
-
<div class="flex items-center justify-between">
|
| 502 |
-
<div class="flex items-center gap-3">
|
| 503 |
-
<div class="w-10 h-10 rounded-full bg-purple-500/20 flex items-center justify-center">
|
| 504 |
-
<i data-lucide="crown" class="w-5 h-5 text-purple-400"></i>
|
| 505 |
-
</div>
|
| 506 |
-
<div>
|
| 507 |
-
<p class="font-semibold text-white group-hover:text-purple-400 transition">VIP Patron</p>
|
| 508 |
-
<p class="text-xs text-gray-500">β¬15/month</p>
|
| 509 |
-
</div>
|
| 510 |
-
</div>
|
| 511 |
-
<span class="text-xs text-gray-400">8 members</span>
|
| 512 |
-
</div>
|
| 513 |
-
<p class="text-xs text-gray-500 mt-2">All perks + 1-on-1 monthly coaching + name in track credits</p>
|
| 514 |
-
</div>
|
| 515 |
-
</div>
|
| 516 |
-
|
| 517 |
-
<button class="w-full mt-4 py-3 rounded-xl bg-gradient-to-r from-orange-500 to-red-500 text-white font-semibold hover:from-orange-400 hover:to-red-400 transition glow-orange flex items-center justify-center gap-2" onclick="openSupportModal()">
|
| 518 |
-
<i data-lucide="sparkles" class="w-4 h-4"></i>
|
| 519 |
-
Subscribe to Support
|
| 520 |
-
</button>
|
| 521 |
-
</div>
|
| 522 |
-
</main>
|
| 523 |
-
|
| 524 |
-
<!-- Right Sidebar -->
|
| 525 |
-
<aside class="hidden xl:block w-72 sticky top-20 h-[calc(100vh-6rem)] overflow-y-auto pl-2">
|
| 526 |
-
<!-- Fans Also Like -->
|
| 527 |
-
<div class="glass-panel rounded-2xl p-4 mb-4">
|
| 528 |
-
<h3 class="text-xs font-semibold text-gray-400 uppercase tracking-wider mb-4 flex items-center gap-2">
|
| 529 |
-
<i data-lucide="users" class="w-4 h-4"></i>
|
| 530 |
-
Fans Also Like
|
| 531 |
-
</h3>
|
| 532 |
-
|
| 533 |
-
<div class="space-y-3">
|
| 534 |
-
<div class="flex items-center gap-3 group cursor-pointer p-2 -mx-2 rounded-xl hover:bg-white/5 transition">
|
| 535 |
-
<div class="w-12 h-12 rounded-full overflow-hidden">
|
| 536 |
-
<img src="http://static.photos/people/200x200/10" class="w-full h-full object-cover">
|
| 537 |
-
</div>
|
| 538 |
-
<div class="flex-1 min-w-0">
|
| 539 |
-
<p class="text-sm font-medium text-gray-200 group-hover:text-cyan-400 transition truncate">Neon Prophet</p>
|
| 540 |
-
<p class="text-xs text-gray-500 truncate">45.2K followers</p>
|
| 541 |
-
</div>
|
| 542 |
-
<button class="w-8 h-8 rounded-full bg-white/5 flex items-center justify-center hover:bg-cyan-500/20 hover:text-cyan-400 transition">
|
| 543 |
-
<i data-lucide="plus" class="w-4 h-4"></i>
|
| 544 |
-
</button>
|
| 545 |
-
</div>
|
| 546 |
-
|
| 547 |
-
<div class="flex items-center gap-3 group cursor-pointer p-2 -mx-2 rounded-xl hover:bg-white/5 transition">
|
| 548 |
-
<div class="w-12 h-12 rounded-full overflow-hidden">
|
| 549 |
-
<img src="http://static.photos/people/200x200/11" class="w-full h-full object-cover">
|
| 550 |
-
</div>
|
| 551 |
-
<div class="flex-1 min-w-0">
|
| 552 |
-
<p class="text-sm font-medium text-gray-200 group-hover:text-cyan-400 transition truncate">Cyber Dreamer</p>
|
| 553 |
-
<p class="text-xs text-gray-500 truncate">32.8K followers</p>
|
| 554 |
-
</div>
|
| 555 |
-
<button class="w-8 h-8 rounded-full bg-white/5 flex items-center justify-center hover:bg-cyan-500/20 hover:text-cyan-400 transition">
|
| 556 |
-
<i data-lucide="plus" class="w-4 h-4"></i>
|
| 557 |
-
</button>
|
| 558 |
-
</div>
|
| 559 |
-
|
| 560 |
-
<div class="flex items-center gap-3 group cursor-pointer p-2 -mx-2 rounded-xl hover:bg-white/5 transition">
|
| 561 |
-
<div class="w-12 h-12 rounded-full overflow-hidden">
|
| 562 |
-
<img src="http://static.photos/people/200x200/12" class="w-full h-full object-cover">
|
| 563 |
-
</div>
|
| 564 |
-
<div class="flex-1 min-w-0">
|
| 565 |
-
<p class="text-sm font-medium text-gray-200 group-hover:text-cyan-400 transition truncate">Synth Wanderer</p>
|
| 566 |
-
<p class="text-xs text-gray-500 truncate">28.1K followers</p>
|
| 567 |
-
</div>
|
| 568 |
-
<button class="w-8 h-8 rounded-full bg-white/5 flex items-center justify-center hover:bg-cyan-500/20 hover:text-cyan-400 transition">
|
| 569 |
-
<i data-lucide="plus" class="w-4 h-4"></i>
|
| 570 |
-
</button>
|
| 571 |
-
</div>
|
| 572 |
-
</div>
|
| 573 |
-
</div>
|
| 574 |
-
|
| 575 |
-
<!-- Merch / Links -->
|
| 576 |
-
<div class="glass-panel rounded-2xl p-4">
|
| 577 |
-
<h3 class="text-xs font-semibold text-gray-400 uppercase tracking-wider mb-4 flex items-center gap-2">
|
| 578 |
-
<i data-lucide="shopping-bag" class="w-4 h-4"></i>
|
| 579 |
-
Shop
|
| 580 |
-
</h3>
|
| 581 |
-
<div class="space-y-3">
|
| 582 |
-
<div class="relative group cursor-pointer overflow-hidden rounded-xl aspect-video">
|
| 583 |
-
<img src="http://static.photos/technology/640x360/99" class="w-full h-full object-cover transition duration-500 group-hover:scale-110">
|
| 584 |
-
<div class="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent flex flex-col justify-end p-3">
|
| 585 |
-
<p class="text-sm font-semibold">Limited Vinyl</p>
|
| 586 |
-
<p class="text-xs text-cyan-400">β¬29.99</p>
|
| 587 |
-
</div>
|
| 588 |
-
</div>
|
| 589 |
-
<div class="relative group cursor-pointer overflow-hidden rounded-xl aspect-video">
|
| 590 |
-
<img src="http://static.photos/minimal/640x360/88" class="w-full h-full object-cover transition duration-500 group-hover:scale-110">
|
| 591 |
-
<div class="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent flex flex-col justify-end p-3">
|
| 592 |
-
<p class="text-sm font-semibold">Artist Merch</p>
|
| 593 |
-
<p class="text-xs text-cyan-400">From β¬24.99</p>
|
| 594 |
-
</div>
|
| 595 |
-
</div>
|
| 596 |
-
</div>
|
| 597 |
-
</div>
|
| 598 |
-
</aside>
|
| 599 |
-
</div>
|
| 600 |
|
| 601 |
<!-- Sticky Bottom Player -->
|
| 602 |
<div class="sticky-player glass border-t border-white/10 px-4 py-3">
|
| 603 |
<div class="max-w-[1600px] mx-auto flex items-center gap-4">
|
| 604 |
-
|
| 605 |
-
|
| 606 |
-
|
| 607 |
-
<div class="w-14 h-14 rounded-lg overflow-hidden relative group cursor-pointer">
|
| 608 |
-
<img id="playerArt" src="http://static.photos/technology/200x200/1" class="w-full h-full object-cover">
|
| 609 |
-
<div class="absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition flex items-center justify-center">
|
| 610 |
-
<i data-lucide="maximize-2" class="w-5 h-5"></i>
|
| 611 |
-
</div>
|
| 612 |
</div>
|
| 613 |
<div class="min-w-0 flex-1">
|
| 614 |
<p id="playerTitle" class="text-sm font-medium text-white truncate">Midnight Synthesis</p>
|
| 615 |
<p id="playerArtist" class="text-xs text-gray-400 truncate">Aurora Void</p>
|
| 616 |
</div>
|
| 617 |
-
<button class="text-gray-400 hover:text-cyan-400 transition">
|
| 618 |
-
<i data-lucide="heart" class="w-5 h-5"></i>
|
| 619 |
-
</button>
|
| 620 |
-
</div>
|
| 621 |
-
|
| 622 |
-
<!-- Controls -->
|
| 623 |
-
<div class="flex-1 flex flex-col items-center max-w-2xl mx-auto">
|
| 624 |
-
<div class="flex items-center gap-6 mb-2">
|
| 625 |
-
<button class="text-gray-400 hover:text-white transition" onclick="toggleShuffle(this)">
|
| 626 |
-
<i data-lucide="shuffle" class="w-4 h-4"></i>
|
| 627 |
-
</button>
|
| 628 |
-
<button class="text-gray-300 hover:text-white transition" onclick="previousTrack()">
|
| 629 |
-
<i data-lucide="skip-back" class="w-5 h-5 fill-current"></i>
|
| 630 |
-
</button>
|
| 631 |
-
<button class="w-10 h-10 rounded-full bg-white text-black flex items-center justify-center hover:scale-105 transition" onclick="togglePlay()" id="playPauseBtn">
|
| 632 |
-
<i data-lucide="play" class="w-5 h-5 fill-current ml-0.5" id="playIcon"></i>
|
| 633 |
-
</button>
|
| 634 |
-
<button class="text-gray-300 hover:text-white transition" onclick="nextTrack()">
|
| 635 |
-
<i data-lucide="skip-forward" class="w-5 h-5 fill-current"></i>
|
| 636 |
-
</button>
|
| 637 |
-
<button class="text-gray-400 hover:text-white transition" onclick="toggleRepeat(this)">
|
| 638 |
-
<i data-lucide="repeat" class="w-4 h-4"></i>
|
| 639 |
-
</button>
|
| 640 |
-
</div>
|
| 641 |
-
|
| 642 |
-
<!-- Progress -->
|
| 643 |
-
<div class="w-full flex items-center gap-3">
|
| 644 |
-
<span class="text-xs text-gray-400 w-10 text-right" id="currentTime">1:24</span>
|
| 645 |
-
<div class="flex-1 h-8 flex items-center cursor-pointer group" id="progressContainer">
|
| 646 |
-
<div class="w-full h-1.5 bg-white/10 rounded-full overflow-hidden relative">
|
| 647 |
-
<div class="absolute inset-y-0 left-0 bg-gradient-to-r from-cyan-400 to-purple-500 w-[30%] rounded-full group-hover:h-2 transition-all"></div>
|
| 648 |
-
<div class="absolute top-1/2 -translate-y-1/2 left-[30%] w-3 h-3 bg-white rounded-full opacity-0 group-hover:opacity-100 transition shadow-lg"></div>
|
| 649 |
-
</div>
|
| 650 |
-
</div>
|
| 651 |
-
<span class="text-xs text-gray-400 w-10" id="duration">4:32</span>
|
| 652 |
-
</div>
|
| 653 |
</div>
|
| 654 |
-
|
| 655 |
-
|
| 656 |
-
|
| 657 |
-
<button class="text-gray-400 hover:text-white transition">
|
| 658 |
-
<i data-lucide="mic-2" class="w-4 h-4"></i>
|
| 659 |
-
</button>
|
| 660 |
-
<button class="text-gray-400 hover:text-white transition">
|
| 661 |
-
<i data-lucide="list-music" class="w-4 h-4"></i>
|
| 662 |
</button>
|
|
|
|
|
|
|
| 663 |
<div class="flex items-center gap-2 group">
|
| 664 |
-
<
|
| 665 |
-
|
| 666 |
-
</button>
|
| 667 |
-
<div class="w-24 h-1 bg-white/10 rounded-full overflow-hidden cursor-pointer">
|
| 668 |
-
<div class="h-full bg-cyan-400 w-[70%] rounded-full"></div>
|
| 669 |
-
</div>
|
| 670 |
</div>
|
| 671 |
-
<button class="text-gray-400 hover:text-white transition ml-2">
|
| 672 |
-
<i data-lucide="cast" class="w-4 h-4"></i>
|
| 673 |
-
</button>
|
| 674 |
</div>
|
| 675 |
</div>
|
| 676 |
</div>
|
| 677 |
|
|
|
|
| 678 |
<script>
|
| 679 |
-
//
|
| 680 |
-
|
| 681 |
-
|
| 682 |
-
//
|
| 683 |
-
const
|
| 684 |
-
|
| 685 |
-
|
| 686 |
-
|
| 687 |
-
|
| 688 |
-
|
| 689 |
-
|
| 690 |
-
|
| 691 |
-
|
| 692 |
-
|
| 693 |
-
|
| 694 |
-
{
|
| 695 |
-
|
| 696 |
-
|
| 697 |
-
|
| 698 |
-
duration: "3:45",
|
| 699 |
-
image: "http://static.photos/technology/400x400/2",
|
| 700 |
-
plays: "8.2K",
|
| 701 |
-
isExclusive: false,
|
| 702 |
-
price: null
|
| 703 |
-
},
|
| 704 |
-
{
|
| 705 |
-
id: 3,
|
| 706 |
-
title: "Cybernetic Dreams",
|
| 707 |
-
artist: "Aurora Void",
|
| 708 |
-
duration: "5:18",
|
| 709 |
-
image: "http://static.photos/technology/400x400/3",
|
| 710 |
-
plays: "24.1K",
|
| 711 |
-
isExclusive: false,
|
| 712 |
-
price: null
|
| 713 |
-
},
|
| 714 |
-
{
|
| 715 |
-
id: 4,
|
| 716 |
-
title: "Analog Heart",
|
| 717 |
-
artist: "Aurora Void",
|
| 718 |
-
duration: "3:22",
|
| 719 |
-
image: "http://static.photos/technology/400x400/4",
|
| 720 |
-
plays: "15.3K",
|
| 721 |
-
isExclusive: false,
|
| 722 |
-
price: null
|
| 723 |
-
},
|
| 724 |
-
{
|
| 725 |
-
id: 5,
|
| 726 |
-
title: "Midnight Synthesis",
|
| 727 |
-
artist: "Aurora Void",
|
| 728 |
-
duration: "4:08",
|
| 729 |
-
image: "http://static.photos/technology/400x400/5",
|
| 730 |
-
plays: "32.7K",
|
| 731 |
-
isExclusive: false,
|
| 732 |
-
price: null
|
| 733 |
-
},
|
| 734 |
-
{
|
| 735 |
-
id: 6,
|
| 736 |
-
title: "Void Walker [EXCLUSIVE]",
|
| 737 |
-
artist: "Aurora Void",
|
| 738 |
-
duration: "6:14",
|
| 739 |
-
image: "http://static.photos/technology/400x400/6",
|
| 740 |
-
plays: "9.8K",
|
| 741 |
-
isExclusive: true,
|
| 742 |
-
price: "β¬2.99",
|
| 743 |
-
tierRequired: "Supporter"
|
| 744 |
-
}
|
| 745 |
-
];
|
| 746 |
-
|
| 747 |
-
// User's subscription tier
|
| 748 |
-
let userTier = localStorage.getItem('userTier') || 'free';
|
| 749 |
-
let isPro = localStorage.getItem('isPro') === 'true';
|
| 750 |
-
|
| 751 |
-
// Global State Management with error handling
|
| 752 |
-
let isPlaying = false;
|
| 753 |
-
let currentTrack = tracks[4];
|
| 754 |
-
let progress = 30;
|
| 755 |
-
let likedTracks = [], following = [], playlists = [], recentlyPlayed = [], currentPlaylist = [];
|
| 756 |
-
let playlistIndex = 0;
|
| 757 |
-
|
| 758 |
-
try {
|
| 759 |
-
likedTracks = JSON.parse(localStorage.getItem('likedTracks') || '[]');
|
| 760 |
-
following = JSON.parse(localStorage.getItem('following') || '[]');
|
| 761 |
-
playlists = JSON.parse(localStorage.getItem('playlists') || '[]');
|
| 762 |
-
recentlyPlayed = JSON.parse(localStorage.getItem('recentlyPlayed') || '[]');
|
| 763 |
-
currentPlaylist = JSON.parse(localStorage.getItem('currentPlaylist') || '[]');
|
| 764 |
-
} catch (e) {
|
| 765 |
-
console.error('Error loading state:', e);
|
| 766 |
-
}
|
| 767 |
-
|
| 768 |
-
// Load global player state with error handling
|
| 769 |
-
function loadGlobalState() {
|
| 770 |
-
try {
|
| 771 |
-
const savedTrack = localStorage.getItem('currentTrack');
|
| 772 |
-
const savedIsPlaying = localStorage.getItem('isPlaying');
|
| 773 |
-
const savedProgress = localStorage.getItem('progress');
|
| 774 |
-
|
| 775 |
-
if (savedTrack) {
|
| 776 |
-
currentTrack = JSON.parse(savedTrack);
|
| 777 |
-
}
|
| 778 |
-
if (savedIsPlaying) {
|
| 779 |
-
isPlaying = savedIsPlaying === 'true';
|
| 780 |
-
}
|
| 781 |
-
if (savedProgress) {
|
| 782 |
-
progress = parseFloat(savedProgress);
|
| 783 |
-
}
|
| 784 |
-
} catch (e) {
|
| 785 |
-
console.error('Error loading global state:', e);
|
| 786 |
-
}
|
| 787 |
-
updatePlayer();
|
| 788 |
-
}
|
| 789 |
-
|
| 790 |
-
// Save global player state with error handling
|
| 791 |
-
function saveGlobalState() {
|
| 792 |
-
try {
|
| 793 |
-
localStorage.setItem('currentTrack', JSON.stringify(currentTrack));
|
| 794 |
-
localStorage.setItem('isPlaying', isPlaying);
|
| 795 |
-
localStorage.setItem('progress', progress);
|
| 796 |
-
} catch (e) {
|
| 797 |
-
console.error('Error saving state:', e);
|
| 798 |
-
}
|
| 799 |
-
}
|
| 800 |
|
| 801 |
-
//
|
| 802 |
-
|
| 803 |
-
|
| 804 |
-
|
| 805 |
-
|
| 806 |
-
|
| 807 |
-
|
| 808 |
-
|
| 809 |
-
const canPreview = track.isExclusive && !isSubscribedToArtist;
|
| 810 |
-
|
| 811 |
-
return `
|
| 812 |
-
<div class="track-card glass-panel rounded-2xl p-4 group cursor-pointer ${isLocked ? 'opacity-75' : ''}" onclick="${isLocked ? 'showPaywall()' : `playTrack(${index})`}">
|
| 813 |
-
<div class="relative aspect-square rounded-xl overflow-hidden mb-4">
|
| 814 |
-
<img src="${track.image}" class="w-full h-full object-cover transition duration-500 ${isLocked ? 'group-hover:scale-105' : 'group-hover:scale-110'} ${isLocked ? 'blur-sm' : ''}">
|
| 815 |
-
|
| 816 |
-
${isLocked ? `
|
| 817 |
-
<div class="locked-overlay absolute inset-0 flex flex-col items-center justify-center">
|
| 818 |
-
<div class="w-12 h-12 rounded-full bg-orange-500/20 flex items-center justify-center mb-2">
|
| 819 |
-
<i data-lucide="lock" class="w-6 h-6 text-orange-400"></i>
|
| 820 |
-
</div>
|
| 821 |
-
<p class="text-xs text-orange-400 font-medium">${track.price} or ${track.tierRequired}</p>
|
| 822 |
-
<button class="mt-2 px-3 py-1 rounded-full bg-orange-500 text-black text-xs font-semibold hover:bg-orange-400 transition" onclick="event.stopPropagation(); openSupportModal()">
|
| 823 |
-
Unlock
|
| 824 |
-
</button>
|
| 825 |
-
</div>
|
| 826 |
-
` : `
|
| 827 |
-
<div class="play-btn-overlay absolute inset-0 bg-black/50 flex items-center justify-center backdrop-blur-[2px]">
|
| 828 |
-
<div class="w-12 h-12 rounded-full bg-cyan-500 text-black flex items-center justify-center glow-cyan transform scale-90 group-hover:scale-100 transition">
|
| 829 |
-
<i data-lucide="${currentTrack.id === track.id && isPlaying ? 'pause' : 'play'}" class="w-6 h-6 fill-current ml-1"></i>
|
| 830 |
-
</div>
|
| 831 |
-
</div>
|
| 832 |
-
`}
|
| 833 |
-
|
| 834 |
-
${track.isExclusive ? `
|
| 835 |
-
<div class="absolute top-2 left-2 px-2 py-1 rounded exclusive-badge text-white text-xs font-bold flex items-center gap-1">
|
| 836 |
-
<i data-lucide="crown" class="w-3 h-3"></i>
|
| 837 |
-
EXCLUSIVE
|
| 838 |
-
</div>
|
| 839 |
-
` : ''}
|
| 840 |
-
|
| 841 |
-
<div class="absolute bottom-2 right-2 px-2 py-1 rounded bg-black/70 backdrop-blur text-xs font-medium">
|
| 842 |
-
${track.duration}
|
| 843 |
-
</div>
|
| 844 |
-
</div>
|
| 845 |
-
|
| 846 |
-
<div class="flex items-start justify-between gap-2">
|
| 847 |
-
<div class="flex-1 min-w-0">
|
| 848 |
-
<h3 class="font-semibold ${isLocked ? 'text-gray-400' : 'text-white'} truncate group-hover:text-cyan-400 transition cursor-pointer" onclick="event.stopPropagation(); window.location.href='track.html?id=${track.id}'">${track.title}</h3>
|
| 849 |
-
<p class="text-sm text-gray-400 truncate cursor-pointer hover:text-cyan-400 transition" onclick="event.stopPropagation(); window.location.href='artist.html'">${track.artist}</p>
|
| 850 |
-
</div>
|
| 851 |
-
${!isLocked ? `
|
| 852 |
-
<button class="w-8 h-8 rounded-full bg-white/5 flex items-center justify-center hover:bg-cyan-500/20 hover:text-cyan-400 transition opacity-0 group-hover:opacity-100" onclick="event.stopPropagation(); toggleLike(this, ${track.id})">
|
| 853 |
-
<i data-lucide="heart" class="w-4 h-4"></i>
|
| 854 |
-
</button>
|
| 855 |
-
` : ''}
|
| 856 |
-
</div>
|
| 857 |
-
|
| 858 |
-
${!isLocked ? `
|
| 859 |
-
<!-- Waveform Visualization -->
|
| 860 |
-
<div class="mt-3 flex items-center gap-1 h-6 opacity-50 group-hover:opacity-100 transition cursor-pointer" onclick="event.stopPropagation(); window.location.href='track.html?id=${track.id}'">
|
| 861 |
-
${Array(20).fill(0).map((_, i) => `
|
| 862 |
-
<div class="w-1 bg-cyan-400/50 rounded-full waveform-bar" style="height: ${20 + Math.random() * 80}%; animation-delay: ${i * 0.05}s; animation-play-state: ${currentTrack.id === track.id && isPlaying ? 'running' : 'paused'}"></div>
|
| 863 |
-
`).join('')}
|
| 864 |
-
</div>
|
| 865 |
-
` : `
|
| 866 |
-
<div class="mt-3 h-6 flex items-center">
|
| 867 |
-
<p class="text-xs text-orange-400 flex items-center gap-1">
|
| 868 |
-
<i data-lucide="lock" class="w-3 h-3"></i>
|
| 869 |
-
Subscribe to unlock
|
| 870 |
-
</p>
|
| 871 |
-
</div>
|
| 872 |
-
`}
|
| 873 |
-
|
| 874 |
-
<div class="mt-3 flex items-center justify-between text-xs text-gray-500">
|
| 875 |
-
<span class="flex items-center gap-1 cursor-pointer" onclick="event.stopPropagation(); window.location.href='track.html?id=${track.id}'">
|
| 876 |
-
<i data-lucide="play-circle" class="w-3 h-3"></i>
|
| 877 |
-
${track.plays}
|
| 878 |
-
</span>
|
| 879 |
-
<div class="flex items-center gap-2">
|
| 880 |
-
${!isLocked ? `
|
| 881 |
-
<button class="hover:text-cyan-400 transition opacity-0 group-hover:opacity-100" onclick="event.stopPropagation(); addToPlaylist(${track.id})" title="Add to playlist">
|
| 882 |
-
<i data-lucide="list-plus" class="w-4 h-4"></i>
|
| 883 |
-
</button>
|
| 884 |
-
` : ''}
|
| 885 |
-
${track.isExclusive ? `
|
| 886 |
-
<button class="text-orange-400 hover:text-orange-300 transition" onclick="event.stopPropagation(); openSupportModal()" title="Support to unlock">
|
| 887 |
-
<i data-lucide="heart-handshake" class="w-4 h-4"></i>
|
| 888 |
-
</button>
|
| 889 |
-
` : ''}
|
| 890 |
-
</div>
|
| 891 |
</div>
|
| 892 |
</div>
|
| 893 |
-
|
| 894 |
-
|
| 895 |
-
|
| 896 |
-
|
| 897 |
-
|
| 898 |
-
function showPaywall() {
|
| 899 |
-
showToast('π Exclusive content. Subscribe or purchase to unlock!');
|
| 900 |
-
setTimeout(() => openSupportModal(), 500);
|
| 901 |
-
}
|
| 902 |
-
|
| 903 |
-
function selectTier(tier) {
|
| 904 |
-
localStorage.setItem('selectedTier', tier);
|
| 905 |
-
openSupportModal();
|
| 906 |
-
}
|
| 907 |
|
| 908 |
-
|
| 909 |
-
|
| 910 |
-
|
| 911 |
-
|
| 912 |
-
|
| 913 |
-
<div class="
|
| 914 |
-
|
| 915 |
-
<div class="flex items-center justify-
|
| 916 |
-
<
|
| 917 |
-
<button onclick="this.closest('.fixed').remove()" class="text-gray-400 hover:text-white">
|
| 918 |
-
<i data-lucide="x" class="w-6 h-6"></i>
|
| 919 |
-
</button>
|
| 920 |
</div>
|
| 921 |
-
|
| 922 |
-
|
| 923 |
-
|
| 924 |
-
|
| 925 |
-
|
| 926 |
-
|
| 927 |
-
|
| 928 |
-
|
| 929 |
-
|
| 930 |
-
|
| 931 |
-
|
| 932 |
-
|
| 933 |
-
|
| 934 |
-
|
| 935 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 936 |
|
| 937 |
-
|
| 938 |
-
|
| 939 |
-
|
| 940 |
-
|
| 941 |
-
|
| 942 |
-
|
| 943 |
-
|
| 944 |
-
|
| 945 |
-
|
| 946 |
-
|
| 947 |
-
|
| 948 |
-
<p class="text-xs text-gray-500">Early access + WIP previews</p>
|
| 949 |
-
</div>
|
| 950 |
-
</div>
|
| 951 |
-
<span class="font-bold">β¬3/mo</span>
|
| 952 |
-
</button>
|
| 953 |
-
<button class="w-full p-3 rounded-lg bg-white/5 hover:bg-orange-500/20 border border-white/10 hover:border-orange-500/30 transition flex items-center justify-between" onclick="subscribe(8, 'Producer Circle')">
|
| 954 |
-
<div class="flex items-center gap-3">
|
| 955 |
-
<i data-lucide="zap" class="w-5 h-5 text-orange-400"></i>
|
| 956 |
-
<div class="text-left">
|
| 957 |
-
<p class="font-medium">Producer Circle</p>
|
| 958 |
-
<p class="text-xs text-gray-500">Stems + Q&A + all perks</p>
|
| 959 |
-
</div>
|
| 960 |
-
</div>
|
| 961 |
-
<span class="font-bold">β¬8/mo</span>
|
| 962 |
-
</button>
|
| 963 |
</div>
|
| 964 |
</div>
|
|
|
|
|
|
|
| 965 |
</div>
|
| 966 |
-
|
| 967 |
-
<p class="text-xs text-gray-500 text-center">Platform fee: 15% β’ Artist receives 85%</p>
|
| 968 |
-
</div>
|
| 969 |
-
`;
|
| 970 |
-
document.body.appendChild(modal);
|
| 971 |
-
lucide.createIcons();
|
| 972 |
-
}
|
| 973 |
-
|
| 974 |
-
function processTip(amount) {
|
| 975 |
-
const balance = parseFloat(localStorage.getItem('walletBalance') || '50');
|
| 976 |
-
if (balance >= amount) {
|
| 977 |
-
localStorage.setItem('walletBalance', (balance - amount).toString());
|
| 978 |
-
|
| 979 |
-
// Record transaction
|
| 980 |
-
const transactions = JSON.parse(localStorage.getItem('transactions') || '[]');
|
| 981 |
-
transactions.push({
|
| 982 |
-
type: 'tip',
|
| 983 |
-
amount: amount,
|
| 984 |
-
artist: 'Aurora Void',
|
| 985 |
-
date: new Date().toISOString(),
|
| 986 |
-
fee: amount * 0.15
|
| 987 |
-
});
|
| 988 |
-
localStorage.setItem('transactions', JSON.stringify(transactions));
|
| 989 |
-
|
| 990 |
-
showToast(`π Tipped β¬${amount} to Aurora Void!`);
|
| 991 |
-
setTimeout(() => {
|
| 992 |
-
document.querySelector('.fixed.z-50')?.remove();
|
| 993 |
-
renderTracks(); // Refresh to unlock if applicable
|
| 994 |
-
}, 1000);
|
| 995 |
-
} else {
|
| 996 |
-
showToast('β οΈ Insufficient balance. Please top up your wallet.');
|
| 997 |
-
}
|
| 998 |
-
}
|
| 999 |
-
|
| 1000 |
-
function subscribe(amount, tier) {
|
| 1001 |
-
localStorage.setItem('userTier', tier);
|
| 1002 |
-
localStorage.setItem('subscriptionAmount', amount);
|
| 1003 |
-
localStorage.setItem('subscriptions', JSON.stringify(['aurora-void']));
|
| 1004 |
-
|
| 1005 |
-
const transactions = JSON.parse(localStorage.getItem('transactions') || '[]');
|
| 1006 |
-
transactions.push({
|
| 1007 |
-
type: 'subscription',
|
| 1008 |
-
amount: amount,
|
| 1009 |
-
artist: 'Aurora Void',
|
| 1010 |
-
tier: tier,
|
| 1011 |
-
date: new Date().toISOString(),
|
| 1012 |
-
fee: amount * 0.15
|
| 1013 |
-
});
|
| 1014 |
-
localStorage.setItem('transactions', JSON.stringify(transactions));
|
| 1015 |
-
|
| 1016 |
-
showToast(`π Subscribed to ${tier} tier!`);
|
| 1017 |
-
setTimeout(() => {
|
| 1018 |
-
document.querySelector('.fixed.z-50')?.remove();
|
| 1019 |
-
renderTracks();
|
| 1020 |
-
}, 1000);
|
| 1021 |
-
}
|
| 1022 |
-
|
| 1023 |
-
// Player Functions
|
| 1024 |
-
function playTrack(index) {
|
| 1025 |
-
currentTrack = tracks[index];
|
| 1026 |
-
isPlaying = true;
|
| 1027 |
-
updatePlayer();
|
| 1028 |
-
renderTracks();
|
| 1029 |
-
}
|
| 1030 |
-
|
| 1031 |
-
function togglePlay() {
|
| 1032 |
-
isPlaying = !isPlaying;
|
| 1033 |
-
updatePlayer();
|
| 1034 |
-
renderTracks();
|
| 1035 |
-
}
|
| 1036 |
-
|
| 1037 |
-
function updatePlayer() {
|
| 1038 |
-
document.getElementById('playerTitle').textContent = currentTrack.title;
|
| 1039 |
-
document.getElementById('playerArtist').textContent = currentTrack.artist;
|
| 1040 |
-
document.getElementById('playerArt').src = currentTrack.image;
|
| 1041 |
-
|
| 1042 |
-
const playIcon = document.getElementById('playIcon');
|
| 1043 |
-
if (isPlaying) {
|
| 1044 |
-
playIcon.setAttribute('data-lucide', 'pause');
|
| 1045 |
-
lucide.createIcons();
|
| 1046 |
-
} else {
|
| 1047 |
-
playIcon.setAttribute('data-lucide', 'play');
|
| 1048 |
-
lucide.createIcons();
|
| 1049 |
-
}
|
| 1050 |
-
}
|
| 1051 |
-
|
| 1052 |
-
function previousTrack() {
|
| 1053 |
-
if (currentPlaylist.length > 0) {
|
| 1054 |
-
playlistIndex = playlistIndex > 0 ? playlistIndex - 1 : currentPlaylist.length - 1;
|
| 1055 |
-
currentTrack = currentPlaylist[playlistIndex];
|
| 1056 |
-
isPlaying = true;
|
| 1057 |
-
updatePlayer();
|
| 1058 |
-
saveGlobalState();
|
| 1059 |
-
} else {
|
| 1060 |
-
const currentIndex = tracks.findIndex(t => t.id === currentTrack.id);
|
| 1061 |
-
const newIndex = currentIndex > 0 ? currentIndex - 1 : tracks.length - 1;
|
| 1062 |
-
playTrack(newIndex);
|
| 1063 |
-
}
|
| 1064 |
-
}
|
| 1065 |
-
|
| 1066 |
-
function nextTrack() {
|
| 1067 |
-
if (currentPlaylist.length > 0) {
|
| 1068 |
-
playlistIndex = (playlistIndex + 1) % currentPlaylist.length;
|
| 1069 |
-
currentTrack = currentPlaylist[playlistIndex];
|
| 1070 |
-
isPlaying = true;
|
| 1071 |
-
updatePlayer();
|
| 1072 |
-
saveGlobalState();
|
| 1073 |
-
} else {
|
| 1074 |
-
const currentIndex = tracks.findIndex(t => t.id === currentTrack.id);
|
| 1075 |
-
const newIndex = currentIndex < tracks.length - 1 ? currentIndex + 1 : 0;
|
| 1076 |
-
playTrack(newIndex);
|
| 1077 |
}
|
| 1078 |
-
}
|
| 1079 |
|
| 1080 |
-
|
| 1081 |
-
const isFollowing = btn.classList.contains('bg-cyan-500');
|
| 1082 |
-
if (isFollowing) {
|
| 1083 |
-
btn.classList.remove('bg-cyan-500', 'text-black', 'glow-cyan');
|
| 1084 |
-
btn.classList.add('bg-white/10', 'text-white', 'border', 'border-white/20');
|
| 1085 |
-
btn.innerHTML = '<i data-lucide="user-plus" class="w-4 h-4"></i><span>Follow</span>';
|
| 1086 |
-
} else {
|
| 1087 |
-
btn.classList.add('bg-cyan-500', 'text-black', 'glow-cyan');
|
| 1088 |
-
btn.classList.remove('bg-white/10', 'text-white', 'border', 'border-white/20');
|
| 1089 |
-
btn.innerHTML = '<i data-lucide="user-check" class="w-4 h-4"></i><span>Following</span>';
|
| 1090 |
-
}
|
| 1091 |
-
lucide.createIcons();
|
| 1092 |
-
}
|
| 1093 |
-
|
| 1094 |
-
function toggleShuffle(btn) {
|
| 1095 |
-
btn.classList.toggle('text-cyan-400');
|
| 1096 |
-
}
|
| 1097 |
-
|
| 1098 |
-
function toggleRepeat(btn) {
|
| 1099 |
-
btn.classList.toggle('text-cyan-400');
|
| 1100 |
-
}
|
| 1101 |
-
|
| 1102 |
-
let isMuted = false;
|
| 1103 |
-
function toggleMute() {
|
| 1104 |
-
isMuted = !isMuted;
|
| 1105 |
-
const icon = document.getElementById('volumeIcon');
|
| 1106 |
-
if (isMuted) {
|
| 1107 |
-
icon.setAttribute('data-lucide', 'volume-x');
|
| 1108 |
-
} else {
|
| 1109 |
-
icon.setAttribute('data-lucide', 'volume-2');
|
| 1110 |
-
}
|
| 1111 |
-
lucide.createIcons();
|
| 1112 |
-
}
|
| 1113 |
-
|
| 1114 |
-
// Simulate progress
|
| 1115 |
-
setInterval(() => {
|
| 1116 |
-
if (isPlaying) {
|
| 1117 |
-
progress = (progress + 0.5) % 100;
|
| 1118 |
-
const progressBar = document.querySelector('.sticky-player .bg-gradient-to-r');
|
| 1119 |
-
if (progressBar) {
|
| 1120 |
-
progressBar.style.width = progress + '%';
|
| 1121 |
-
}
|
| 1122 |
-
const knob = document.querySelector('.sticky-player .rounded-full.shadow-lg');
|
| 1123 |
-
if (knob) {
|
| 1124 |
-
knob.style.left = progress + '%';
|
| 1125 |
-
}
|
| 1126 |
-
}
|
| 1127 |
-
}, 1000);
|
| 1128 |
-
|
| 1129 |
-
// Initialize
|
| 1130 |
-
loadGlobalState();
|
| 1131 |
-
renderTracks();
|
| 1132 |
-
|
| 1133 |
-
// Check if following on load
|
| 1134 |
-
if (following.includes('aurora-void')) {
|
| 1135 |
-
const followBtn = document.querySelector('[onclick="toggleFollow(this)"]');
|
| 1136 |
-
if (followBtn) {
|
| 1137 |
-
followBtn.classList.add('bg-cyan-500', 'text-black', 'glow-cyan');
|
| 1138 |
-
followBtn.classList.remove('bg-white/10', 'text-white', 'border', 'border-white/20');
|
| 1139 |
-
followBtn.innerHTML = '<i data-lucide="user-check" class="w-4 h-4"></i><span>Following</span>';
|
| 1140 |
-
lucide.createIcons();
|
| 1141 |
-
}
|
| 1142 |
-
}
|
| 1143 |
-
|
| 1144 |
-
// Progress bar click
|
| 1145 |
-
document.getElementById('progressContainer').addEventListener('click', (e) => {
|
| 1146 |
-
const rect = e.currentTarget.getBoundingClientRect();
|
| 1147 |
-
const x = e.clientX - rect.left;
|
| 1148 |
-
progress = (x / rect.width) * 100;
|
| 1149 |
-
});
|
| 1150 |
</script>
|
| 1151 |
-
<script src="mobile-nav.js"></script>
|
| 1152 |
-
<script src="https://deepsite.hf.co/deepsite-badge.js"></script>
|
| 1153 |
</body>
|
| 1154 |
</html>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>BeatFridge - Discover Music</title>
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
<script src="https://unpkg.com/lucide@latest"></script>
|
| 9 |
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
|
| 10 |
<link rel="stylesheet" href="responsive.css">
|
| 11 |
<style>
|
| 12 |
+
* { font-family: 'Inter', sans-serif; }
|
| 13 |
+
body { background-color: #0a0a0a; color: #ffffff; }
|
| 14 |
+
::-webkit-scrollbar { width: 8px; }
|
| 15 |
+
::-webkit-scrollbar-track { background: #0a0a0a; }
|
| 16 |
+
::-webkit-scrollbar-thumb { background: #2d2d2d; border-radius: 4px; }
|
| 17 |
+
.glass { background: rgba(20,20,20,0.6); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.08); }
|
| 18 |
+
.glass-panel { background: rgba(30,30,30,0.4); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.05); }
|
| 19 |
+
.neon-text { background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
|
| 20 |
+
.track-card { transition: all 0.3s cubic-bezier(0.4,0,0.2,1); }
|
| 21 |
+
.track-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -10px rgba(0,212,255,0.15); }
|
| 22 |
+
.play-btn-overlay { opacity: 0; transition: all 0.3s ease; }
|
| 23 |
+
.track-card:hover .play-btn-overlay { opacity: 1; }
|
| 24 |
+
.glow-cyan { box-shadow: 0 0 20px rgba(0,212,255,0.3); }
|
| 25 |
+
.sticky-player { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; }
|
| 26 |
+
.avatar-ring { box-shadow: 0 0 0 4px #0a0a0a, 0 0 0 6px rgba(0,212,255,0.5); }
|
| 27 |
+
.artist-card { transition: all 0.3s ease; }
|
| 28 |
+
.artist-card:hover { transform: translateY(-2px); }
|
| 29 |
+
.scroll-row { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
|
| 30 |
+
.scroll-row::-webkit-scrollbar { display: none; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
</style>
|
| 32 |
</head>
|
| 33 |
+
<body class="bg-black text-white overflow-x-hidden">
|
| 34 |
|
| 35 |
+
<!-- Top Navigation -->
|
| 36 |
<nav class="fixed top-0 left-0 right-0 z-40 glass border-b border-white/5">
|
| 37 |
+
<div class="max-w-[1600px] mx-auto px-4 sm:px-6 h-14 flex items-center justify-between">
|
| 38 |
+
<div class="flex items-center gap-6">
|
| 39 |
+
<a href="index.html" class="flex items-center gap-2">
|
|
|
|
| 40 |
<div class="w-8 h-8 rounded-lg flex items-center justify-center bg-white/10 border border-white/20">
|
| 41 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-5 h-5 text-white"><rect x="4" y="2" width="16" height="20" rx="2"/><line x1="4" y1="9" x2="20" y2="9"/><line x1="15" y1="5" x2="15" y2="7"/><line x1="15" y1="12" x2="15" y2="18"/></svg>
|
| 42 |
+
</div>
|
| 43 |
+
<span class="text-lg font-bold tracking-tight hidden sm:inline">BeatFridge</span>
|
| 44 |
+
</a>
|
| 45 |
+
<div class="hidden md:flex items-center gap-5 text-sm font-medium text-gray-400">
|
| 46 |
+
<a href="index.html" class="text-cyan-400">Home</a>
|
| 47 |
+
<a href="search.html" class="hover:text-cyan-400 transition">Search</a>
|
| 48 |
+
<a href="upload.html" class="hover:text-cyan-400 transition flex items-center gap-1"><i data-lucide="upload-cloud" class="w-4 h-4"></i>Upload</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
<a href="library.html" class="hover:text-cyan-400 transition">Library</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
</div>
|
| 51 |
</div>
|
| 52 |
+
<div class="flex items-center gap-3">
|
| 53 |
+
<button class="w-9 h-9 rounded-full bg-white/5 border border-white/10 flex items-center justify-center hover:bg-white/10 transition relative">
|
| 54 |
+
<i data-lucide="bell" class="w-4 h-4 text-gray-300"></i>
|
| 55 |
+
<span class="absolute top-1.5 right-1.5 w-2 h-2 bg-orange-500 rounded-full"></span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
</button>
|
| 57 |
+
<div id="topNavAvatarWrap" class="w-9 h-9 rounded-full bg-gradient-to-br from-cyan-400 to-purple-600 cursor-pointer hover:scale-105 transition avatar-ring overflow-hidden" onclick="BF.isLoggedIn() ? window.location.href='profile.html' : BF.showSignInModal()">
|
| 58 |
+
<img id="topNavAvatar" src="http://static.photos/people/200x200/42" alt="Profile" class="w-full h-full rounded-full object-cover">
|
|
|
|
| 59 |
</div>
|
| 60 |
</div>
|
| 61 |
</div>
|
| 62 |
</nav>
|
| 63 |
|
| 64 |
+
<!-- Main Content -->
|
| 65 |
+
<main class="max-w-[1600px] mx-auto pt-16 px-4 sm:px-6 pb-32 md:pb-24">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
+
<!-- Hero / Greeting -->
|
| 68 |
+
<div class="pt-6 pb-6">
|
| 69 |
+
<h1 class="text-2xl sm:text-3xl font-bold mb-1" id="greeting">Good evening</h1>
|
| 70 |
+
<p class="text-gray-400 text-sm">Discover new music and artists</p>
|
| 71 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
+
<!-- Quick Genre Pills -->
|
| 74 |
+
<div class="mb-8">
|
| 75 |
+
<div class="scroll-row flex gap-2 pb-2" id="genrePills"></div>
|
| 76 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
|
| 78 |
+
<!-- Trending Now -->
|
| 79 |
+
<section class="mb-10">
|
| 80 |
+
<div class="flex items-center justify-between mb-5">
|
| 81 |
+
<h2 class="text-lg sm:text-xl font-bold flex items-center gap-2">
|
| 82 |
+
<i data-lucide="trending-up" class="w-5 h-5 text-cyan-400"></i>
|
| 83 |
+
Trending Now
|
| 84 |
+
</h2>
|
| 85 |
+
<a href="search.html" class="text-sm text-cyan-400 hover:text-cyan-300 transition">See all</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
</div>
|
| 87 |
+
<div class="scroll-row flex gap-4 pb-2" id="trendingRow"></div>
|
| 88 |
+
</section>
|
| 89 |
+
|
| 90 |
+
<!-- Fresh Uploads -->
|
| 91 |
+
<section class="mb-10">
|
| 92 |
+
<div class="flex items-center justify-between mb-5">
|
| 93 |
+
<h2 class="text-lg sm:text-xl font-bold flex items-center gap-2">
|
| 94 |
+
<i data-lucide="sparkles" class="w-5 h-5 text-orange-400"></i>
|
| 95 |
+
Fresh Uploads
|
| 96 |
+
</h2>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
</div>
|
| 98 |
+
<div class="space-y-2" id="freshList"></div>
|
| 99 |
+
</section>
|
| 100 |
+
|
| 101 |
+
<!-- Artists to Discover -->
|
| 102 |
+
<section class="mb-10">
|
| 103 |
+
<div class="flex items-center justify-between mb-5">
|
| 104 |
+
<h2 class="text-lg sm:text-xl font-bold flex items-center gap-2">
|
| 105 |
+
<i data-lucide="users" class="w-5 h-5 text-purple-400"></i>
|
| 106 |
+
Artists to Discover
|
| 107 |
+
</h2>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
</div>
|
| 109 |
+
<div class="scroll-row flex gap-4 pb-2" id="artistRow"></div>
|
| 110 |
+
</section>
|
| 111 |
+
|
| 112 |
+
<!-- Recently Played (if any) -->
|
| 113 |
+
<section class="mb-10 hidden" id="recentSection">
|
| 114 |
+
<div class="flex items-center justify-between mb-5">
|
| 115 |
+
<h2 class="text-lg sm:text-xl font-bold flex items-center gap-2">
|
| 116 |
+
<i data-lucide="clock" class="w-5 h-5 text-cyan-400"></i>
|
| 117 |
+
Recently Played
|
| 118 |
+
</h2>
|
| 119 |
+
<a href="library.html" class="text-sm text-cyan-400 hover:text-cyan-300 transition">View all</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
</div>
|
| 121 |
+
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-3" id="recentGrid"></div>
|
| 122 |
+
</section>
|
| 123 |
|
| 124 |
+
</main>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
<!-- Sticky Bottom Player -->
|
| 127 |
<div class="sticky-player glass border-t border-white/10 px-4 py-3">
|
| 128 |
<div class="max-w-[1600px] mx-auto flex items-center gap-4">
|
| 129 |
+
<div class="flex items-center gap-3 w-48 sm:w-64 flex-shrink-0">
|
| 130 |
+
<div class="w-12 h-12 sm:w-14 sm:h-14 rounded-lg overflow-hidden flex-shrink-0">
|
| 131 |
+
<img id="playerArt" src="http://static.photos/technology/200x200/5" class="w-full h-full object-cover">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
</div>
|
| 133 |
<div class="min-w-0 flex-1">
|
| 134 |
<p id="playerTitle" class="text-sm font-medium text-white truncate">Midnight Synthesis</p>
|
| 135 |
<p id="playerArtist" class="text-xs text-gray-400 truncate">Aurora Void</p>
|
| 136 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
</div>
|
| 138 |
+
<div class="flex-1 flex items-center justify-center max-w-2xl mx-auto">
|
| 139 |
+
<button class="w-10 h-10 rounded-full bg-white text-black flex items-center justify-center hover:scale-105 transition" onclick="BF.togglePlay()">
|
| 140 |
+
<i data-lucide="play" class="w-5 h-5 fill-current ml-0.5" id="playIcon"></i>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
</button>
|
| 142 |
+
</div>
|
| 143 |
+
<div class="hidden sm:flex items-center gap-3 w-48 sm:w-64 justify-end">
|
| 144 |
<div class="flex items-center gap-2 group">
|
| 145 |
+
<i data-lucide="volume-2" class="w-5 h-5 text-gray-400"></i>
|
| 146 |
+
<div class="w-20 h-1 bg-white/10 rounded-full overflow-hidden"><div class="h-full bg-cyan-400 w-[70%] rounded-full"></div></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
</div>
|
|
|
|
|
|
|
|
|
|
| 148 |
</div>
|
| 149 |
</div>
|
| 150 |
</div>
|
| 151 |
|
| 152 |
+
<script src="app.js"></script>
|
| 153 |
<script>
|
| 154 |
+
// Init app
|
| 155 |
+
BF.init('home');
|
| 156 |
+
|
| 157 |
+
// Greeting based on time
|
| 158 |
+
const hour = new Date().getHours();
|
| 159 |
+
const greetEl = document.getElementById('greeting');
|
| 160 |
+
const user = BF.getCurrentUser();
|
| 161 |
+
const name = user ? `, ${user.displayName || user.username}` : '';
|
| 162 |
+
if (hour < 12) greetEl.textContent = `Good morning${name}`;
|
| 163 |
+
else if (hour < 18) greetEl.textContent = `Good afternoon${name}`;
|
| 164 |
+
else greetEl.textContent = `Good evening${name}`;
|
| 165 |
+
|
| 166 |
+
// Genre Pills
|
| 167 |
+
const genreColors = { cyan: 'bg-cyan-500/20 text-cyan-400 border-cyan-500/30', purple: 'bg-purple-500/20 text-purple-400 border-purple-500/30', orange: 'bg-orange-500/20 text-orange-400 border-orange-500/30', pink: 'bg-pink-500/20 text-pink-400 border-pink-500/30', green: 'bg-green-500/20 text-green-400 border-green-500/30', red: 'bg-red-500/20 text-red-400 border-red-500/30' };
|
| 168 |
+
document.getElementById('genrePills').innerHTML = BF.getGenres().map(g => `
|
| 169 |
+
<a href="search.html?genre=${g.name.toLowerCase()}" class="flex-shrink-0 px-4 py-2 rounded-full border text-sm font-medium transition hover:opacity-80 ${genreColors[g.color]}">
|
| 170 |
+
${g.name}
|
| 171 |
+
</a>
|
| 172 |
+
`).join('');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
|
| 174 |
+
// Trending Row
|
| 175 |
+
const trending = BF.getTrendingTracks().slice(0, 8);
|
| 176 |
+
document.getElementById('trendingRow').innerHTML = trending.map(track => `
|
| 177 |
+
<div class="track-card flex-shrink-0 w-36 sm:w-44 glass-panel rounded-xl p-3 group cursor-pointer" onclick="BF.playTrack(${JSON.stringify(track).replace(/"/g, '"')})">
|
| 178 |
+
<div class="relative aspect-square rounded-lg overflow-hidden mb-3">
|
| 179 |
+
<img src="${track.image}" class="w-full h-full object-cover transition duration-500 group-hover:scale-110" loading="lazy">
|
| 180 |
+
<div class="play-btn-overlay absolute inset-0 bg-black/50 flex items-center justify-center">
|
| 181 |
+
<div class="w-10 h-10 rounded-full bg-cyan-500 text-black flex items-center justify-center glow-cyan"><i data-lucide="play" class="w-5 h-5 fill-current ml-0.5"></i></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 182 |
</div>
|
| 183 |
</div>
|
| 184 |
+
<h3 class="text-sm font-semibold text-white truncate group-hover:text-cyan-400 transition">${track.title}</h3>
|
| 185 |
+
<p class="text-xs text-gray-500 truncate">${track.artist}</p>
|
| 186 |
+
</div>
|
| 187 |
+
`).join('');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
|
| 189 |
+
// Fresh Uploads List
|
| 190 |
+
const fresh = BF.getAllTracks().slice(0, 6);
|
| 191 |
+
document.getElementById('freshList').innerHTML = fresh.map((track, i) => `
|
| 192 |
+
<div class="flex items-center gap-3 p-3 rounded-xl hover:bg-white/5 transition cursor-pointer group" onclick="BF.playTrack(${JSON.stringify(track).replace(/"/g, '"')})">
|
| 193 |
+
<span class="text-sm text-gray-600 w-5 text-right">${i + 1}</span>
|
| 194 |
+
<div class="w-12 h-12 rounded-lg overflow-hidden flex-shrink-0 relative">
|
| 195 |
+
<img src="${track.image}" class="w-full h-full object-cover" loading="lazy">
|
| 196 |
+
<div class="absolute inset-0 bg-black/50 flex items-center justify-center opacity-0 group-hover:opacity-100 transition">
|
| 197 |
+
<i data-lucide="play" class="w-4 h-4 text-cyan-400 fill-current"></i>
|
|
|
|
|
|
|
|
|
|
| 198 |
</div>
|
| 199 |
+
</div>
|
| 200 |
+
<div class="flex-1 min-w-0">
|
| 201 |
+
<h4 class="text-sm font-medium text-white truncate group-hover:text-cyan-400 transition">${track.title}</h4>
|
| 202 |
+
<p class="text-xs text-gray-500 truncate">${track.artist}</p>
|
| 203 |
+
</div>
|
| 204 |
+
<div class="hidden sm:flex items-center gap-3 text-xs text-gray-500">
|
| 205 |
+
<span>${track.plays} plays</span>
|
| 206 |
+
<span>${track.duration}</span>
|
| 207 |
+
</div>
|
| 208 |
+
</div>
|
| 209 |
+
`).join('');
|
| 210 |
+
|
| 211 |
+
// Artist Row
|
| 212 |
+
document.getElementById('artistRow').innerHTML = BF.getArtists().map(artist => `
|
| 213 |
+
<a href="artist.html" class="artist-card flex-shrink-0 w-32 sm:w-40 glass-panel rounded-xl p-4 text-center group cursor-pointer">
|
| 214 |
+
<div class="w-20 h-20 sm:w-24 sm:h-24 rounded-full overflow-hidden mx-auto mb-3 ${artist.verified ? 'avatar-ring' : ''}">
|
| 215 |
+
<img src="${artist.image}" class="w-full h-full object-cover" loading="lazy">
|
| 216 |
+
</div>
|
| 217 |
+
<h3 class="text-sm font-semibold text-white truncate group-hover:text-cyan-400 transition">${artist.name}</h3>
|
| 218 |
+
<p class="text-xs text-gray-500">${artist.followers} followers</p>
|
| 219 |
+
${artist.verified ? '<span class="inline-flex items-center gap-1 text-[10px] text-cyan-400 mt-1"><i data-lucide="check-circle" class="w-3 h-3"></i>Verified</span>' : ''}
|
| 220 |
+
</a>
|
| 221 |
+
`).join('');
|
| 222 |
|
| 223 |
+
// Recently Played
|
| 224 |
+
try {
|
| 225 |
+
const rp = JSON.parse(localStorage.getItem('recentlyPlayed') || '[]');
|
| 226 |
+
if (rp.length) {
|
| 227 |
+
document.getElementById('recentSection').classList.remove('hidden');
|
| 228 |
+
document.getElementById('recentGrid').innerHTML = rp.slice(0, 6).map(track => `
|
| 229 |
+
<div class="glass-panel rounded-xl p-3 group cursor-pointer" onclick="BF.playTrack(${JSON.stringify(track).replace(/"/g, '"')})">
|
| 230 |
+
<div class="relative aspect-square rounded-lg overflow-hidden mb-2">
|
| 231 |
+
<img src="${track.image}" class="w-full h-full object-cover" loading="lazy">
|
| 232 |
+
<div class="play-btn-overlay absolute inset-0 bg-black/50 flex items-center justify-center">
|
| 233 |
+
<div class="w-10 h-10 rounded-full bg-cyan-500 text-black flex items-center justify-center glow-cyan"><i data-lucide="play" class="w-5 h-5 fill-current ml-0.5"></i></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 234 |
</div>
|
| 235 |
</div>
|
| 236 |
+
<h4 class="text-xs font-medium text-white truncate group-hover:text-cyan-400 transition">${track.title}</h4>
|
| 237 |
+
<p class="text-[11px] text-gray-500 truncate">${track.artist}</p>
|
| 238 |
</div>
|
| 239 |
+
`).join('');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 240 |
}
|
| 241 |
+
} catch {}
|
| 242 |
|
| 243 |
+
lucide.createIcons();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 244 |
</script>
|
|
|
|
|
|
|
| 245 |
</body>
|
| 246 |
</html>
|
library.html
CHANGED
|
@@ -388,8 +388,9 @@
|
|
| 388 |
</div>
|
| 389 |
</div>
|
| 390 |
|
| 391 |
-
<script src="
|
| 392 |
<script>
|
|
|
|
| 393 |
lucide.createIcons();
|
| 394 |
|
| 395 |
let currentTab = 'liked';
|
|
|
|
| 388 |
</div>
|
| 389 |
</div>
|
| 390 |
|
| 391 |
+
<script src="app.js"></script>
|
| 392 |
<script>
|
| 393 |
+
BF.init('home');
|
| 394 |
lucide.createIcons();
|
| 395 |
|
| 396 |
let currentTab = 'liked';
|
profile.html
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Profile - BeatFridge</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script src="https://unpkg.com/lucide@latest"></script>
|
| 9 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
|
| 10 |
+
<link rel="stylesheet" href="responsive.css">
|
| 11 |
+
<style>
|
| 12 |
+
* { font-family: 'Inter', sans-serif; }
|
| 13 |
+
body { background-color: #0a0a0a; color: #ffffff; }
|
| 14 |
+
::-webkit-scrollbar { width: 8px; }
|
| 15 |
+
::-webkit-scrollbar-track { background: #0a0a0a; }
|
| 16 |
+
::-webkit-scrollbar-thumb { background: #2d2d2d; border-radius: 4px; }
|
| 17 |
+
.glass { background: rgba(20,20,20,0.6); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.08); }
|
| 18 |
+
.glass-panel { background: rgba(30,30,30,0.4); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.05); }
|
| 19 |
+
.neon-text { background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
|
| 20 |
+
.track-card { transition: all 0.3s cubic-bezier(0.4,0,0.2,1); }
|
| 21 |
+
.track-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -10px rgba(0,212,255,0.15); }
|
| 22 |
+
.play-btn-overlay { opacity: 0; transition: all 0.3s ease; }
|
| 23 |
+
.track-card:hover .play-btn-overlay { opacity: 1; }
|
| 24 |
+
.glow-cyan { box-shadow: 0 0 20px rgba(0,212,255,0.3); }
|
| 25 |
+
.glow-orange { box-shadow: 0 0 20px rgba(249,115,22,0.3); }
|
| 26 |
+
.sticky-player { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; }
|
| 27 |
+
.avatar-ring { box-shadow: 0 0 0 4px #0a0a0a, 0 0 0 6px rgba(0,212,255,0.5); }
|
| 28 |
+
.banner-gradient { background: linear-gradient(135deg, rgba(0,212,255,0.8), rgba(124,58,237,0.8), rgba(249,115,22,0.6)); mix-blend-mode: multiply; }
|
| 29 |
+
</style>
|
| 30 |
+
</head>
|
| 31 |
+
<body class="bg-black text-white overflow-x-hidden">
|
| 32 |
+
|
| 33 |
+
<!-- Top Navigation -->
|
| 34 |
+
<nav class="fixed top-0 left-0 right-0 z-40 glass border-b border-white/5">
|
| 35 |
+
<div class="max-w-[1600px] mx-auto px-4 sm:px-6 h-14 flex items-center justify-between">
|
| 36 |
+
<div class="flex items-center gap-6">
|
| 37 |
+
<a href="index.html" class="flex items-center gap-2">
|
| 38 |
+
<div class="w-8 h-8 rounded-lg flex items-center justify-center bg-white/10 border border-white/20">
|
| 39 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-5 h-5 text-white"><rect x="4" y="2" width="16" height="20" rx="2"/><line x1="4" y1="9" x2="20" y2="9"/><line x1="15" y1="5" x2="15" y2="7"/><line x1="15" y1="12" x2="15" y2="18"/></svg>
|
| 40 |
+
</div>
|
| 41 |
+
<span class="text-lg font-bold tracking-tight hidden sm:inline">BeatFridge</span>
|
| 42 |
+
</a>
|
| 43 |
+
<div class="hidden md:flex items-center gap-5 text-sm font-medium text-gray-400">
|
| 44 |
+
<a href="index.html" class="hover:text-cyan-400 transition">Home</a>
|
| 45 |
+
<a href="search.html" class="hover:text-cyan-400 transition">Search</a>
|
| 46 |
+
<a href="upload.html" class="hover:text-cyan-400 transition flex items-center gap-1"><i data-lucide="upload-cloud" class="w-4 h-4"></i>Upload</a>
|
| 47 |
+
<a href="profile.html" class="text-cyan-400">Profile</a>
|
| 48 |
+
</div>
|
| 49 |
+
</div>
|
| 50 |
+
<div class="flex items-center gap-3">
|
| 51 |
+
<a href="library.html" class="w-9 h-9 rounded-full bg-white/5 border border-white/10 flex items-center justify-center hover:bg-white/10 transition">
|
| 52 |
+
<i data-lucide="library" class="w-4 h-4 text-gray-300"></i>
|
| 53 |
+
</a>
|
| 54 |
+
<a href="analytics.html" class="w-9 h-9 rounded-full bg-white/5 border border-white/10 flex items-center justify-center hover:bg-white/10 transition">
|
| 55 |
+
<i data-lucide="bar-chart-2" class="w-4 h-4 text-gray-300"></i>
|
| 56 |
+
</a>
|
| 57 |
+
</div>
|
| 58 |
+
</div>
|
| 59 |
+
</nav>
|
| 60 |
+
|
| 61 |
+
<!-- Main Content -->
|
| 62 |
+
<main class="max-w-[1600px] mx-auto pt-14 pb-32 md:pb-24">
|
| 63 |
+
|
| 64 |
+
<!-- Not Logged In State -->
|
| 65 |
+
<div id="notLoggedIn" class="hidden">
|
| 66 |
+
<div class="flex flex-col items-center justify-center min-h-[60vh] px-4 text-center">
|
| 67 |
+
<div class="w-20 h-20 rounded-full bg-white/5 flex items-center justify-center mb-6">
|
| 68 |
+
<i data-lucide="user-x" class="w-10 h-10 text-gray-500"></i>
|
| 69 |
+
</div>
|
| 70 |
+
<h2 class="text-2xl font-bold text-white mb-3">Sign in to view your profile</h2>
|
| 71 |
+
<p class="text-gray-400 mb-6 max-w-sm">Your uploaded tracks, stats, and profile info will appear here once you're signed in.</p>
|
| 72 |
+
<button onclick="BF.showSignInModal()" class="px-8 py-3 bg-cyan-500 hover:bg-cyan-400 text-black font-semibold rounded-full transition glow-cyan">Sign In</button>
|
| 73 |
+
<p class="text-sm text-gray-500 mt-4">No account? <a href="upload.html" class="text-cyan-400 hover:underline">Sign up when uploading a track</a></p>
|
| 74 |
+
</div>
|
| 75 |
+
</div>
|
| 76 |
+
|
| 77 |
+
<!-- Logged In State -->
|
| 78 |
+
<div id="loggedIn" class="hidden">
|
| 79 |
+
<!-- Banner -->
|
| 80 |
+
<div class="relative h-40 sm:h-56">
|
| 81 |
+
<img src="http://static.photos/technology/1200x630/88" alt="Banner" class="w-full h-full object-cover">
|
| 82 |
+
<div class="absolute inset-0 banner-gradient"></div>
|
| 83 |
+
<div class="absolute inset-0 bg-gradient-to-t from-[#0a0a0a] via-transparent to-transparent"></div>
|
| 84 |
+
</div>
|
| 85 |
+
|
| 86 |
+
<!-- Profile Info -->
|
| 87 |
+
<div class="relative px-4 sm:px-6 -mt-16 sm:-mt-20 mb-6">
|
| 88 |
+
<div class="flex flex-col sm:flex-row items-start sm:items-end gap-4">
|
| 89 |
+
<div class="w-24 h-24 sm:w-32 sm:h-32 rounded-full overflow-hidden avatar-ring bg-black flex-shrink-0">
|
| 90 |
+
<img id="profileAvatar" src="http://static.photos/people/200x200/42" alt="Avatar" class="w-full h-full object-cover">
|
| 91 |
+
</div>
|
| 92 |
+
<div class="flex-1 min-w-0">
|
| 93 |
+
<h1 class="text-2xl sm:text-3xl font-bold" id="profileName">Username</h1>
|
| 94 |
+
<p class="text-gray-400 text-sm" id="profileHandle">@username</p>
|
| 95 |
+
</div>
|
| 96 |
+
<div class="flex items-center gap-2">
|
| 97 |
+
<a href="upload.html" class="px-5 py-2 bg-cyan-500 hover:bg-cyan-400 text-black font-semibold rounded-full transition glow-cyan flex items-center gap-2 text-sm">
|
| 98 |
+
<i data-lucide="upload-cloud" class="w-4 h-4"></i>
|
| 99 |
+
Upload
|
| 100 |
+
</a>
|
| 101 |
+
<button onclick="BF.signOut()" class="px-4 py-2 bg-white/5 hover:bg-white/10 border border-white/10 rounded-full text-sm text-gray-400 transition flex items-center gap-2">
|
| 102 |
+
<i data-lucide="log-out" class="w-4 h-4"></i>
|
| 103 |
+
<span class="hidden sm:inline">Sign Out</span>
|
| 104 |
+
</button>
|
| 105 |
+
</div>
|
| 106 |
+
</div>
|
| 107 |
+
|
| 108 |
+
<!-- Stats -->
|
| 109 |
+
<div class="flex flex-wrap items-center gap-4 sm:gap-8 mt-5 pt-5 border-t border-white/10">
|
| 110 |
+
<div>
|
| 111 |
+
<p class="text-xl sm:text-2xl font-bold neon-text" id="statTracks">0</p>
|
| 112 |
+
<p class="text-xs text-gray-500 uppercase tracking-wider">Tracks</p>
|
| 113 |
+
</div>
|
| 114 |
+
<div>
|
| 115 |
+
<p class="text-xl sm:text-2xl font-bold text-white" id="statFollowers">0</p>
|
| 116 |
+
<p class="text-xs text-gray-500 uppercase tracking-wider">Followers</p>
|
| 117 |
+
</div>
|
| 118 |
+
<div>
|
| 119 |
+
<p class="text-xl sm:text-2xl font-bold text-white" id="statFollowing">0</p>
|
| 120 |
+
<p class="text-xs text-gray-500 uppercase tracking-wider">Following</p>
|
| 121 |
+
</div>
|
| 122 |
+
<div>
|
| 123 |
+
<p class="text-xl sm:text-2xl font-bold text-white" id="statPlays">0</p>
|
| 124 |
+
<p class="text-xs text-gray-500 uppercase tracking-wider">Plays</p>
|
| 125 |
+
</div>
|
| 126 |
+
</div>
|
| 127 |
+
</div>
|
| 128 |
+
|
| 129 |
+
<!-- Quick Actions -->
|
| 130 |
+
<div class="px-4 sm:px-6 mb-6">
|
| 131 |
+
<div class="flex flex-wrap gap-2">
|
| 132 |
+
<a href="library.html" class="px-4 py-2 rounded-full bg-white/5 border border-white/10 text-sm text-gray-300 hover:bg-white/10 transition flex items-center gap-2">
|
| 133 |
+
<i data-lucide="library" class="w-4 h-4"></i> Library
|
| 134 |
+
</a>
|
| 135 |
+
<a href="analytics.html" class="px-4 py-2 rounded-full bg-white/5 border border-white/10 text-sm text-gray-300 hover:bg-white/10 transition flex items-center gap-2">
|
| 136 |
+
<i data-lucide="bar-chart-2" class="w-4 h-4"></i> Analytics
|
| 137 |
+
</a>
|
| 138 |
+
<a href="artist.html" class="px-4 py-2 rounded-full bg-white/5 border border-white/10 text-sm text-gray-300 hover:bg-white/10 transition flex items-center gap-2">
|
| 139 |
+
<i data-lucide="external-link" class="w-4 h-4"></i> Public Profile
|
| 140 |
+
</a>
|
| 141 |
+
</div>
|
| 142 |
+
</div>
|
| 143 |
+
|
| 144 |
+
<!-- Uploaded Tracks -->
|
| 145 |
+
<div class="px-4 sm:px-6">
|
| 146 |
+
<div class="flex items-center justify-between mb-5">
|
| 147 |
+
<h2 class="text-lg font-bold flex items-center gap-2">
|
| 148 |
+
<i data-lucide="disc" class="w-5 h-5 text-cyan-400"></i>
|
| 149 |
+
Your Tracks
|
| 150 |
+
</h2>
|
| 151 |
+
</div>
|
| 152 |
+
|
| 153 |
+
<div id="userTracksContent">
|
| 154 |
+
<!-- Populated by JS -->
|
| 155 |
+
</div>
|
| 156 |
+
</div>
|
| 157 |
+
</div>
|
| 158 |
+
</main>
|
| 159 |
+
|
| 160 |
+
<!-- Sticky Bottom Player -->
|
| 161 |
+
<div class="sticky-player glass border-t border-white/10 px-4 py-3">
|
| 162 |
+
<div class="max-w-[1600px] mx-auto flex items-center gap-4">
|
| 163 |
+
<div class="flex items-center gap-3 w-48 sm:w-64 flex-shrink-0">
|
| 164 |
+
<div class="w-12 h-12 sm:w-14 sm:h-14 rounded-lg overflow-hidden flex-shrink-0">
|
| 165 |
+
<img id="playerArt" src="http://static.photos/technology/200x200/5" class="w-full h-full object-cover">
|
| 166 |
+
</div>
|
| 167 |
+
<div class="min-w-0 flex-1">
|
| 168 |
+
<p id="playerTitle" class="text-sm font-medium text-white truncate">Midnight Synthesis</p>
|
| 169 |
+
<p id="playerArtist" class="text-xs text-gray-400 truncate">Aurora Void</p>
|
| 170 |
+
</div>
|
| 171 |
+
</div>
|
| 172 |
+
<div class="flex-1 flex items-center justify-center max-w-2xl mx-auto">
|
| 173 |
+
<button class="w-10 h-10 rounded-full bg-white text-black flex items-center justify-center hover:scale-105 transition" onclick="BF.togglePlay()">
|
| 174 |
+
<i data-lucide="play" class="w-5 h-5 fill-current ml-0.5" id="playIcon"></i>
|
| 175 |
+
</button>
|
| 176 |
+
</div>
|
| 177 |
+
<div class="hidden sm:flex items-center gap-3 w-48 sm:w-64 justify-end">
|
| 178 |
+
<div class="flex items-center gap-2"><i data-lucide="volume-2" class="w-5 h-5 text-gray-400"></i><div class="w-20 h-1 bg-white/10 rounded-full overflow-hidden"><div class="h-full bg-cyan-400 w-[70%] rounded-full"></div></div></div>
|
| 179 |
+
</div>
|
| 180 |
+
</div>
|
| 181 |
+
</div>
|
| 182 |
+
|
| 183 |
+
<script src="app.js"></script>
|
| 184 |
+
<script>
|
| 185 |
+
BF.init('profile');
|
| 186 |
+
|
| 187 |
+
const user = BF.getCurrentUser();
|
| 188 |
+
if (user) {
|
| 189 |
+
document.getElementById('notLoggedIn').classList.add('hidden');
|
| 190 |
+
document.getElementById('loggedIn').classList.remove('hidden');
|
| 191 |
+
|
| 192 |
+
// Fill profile info
|
| 193 |
+
document.getElementById('profileAvatar').src = user.avatar || 'http://static.photos/people/200x200/42';
|
| 194 |
+
document.getElementById('profileName').textContent = user.displayName || user.username;
|
| 195 |
+
document.getElementById('profileHandle').textContent = '@' + user.username;
|
| 196 |
+
|
| 197 |
+
// Stats
|
| 198 |
+
const following = JSON.parse(localStorage.getItem('following') || '[]');
|
| 199 |
+
document.getElementById('statFollowing').textContent = following.length;
|
| 200 |
+
|
| 201 |
+
// Get user's tracks
|
| 202 |
+
const allTracks = BF.getAllTracks();
|
| 203 |
+
const userTracks = allTracks.filter(t => t.artistId === user.id || t.artist === (user.displayName || user.username));
|
| 204 |
+
document.getElementById('statTracks').textContent = userTracks.length;
|
| 205 |
+
|
| 206 |
+
const totalPlays = userTracks.reduce((sum, t) => {
|
| 207 |
+
const p = parseFloat(t.plays);
|
| 208 |
+
return sum + (t.plays.includes('K') ? p * 1000 : p);
|
| 209 |
+
}, 0);
|
| 210 |
+
document.getElementById('statPlays').textContent = totalPlays > 1000 ? (totalPlays / 1000).toFixed(1) + 'K' : totalPlays;
|
| 211 |
+
|
| 212 |
+
// Render user tracks
|
| 213 |
+
const container = document.getElementById('userTracksContent');
|
| 214 |
+
if (userTracks.length === 0) {
|
| 215 |
+
container.innerHTML = `
|
| 216 |
+
<div class="text-center py-16">
|
| 217 |
+
<div class="w-16 h-16 rounded-full bg-white/5 flex items-center justify-center mx-auto mb-4">
|
| 218 |
+
<i data-lucide="music" class="w-8 h-8 text-gray-500"></i>
|
| 219 |
+
</div>
|
| 220 |
+
<h3 class="text-xl font-semibold text-gray-300 mb-2">No tracks yet</h3>
|
| 221 |
+
<p class="text-gray-500 mb-4">Upload your first track to get started</p>
|
| 222 |
+
<a href="upload.html" class="px-6 py-3 bg-cyan-500 hover:bg-cyan-400 text-black font-semibold rounded-full transition glow-cyan inline-flex items-center gap-2">
|
| 223 |
+
<i data-lucide="upload-cloud" class="w-5 h-5"></i>
|
| 224 |
+
Upload Track
|
| 225 |
+
</a>
|
| 226 |
+
</div>
|
| 227 |
+
`;
|
| 228 |
+
} else {
|
| 229 |
+
container.innerHTML = `
|
| 230 |
+
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
|
| 231 |
+
${userTracks.map(track => `
|
| 232 |
+
<div class="track-card glass-panel rounded-2xl p-4 group cursor-pointer" onclick="BF.playTrack(${JSON.stringify(track).replace(/"/g, '"')})">
|
| 233 |
+
<div class="relative aspect-square rounded-xl overflow-hidden mb-3">
|
| 234 |
+
<img src="${track.image}" class="w-full h-full object-cover transition duration-500 group-hover:scale-110" loading="lazy">
|
| 235 |
+
<div class="play-btn-overlay absolute inset-0 bg-black/50 flex items-center justify-center backdrop-blur-[2px]">
|
| 236 |
+
<div class="w-12 h-12 rounded-full bg-cyan-500 text-black flex items-center justify-center glow-cyan"><i data-lucide="play" class="w-6 h-6 fill-current ml-1"></i></div>
|
| 237 |
+
</div>
|
| 238 |
+
</div>
|
| 239 |
+
<h3 class="font-semibold text-white truncate group-hover:text-cyan-400 transition">${track.title}</h3>
|
| 240 |
+
<p class="text-sm text-gray-400 truncate">${track.genre || 'Electronic'}</p>
|
| 241 |
+
<div class="mt-2 flex items-center gap-3 text-xs text-gray-500">
|
| 242 |
+
<span class="flex items-center gap-1"><i data-lucide="play-circle" class="w-3 h-3"></i>${track.plays}</span>
|
| 243 |
+
<span>${track.duration}</span>
|
| 244 |
+
</div>
|
| 245 |
+
</div>
|
| 246 |
+
`).join('')}
|
| 247 |
+
</div>
|
| 248 |
+
`;
|
| 249 |
+
}
|
| 250 |
+
} else {
|
| 251 |
+
document.getElementById('notLoggedIn').classList.remove('hidden');
|
| 252 |
+
document.getElementById('loggedIn').classList.add('hidden');
|
| 253 |
+
}
|
| 254 |
+
|
| 255 |
+
lucide.createIcons();
|
| 256 |
+
</script>
|
| 257 |
+
</body>
|
responsive.css
CHANGED
|
@@ -6,6 +6,30 @@ html, body {
|
|
| 6 |
overflow-x: hidden;
|
| 7 |
}
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
img {
|
| 10 |
max-width: 100%;
|
| 11 |
height: auto;
|
|
|
|
| 6 |
overflow-x: hidden;
|
| 7 |
}
|
| 8 |
|
| 9 |
+
/* ===== Bottom Tab Bar (injected by app.js, these are overrides) ===== */
|
| 10 |
+
@media (max-width: 767px) {
|
| 11 |
+
.bottom-tab-bar {
|
| 12 |
+
padding-bottom: env(safe-area-inset-bottom, 0px) !important;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
.bottom-tab-center {
|
| 16 |
+
top: -12px !important;
|
| 17 |
+
width: 52px !important;
|
| 18 |
+
height: 52px !important;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
.bottom-tab span {
|
| 22 |
+
font-size: 9px !important;
|
| 23 |
+
}
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
@media (min-width: 768px) {
|
| 27 |
+
/* On desktop, ensure content doesn't have extra bottom padding for tab bar */
|
| 28 |
+
body {
|
| 29 |
+
padding-bottom: 6rem !important;
|
| 30 |
+
}
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
img {
|
| 34 |
max-width: 100%;
|
| 35 |
height: auto;
|
search.html
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Search - BeatFridge</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script src="https://unpkg.com/lucide@latest"></script>
|
| 9 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
|
| 10 |
+
<link rel="stylesheet" href="responsive.css">
|
| 11 |
+
<style>
|
| 12 |
+
* { font-family: 'Inter', sans-serif; }
|
| 13 |
+
body { background-color: #0a0a0a; color: #ffffff; }
|
| 14 |
+
::-webkit-scrollbar { width: 8px; }
|
| 15 |
+
::-webkit-scrollbar-track { background: #0a0a0a; }
|
| 16 |
+
::-webkit-scrollbar-thumb { background: #2d2d2d; border-radius: 4px; }
|
| 17 |
+
.glass { background: rgba(20,20,20,0.6); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.08); }
|
| 18 |
+
.glass-panel { background: rgba(30,30,30,0.4); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.05); }
|
| 19 |
+
.neon-text { background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
|
| 20 |
+
.track-card { transition: all 0.3s cubic-bezier(0.4,0,0.2,1); }
|
| 21 |
+
.track-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -10px rgba(0,212,255,0.15); }
|
| 22 |
+
.play-btn-overlay { opacity: 0; transition: all 0.3s ease; }
|
| 23 |
+
.track-card:hover .play-btn-overlay { opacity: 1; }
|
| 24 |
+
.glow-cyan { box-shadow: 0 0 20px rgba(0,212,255,0.3); }
|
| 25 |
+
.sticky-player { position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; }
|
| 26 |
+
.avatar-ring { box-shadow: 0 0 0 4px #0a0a0a, 0 0 0 6px rgba(0,212,255,0.5); }
|
| 27 |
+
</style>
|
| 28 |
+
</head>
|
| 29 |
+
<body class="bg-black text-white overflow-x-hidden">
|
| 30 |
+
|
| 31 |
+
<!-- Top Navigation -->
|
| 32 |
+
<nav class="fixed top-0 left-0 right-0 z-40 glass border-b border-white/5">
|
| 33 |
+
<div class="max-w-[1600px] mx-auto px-4 sm:px-6 h-14 flex items-center justify-between">
|
| 34 |
+
<div class="flex items-center gap-6">
|
| 35 |
+
<a href="index.html" class="flex items-center gap-2">
|
| 36 |
+
<div class="w-8 h-8 rounded-lg flex items-center justify-center bg-white/10 border border-white/20">
|
| 37 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-5 h-5 text-white"><rect x="4" y="2" width="16" height="20" rx="2"/><line x1="4" y1="9" x2="20" y2="9"/><line x1="15" y1="5" x2="15" y2="7"/><line x1="15" y1="12" x2="15" y2="18"/></svg>
|
| 38 |
+
</div>
|
| 39 |
+
<span class="text-lg font-bold tracking-tight hidden sm:inline">BeatFridge</span>
|
| 40 |
+
</a>
|
| 41 |
+
<div class="hidden md:flex items-center gap-5 text-sm font-medium text-gray-400">
|
| 42 |
+
<a href="index.html" class="hover:text-cyan-400 transition">Home</a>
|
| 43 |
+
<a href="search.html" class="text-cyan-400">Search</a>
|
| 44 |
+
<a href="upload.html" class="hover:text-cyan-400 transition flex items-center gap-1"><i data-lucide="upload-cloud" class="w-4 h-4"></i>Upload</a>
|
| 45 |
+
<a href="library.html" class="hover:text-cyan-400 transition">Library</a>
|
| 46 |
+
</div>
|
| 47 |
+
</div>
|
| 48 |
+
<div class="flex items-center gap-3">
|
| 49 |
+
<div class="w-9 h-9 rounded-full bg-gradient-to-br from-cyan-400 to-purple-600 cursor-pointer hover:scale-105 transition avatar-ring overflow-hidden" onclick="BF.isLoggedIn() ? window.location.href='profile.html' : BF.showSignInModal()">
|
| 50 |
+
<img id="topNavAvatar" src="http://static.photos/people/200x200/42" alt="Profile" class="w-full h-full rounded-full object-cover">
|
| 51 |
+
</div>
|
| 52 |
+
</div>
|
| 53 |
+
</div>
|
| 54 |
+
</nav>
|
| 55 |
+
|
| 56 |
+
<!-- Main Content -->
|
| 57 |
+
<main class="max-w-[1600px] mx-auto pt-16 px-4 sm:px-6 pb-32 md:pb-24">
|
| 58 |
+
|
| 59 |
+
<!-- Search Header -->
|
| 60 |
+
<div class="pt-6 pb-6">
|
| 61 |
+
<h1 class="text-2xl sm:text-3xl font-bold mb-4 neon-text">Search</h1>
|
| 62 |
+
<div class="relative">
|
| 63 |
+
<input type="text" id="searchInput" placeholder="Search artists, tracks, genres..."
|
| 64 |
+
class="w-full bg-white/5 border border-white/10 rounded-2xl px-5 py-4 pl-12 text-base focus:outline-none focus:border-cyan-500/50 focus:bg-white/10 transition text-white placeholder-gray-500"
|
| 65 |
+
oninput="handleSearch(this.value)" autofocus>
|
| 66 |
+
<i data-lucide="search" class="w-5 h-5 absolute left-4 top-1/2 -translate-y-1/2 text-gray-400"></i>
|
| 67 |
+
<button id="clearSearch" class="hidden absolute right-4 top-1/2 -translate-y-1/2 text-gray-400 hover:text-white transition" onclick="clearSearch()">
|
| 68 |
+
<i data-lucide="x" class="w-5 h-5"></i>
|
| 69 |
+
</button>
|
| 70 |
+
</div>
|
| 71 |
+
</div>
|
| 72 |
+
|
| 73 |
+
<!-- Browse Genres (shown when no search) -->
|
| 74 |
+
<div id="browseSection">
|
| 75 |
+
<h2 class="text-lg font-semibold mb-4 flex items-center gap-2">
|
| 76 |
+
<i data-lucide="grid" class="w-5 h-5 text-cyan-400"></i>
|
| 77 |
+
Browse by Genre
|
| 78 |
+
</h2>
|
| 79 |
+
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-3 mb-8" id="genreGrid"></div>
|
| 80 |
+
|
| 81 |
+
<h2 class="text-lg font-semibold mb-4 flex items-center gap-2">
|
| 82 |
+
<i data-lucide="users" class="w-5 h-5 text-purple-400"></i>
|
| 83 |
+
Popular Artists
|
| 84 |
+
</h2>
|
| 85 |
+
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4" id="popularArtists"></div>
|
| 86 |
+
</div>
|
| 87 |
+
|
| 88 |
+
<!-- Search Results -->
|
| 89 |
+
<div id="resultsSection" class="hidden">
|
| 90 |
+
<!-- Results Tabs -->
|
| 91 |
+
<div class="flex items-center gap-4 border-b border-white/10 mb-6">
|
| 92 |
+
<button class="px-4 py-3 text-sm font-medium text-white border-b-2 border-cyan-400" onclick="setResultTab('all')" id="tabAll">All</button>
|
| 93 |
+
<button class="px-4 py-3 text-sm font-medium text-gray-400 hover:text-white transition" onclick="setResultTab('artists')" id="tabArtists">Artists</button>
|
| 94 |
+
<button class="px-4 py-3 text-sm font-medium text-gray-400 hover:text-white transition" onclick="setResultTab('tracks')" id="tabTracks">Tracks</button>
|
| 95 |
+
</div>
|
| 96 |
+
|
| 97 |
+
<!-- Artists Results -->
|
| 98 |
+
<div id="artistResults" class="mb-8">
|
| 99 |
+
<h3 class="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-4">Artists</h3>
|
| 100 |
+
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4" id="artistResultGrid"></div>
|
| 101 |
+
</div>
|
| 102 |
+
|
| 103 |
+
<!-- Tracks Results -->
|
| 104 |
+
<div id="trackResults">
|
| 105 |
+
<h3 class="text-sm font-semibold text-gray-400 uppercase tracking-wider mb-4">Tracks</h3>
|
| 106 |
+
<div class="space-y-2" id="trackResultList"></div>
|
| 107 |
+
</div>
|
| 108 |
+
|
| 109 |
+
<!-- No Results -->
|
| 110 |
+
<div id="noResults" class="hidden text-center py-16">
|
| 111 |
+
<div class="w-16 h-16 rounded-full bg-white/5 flex items-center justify-center mx-auto mb-4">
|
| 112 |
+
<i data-lucide="search-x" class="w-8 h-8 text-gray-500"></i>
|
| 113 |
+
</div>
|
| 114 |
+
<h3 class="text-xl font-semibold text-gray-300 mb-2">No results found</h3>
|
| 115 |
+
<p class="text-gray-500">Try different keywords or browse genres</p>
|
| 116 |
+
</div>
|
| 117 |
+
</div>
|
| 118 |
+
|
| 119 |
+
</main>
|
| 120 |
+
|
| 121 |
+
<!-- Sticky Bottom Player -->
|
| 122 |
+
<div class="sticky-player glass border-t border-white/10 px-4 py-3">
|
| 123 |
+
<div class="max-w-[1600px] mx-auto flex items-center gap-4">
|
| 124 |
+
<div class="flex items-center gap-3 w-48 sm:w-64 flex-shrink-0">
|
| 125 |
+
<div class="w-12 h-12 sm:w-14 sm:h-14 rounded-lg overflow-hidden flex-shrink-0">
|
| 126 |
+
<img id="playerArt" src="http://static.photos/technology/200x200/5" class="w-full h-full object-cover">
|
| 127 |
+
</div>
|
| 128 |
+
<div class="min-w-0 flex-1">
|
| 129 |
+
<p id="playerTitle" class="text-sm font-medium text-white truncate">Midnight Synthesis</p>
|
| 130 |
+
<p id="playerArtist" class="text-xs text-gray-400 truncate">Aurora Void</p>
|
| 131 |
+
</div>
|
| 132 |
+
</div>
|
| 133 |
+
<div class="flex-1 flex items-center justify-center max-w-2xl mx-auto">
|
| 134 |
+
<button class="w-10 h-10 rounded-full bg-white text-black flex items-center justify-center hover:scale-105 transition" onclick="BF.togglePlay()">
|
| 135 |
+
<i data-lucide="play" class="w-5 h-5 fill-current ml-0.5" id="playIcon"></i>
|
| 136 |
+
</button>
|
| 137 |
+
</div>
|
| 138 |
+
<div class="hidden sm:flex items-center gap-3 w-48 sm:w-64 justify-end">
|
| 139 |
+
<div class="flex items-center gap-2"><i data-lucide="volume-2" class="w-5 h-5 text-gray-400"></i><div class="w-20 h-1 bg-white/10 rounded-full overflow-hidden"><div class="h-full bg-cyan-400 w-[70%] rounded-full"></div></div></div>
|
| 140 |
+
</div>
|
| 141 |
+
</div>
|
| 142 |
+
</div>
|
| 143 |
+
|
| 144 |
+
<script src="app.js"></script>
|
| 145 |
+
<script>
|
| 146 |
+
BF.init('search');
|
| 147 |
+
let currentResultTab = 'all';
|
| 148 |
+
|
| 149 |
+
// Genre grid
|
| 150 |
+
const genreColors = { cyan: 'from-cyan-900/40 to-cyan-800/20 border-cyan-500/20 hover:border-cyan-500/40', purple: 'from-purple-900/40 to-purple-800/20 border-purple-500/20 hover:border-purple-500/40', orange: 'from-orange-900/40 to-orange-800/20 border-orange-500/20 hover:border-orange-500/40', pink: 'from-pink-900/40 to-pink-800/20 border-pink-500/20 hover:border-pink-500/40', green: 'from-green-900/40 to-green-800/20 border-green-500/20 hover:border-green-500/40', red: 'from-red-900/40 to-red-800/20 border-red-500/20 hover:border-red-500/40' };
|
| 151 |
+
const genreIcons = { cyan: 'waves', purple: 'cloud', orange: 'flame', pink: 'zap', green: 'leaf', red: 'activity' };
|
| 152 |
+
|
| 153 |
+
document.getElementById('genreGrid').innerHTML = BF.getGenres().map(g => `
|
| 154 |
+
<a href="#" class="glass-panel rounded-xl p-5 text-center cursor-pointer transition bg-gradient-to-br ${genreColors[g.color]} border" onclick="document.getElementById('searchInput').value='${g.name}'; handleSearch('${g.name}'); return false;">
|
| 155 |
+
<div class="w-10 h-10 rounded-full bg-${g.color}-500/20 flex items-center justify-center mx-auto mb-3"><i data-lucide="${genreIcons[g.color]}" class="w-5 h-5 text-${g.color}-400"></i></div>
|
| 156 |
+
<p class="font-medium text-white">${g.name}</p>
|
| 157 |
+
</a>
|
| 158 |
+
`).join('');
|
| 159 |
+
|
| 160 |
+
// Popular artists
|
| 161 |
+
document.getElementById('popularArtists').innerHTML = BF.getArtists().map(a => `
|
| 162 |
+
<a href="artist.html" class="glass-panel rounded-xl p-4 text-center group cursor-pointer hover:bg-white/5 transition">
|
| 163 |
+
<div class="w-20 h-20 rounded-full overflow-hidden mx-auto mb-3 ${a.verified ? 'avatar-ring' : ''}">
|
| 164 |
+
<img src="${a.image}" class="w-full h-full object-cover">
|
| 165 |
+
</div>
|
| 166 |
+
<h3 class="text-sm font-semibold text-white truncate group-hover:text-cyan-400 transition">${a.name}</h3>
|
| 167 |
+
<p class="text-xs text-gray-500">${a.followers} followers</p>
|
| 168 |
+
</a>
|
| 169 |
+
`).join('');
|
| 170 |
+
|
| 171 |
+
// Search handler
|
| 172 |
+
let searchTimeout;
|
| 173 |
+
function handleSearch(query) {
|
| 174 |
+
clearTimeout(searchTimeout);
|
| 175 |
+
const clearBtn = document.getElementById('clearSearch');
|
| 176 |
+
clearBtn.classList.toggle('hidden', !query);
|
| 177 |
+
|
| 178 |
+
if (!query.trim()) {
|
| 179 |
+
document.getElementById('browseSection').classList.remove('hidden');
|
| 180 |
+
document.getElementById('resultsSection').classList.add('hidden');
|
| 181 |
+
return;
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
searchTimeout = setTimeout(() => {
|
| 185 |
+
const artists = BF.searchArtists(query);
|
| 186 |
+
const tracks = BF.searchTracks(query);
|
| 187 |
+
showResults(artists, tracks, query);
|
| 188 |
+
}, 200);
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
function showResults(artists, tracks, query) {
|
| 192 |
+
document.getElementById('browseSection').classList.add('hidden');
|
| 193 |
+
document.getElementById('resultsSection').classList.remove('hidden');
|
| 194 |
+
|
| 195 |
+
const hasResults = artists.length || tracks.length;
|
| 196 |
+
document.getElementById('noResults').classList.toggle('hidden', hasResults);
|
| 197 |
+
document.getElementById('artistResults').classList.toggle('hidden', !artists.length || currentResultTab === 'tracks');
|
| 198 |
+
document.getElementById('trackResults').classList.toggle('hidden', !tracks.length || currentResultTab === 'artists');
|
| 199 |
+
|
| 200 |
+
// Artists
|
| 201 |
+
document.getElementById('artistResultGrid').innerHTML = artists.slice(0, 10).map(a => `
|
| 202 |
+
<a href="artist.html" class="glass-panel rounded-xl p-4 text-center group cursor-pointer hover:bg-white/5 transition">
|
| 203 |
+
<div class="w-20 h-20 rounded-full overflow-hidden mx-auto mb-3 ${a.verified ? 'avatar-ring' : ''}">
|
| 204 |
+
<img src="${a.image}" class="w-full h-full object-cover">
|
| 205 |
+
</div>
|
| 206 |
+
<h3 class="text-sm font-semibold text-white truncate group-hover:text-cyan-400 transition">${a.name}</h3>
|
| 207 |
+
<p class="text-xs text-gray-500">${a.followers} followers</p>
|
| 208 |
+
</a>
|
| 209 |
+
`).join('');
|
| 210 |
+
|
| 211 |
+
// Tracks
|
| 212 |
+
document.getElementById('trackResultList').innerHTML = tracks.slice(0, 20).map(track => `
|
| 213 |
+
<div class="flex items-center gap-3 p-3 rounded-xl hover:bg-white/5 transition cursor-pointer group" onclick="BF.playTrack(${JSON.stringify(track).replace(/"/g, '"')})">
|
| 214 |
+
<div class="w-12 h-12 rounded-lg overflow-hidden flex-shrink-0 relative">
|
| 215 |
+
<img src="${track.image}" class="w-full h-full object-cover">
|
| 216 |
+
<div class="absolute inset-0 bg-black/50 flex items-center justify-center opacity-0 group-hover:opacity-100 transition">
|
| 217 |
+
<i data-lucide="play" class="w-4 h-4 text-cyan-400 fill-current"></i>
|
| 218 |
+
</div>
|
| 219 |
+
</div>
|
| 220 |
+
<div class="flex-1 min-w-0">
|
| 221 |
+
<h4 class="text-sm font-medium text-white truncate group-hover:text-cyan-400 transition">${track.title}</h4>
|
| 222 |
+
<p class="text-xs text-gray-500 truncate">${track.artist} β’ ${track.plays} plays</p>
|
| 223 |
+
</div>
|
| 224 |
+
<span class="text-xs text-gray-600 hidden sm:inline">${track.duration}</span>
|
| 225 |
+
</div>
|
| 226 |
+
`).join('');
|
| 227 |
+
|
| 228 |
+
lucide.createIcons();
|
| 229 |
+
}
|
| 230 |
+
|
| 231 |
+
function setResultTab(tab) {
|
| 232 |
+
currentResultTab = tab;
|
| 233 |
+
document.querySelectorAll('[id^="tab"]').forEach(t => { t.classList.remove('text-white', 'border-b-2', 'border-cyan-400'); t.classList.add('text-gray-400'); });
|
| 234 |
+
document.getElementById('tab' + tab.charAt(0).toUpperCase() + tab.slice(1)).classList.add('text-white', 'border-b-2', 'border-cyan-400');
|
| 235 |
+
document.getElementById('tab' + tab.charAt(0).toUpperCase() + tab.slice(1)).classList.remove('text-gray-400');
|
| 236 |
+
|
| 237 |
+
const q = document.getElementById('searchInput').value;
|
| 238 |
+
if (q) {
|
| 239 |
+
const a = BF.searchArtists(q);
|
| 240 |
+
const t = BF.searchTracks(q);
|
| 241 |
+
showResults(a, t, q);
|
| 242 |
+
}
|
| 243 |
+
}
|
| 244 |
+
|
| 245 |
+
function clearSearch() {
|
| 246 |
+
document.getElementById('searchInput').value = '';
|
| 247 |
+
document.getElementById('browseSection').classList.remove('hidden');
|
| 248 |
+
document.getElementById('resultsSection').classList.add('hidden');
|
| 249 |
+
document.getElementById('clearSearch').classList.add('hidden');
|
| 250 |
+
document.getElementById('searchInput').focus();
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
// Check for genre param in URL
|
| 254 |
+
const params = new URLSearchParams(window.location.search);
|
| 255 |
+
const genreParam = params.get('genre');
|
| 256 |
+
if (genreParam) {
|
| 257 |
+
document.getElementById('searchInput').value = genreParam;
|
| 258 |
+
handleSearch(genreParam);
|
| 259 |
+
}
|
| 260 |
+
|
| 261 |
+
lucide.createIcons();
|
| 262 |
+
</script>
|
| 263 |
+
</body>
|
| 264 |
+
</html>
|
track.html
CHANGED
|
@@ -638,8 +638,9 @@
|
|
| 638 |
</div>
|
| 639 |
</div>
|
| 640 |
|
| 641 |
-
<script src="
|
| 642 |
<script>
|
|
|
|
| 643 |
lucide.createIcons();
|
| 644 |
|
| 645 |
// Global State with error handling
|
|
|
|
| 638 |
</div>
|
| 639 |
</div>
|
| 640 |
|
| 641 |
+
<script src="app.js"></script>
|
| 642 |
<script>
|
| 643 |
+
BF.init('home');
|
| 644 |
lucide.createIcons();
|
| 645 |
|
| 646 |
// Global State with error handling
|
upload.html
CHANGED
|
@@ -502,406 +502,7 @@
|
|
| 502 |
</p>
|
| 503 |
</div>
|
| 504 |
</div>
|
| 505 |
-
</
|
| 506 |
-
|
| 507 |
-
<!-- Audio Upload Zone -->
|
| 508 |
-
<div class="glass-panel rounded-2xl p-6">
|
| 509 |
-
<h3 class="text-sm font-semibold text-gray-300 mb-4 flex items-center gap-2">
|
| 510 |
-
<i data-lucide="music" class="w-4 h-4 text-cyan-400"></i>
|
| 511 |
-
Audio File
|
| 512 |
-
</h3>
|
| 513 |
-
|
| 514 |
-
<div class="upload-zone rounded-xl p-8 text-center cursor-pointer" id="audioUpload" onclick="document.getElementById('audioInput').click()">
|
| 515 |
-
<input type="file" id="audioInput" accept="audio/*" class="hidden" onchange="handleAudioUpload(this)">
|
| 516 |
-
|
| 517 |
-
<div id="uploadPrompt">
|
| 518 |
-
<div class="w-16 h-16 rounded-full bg-white/5 flex items-center justify-center mx-auto mb-4">
|
| 519 |
-
<i data-lucide="upload-cloud" class="w-8 h-8 text-cyan-400"></i>
|
| 520 |
-
</div>
|
| 521 |
-
<p class="text-white font-medium mb-1">Drop your audio file here</p>
|
| 522 |
-
<p class="text-sm text-gray-500 mb-4">MP3, WAV, FLAC up to 500MB</p>
|
| 523 |
-
<button class="px-4 py-2 bg-white/10 hover:bg-white/20 border border-white/20 rounded-lg text-sm transition">
|
| 524 |
-
Browse Files
|
| 525 |
-
</button>
|
| 526 |
-
</div>
|
| 527 |
-
|
| 528 |
-
<div id="uploadProgress" class="hidden">
|
| 529 |
-
<div class="flex items-center gap-3 mb-4">
|
| 530 |
-
<div class="w-10 h-10 rounded-lg bg-cyan-500/20 flex items-center justify-center">
|
| 531 |
-
<i data-lucide="file-audio" class="w-5 h-5 text-cyan-400"></i>
|
| 532 |
-
</div>
|
| 533 |
-
<div class="flex-1 text-left">
|
| 534 |
-
<p class="text-sm font-medium text-white" id="fileName">track_master_final.wav</p>
|
| 535 |
-
<p class="text-xs text-gray-500" id="fileSize">48.5 MB β’ WAV</p>
|
| 536 |
-
</div>
|
| 537 |
-
<button class="text-gray-400 hover:text-white transition" onclick="event.stopPropagation(); resetUpload()">
|
| 538 |
-
<i data-lucide="x" class="w-5 h-5"></i>
|
| 539 |
-
</button>
|
| 540 |
-
</div>
|
| 541 |
-
<div class="h-2 bg-white/10 rounded-full overflow-hidden">
|
| 542 |
-
<div class="progress-bar h-full w-[0%]" id="progressBar"></div>
|
| 543 |
-
</div>
|
| 544 |
-
<p class="text-xs text-gray-500 mt-2 text-left" id="progressText">Uploading... 0%</p>
|
| 545 |
-
</div>
|
| 546 |
-
|
| 547 |
-
<div id="uploadComplete" class="hidden">
|
| 548 |
-
<div class="flex items-center gap-3">
|
| 549 |
-
<div class="w-10 h-10 rounded-lg bg-green-500/20 flex items-center justify-center">
|
| 550 |
-
<i data-lucide="check" class="w-5 h-5 text-green-400"></i>
|
| 551 |
-
</div>
|
| 552 |
-
<div class="flex-1 text-left">
|
| 553 |
-
<p class="text-sm font-medium text-white" id="completeFileName">track_master_final.wav</p>
|
| 554 |
-
<p class="text-xs text-green-400 flex items-center gap-1">
|
| 555 |
-
<i data-lucide="check-circle" class="w-3 h-3"></i>
|
| 556 |
-
Upload complete
|
| 557 |
-
</p>
|
| 558 |
-
</div>
|
| 559 |
-
<button class="text-gray-400 hover:text-white transition" onclick="event.stopPropagation(); resetUpload()">
|
| 560 |
-
<i data-lucide="x" class="w-5 h-5"></i>
|
| 561 |
-
</button>
|
| 562 |
-
</div>
|
| 563 |
-
|
| 564 |
-
<!-- Waveform Preview -->
|
| 565 |
-
<div class="mt-4 h-16 bg-white/5 rounded-lg overflow-hidden relative">
|
| 566 |
-
<div class="absolute inset-0 flex items-center justify-center gap-[2px] px-4">
|
| 567 |
-
${Array(60).fill(0).map(() => `
|
| 568 |
-
<div class="w-1 bg-cyan-400/50 rounded-full" style="height: ${20 + Math.random() * 80}%"></div>
|
| 569 |
-
`).join('')}
|
| 570 |
-
</div>
|
| 571 |
-
</div>
|
| 572 |
-
</div>
|
| 573 |
-
</div>
|
| 574 |
-
</div>
|
| 575 |
-
|
| 576 |
-
<!-- Pro Feature: Exclusive Content -->
|
| 577 |
-
<div class="glass-panel rounded-2xl p-6 mb-6 ${!isPro ? 'opacity-50' : ''}">
|
| 578 |
-
<div class="flex items-center justify-between mb-4">
|
| 579 |
-
<h3 class="text-sm font-semibold text-gray-300 flex items-center gap-2">
|
| 580 |
-
<i data-lucide="crown" class="w-4 h-4 text-orange-400"></i>
|
| 581 |
-
Monetization
|
| 582 |
-
${!isPro ? '<span class="ml-2 px-2 py-0.5 rounded bg-orange-500/20 text-orange-400 text-xs">PRO</span>' : ''}
|
| 583 |
-
</h3>
|
| 584 |
-
</div>
|
| 585 |
-
|
| 586 |
-
<div class="space-y-4 ${!isPro ? 'pointer-events-none' : ''}">
|
| 587 |
-
<label class="flex items-start gap-3 cursor-pointer">
|
| 588 |
-
<input type="checkbox" id="isExclusive" class="w-4 h-4 rounded border-white/10 bg-white/5 text-orange-400 focus:ring-orange-400 mt-0.5" onchange="toggleMonetization(this)">
|
| 589 |
-
<div>
|
| 590 |
-
<p class="text-sm text-white">Make this track exclusive</p>
|
| 591 |
-
<p class="text-xs text-gray-500 mt-1">Only subscribers or purchasers can access the full track</p>
|
| 592 |
-
</div>
|
| 593 |
-
</label>
|
| 594 |
-
|
| 595 |
-
<div id="pricingOptions" class="hidden space-y-3 pl-7">
|
| 596 |
-
<div>
|
| 597 |
-
<label class="block text-xs font-medium text-gray-500 uppercase tracking-wider mb-2">Price</label>
|
| 598 |
-
<div class="flex gap-2">
|
| 599 |
-
<select class="bg-white/5 border border-white/10 rounded-xl px-4 py-2 text-sm text-white [&>option]:bg-gray-900">
|
| 600 |
-
<option value="eur">β¬ EUR</option>
|
| 601 |
-
<option value="usd">$ USD</option>
|
| 602 |
-
</select>
|
| 603 |
-
<input type="number" placeholder="2.99" step="0.01" min="0.99"
|
| 604 |
-
class="flex-1 bg-white/5 border border-white/10 rounded-xl px-4 py-2 text-sm focus:outline-none focus:border-orange-500/50 transition text-white">
|
| 605 |
-
</div>
|
| 606 |
-
</div>
|
| 607 |
-
|
| 608 |
-
<div>
|
| 609 |
-
<label class="block text-xs font-medium text-gray-500 uppercase tracking-wider mb-2">Or require tier</label>
|
| 610 |
-
<select class="w-full bg-white/5 border border-white/10 rounded-xl px-4 py-2 text-sm focus:outline-none focus:border-orange-500/50 transition text-white [&>option]:bg-gray-900">
|
| 611 |
-
<option value="any">Any paid tier</option>
|
| 612 |
-
<option value="supporter">Supporter (β¬3+)</option>
|
| 613 |
-
<option value="producer">Producer Circle (β¬8+)</option>
|
| 614 |
-
<option value="vip">VIP Patron (β¬15+)</option>
|
| 615 |
-
</select>
|
| 616 |
-
</div>
|
| 617 |
-
|
| 618 |
-
<div class="p-3 rounded-lg bg-orange-500/10 border border-orange-500/20">
|
| 619 |
-
<p class="text-xs text-orange-400 flex items-center gap-2">
|
| 620 |
-
<i data-lucide="info" class="w-4 h-4"></i>
|
| 621 |
-
You'll earn 85% of each sale. Platform fee: 15%
|
| 622 |
-
</p>
|
| 623 |
-
</div>
|
| 624 |
-
</div>
|
| 625 |
-
</div>
|
| 626 |
-
|
| 627 |
-
${!isPro ? `
|
| 628 |
-
<div class="mt-4 p-4 rounded-xl bg-gradient-to-r from-orange-500/20 to-purple-500/20 border border-orange-500/30 text-center">
|
| 629 |
-
<p class="text-sm text-white font-medium mb-2">Upgrade to Pro to monetize</p>
|
| 630 |
-
<p class="text-xs text-gray-400 mb-3">Unlock exclusive content features and earn from your music</p>
|
| 631 |
-
<button class="px-4 py-2 rounded-lg bg-orange-500 text-black text-sm font-semibold hover:bg-orange-400 transition glow-orange" onclick="showProUpgrade()">
|
| 632 |
-
Upgrade to Pro
|
| 633 |
-
</button>
|
| 634 |
-
</div>
|
| 635 |
-
` : ''}
|
| 636 |
-
</div>
|
| 637 |
-
|
| 638 |
-
<!-- Metadata Editor -->
|
| 639 |
-
<div class="glass-panel rounded-2xl p-6">
|
| 640 |
-
<h3 class="text-sm font-semibold text-gray-300 mb-4 flex items-center gap-2">
|
| 641 |
-
<i data-lucide="edit-3" class="w-4 h-4 text-cyan-400"></i>
|
| 642 |
-
Track Information
|
| 643 |
-
</h3>
|
| 644 |
-
|
| 645 |
-
<div class="space-y-4">
|
| 646 |
-
<!-- Title -->
|
| 647 |
-
<div>
|
| 648 |
-
<label class="block text-xs font-medium text-gray-500 uppercase tracking-wider mb-2">Title *</label>
|
| 649 |
-
<input type="text" placeholder="Enter track title"
|
| 650 |
-
class="w-full bg-white/5 border border-white/10 rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-cyan-500/50 transition"
|
| 651 |
-
id="trackTitle">
|
| 652 |
-
</div>
|
| 653 |
-
|
| 654 |
-
<!-- Genre -->
|
| 655 |
-
<div>
|
| 656 |
-
<label class="block text-xs font-medium text-gray-500 uppercase tracking-wider mb-2">Genre *</label>
|
| 657 |
-
<select class="w-full bg-white/5 border border-white/10 rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-cyan-500/50 transition text-white [&>option]:bg-gray-900">
|
| 658 |
-
<option value="">Select a genre</option>
|
| 659 |
-
<option value="techno">Techno</option>
|
| 660 |
-
<option value="house">House</option>
|
| 661 |
-
<option value="deep-house">Deep House</option>
|
| 662 |
-
<option value="amapiano">Amapiano</option>
|
| 663 |
-
<option value="trap">Trap</option>
|
| 664 |
-
<option value="ambient">Ambient</option>
|
| 665 |
-
<option value="synthwave">Synthwave</option>
|
| 666 |
-
<option value="drum-bass">Drum & Bass</option>
|
| 667 |
-
<option value="lo-fi">Lo-Fi</option>
|
| 668 |
-
<option value="experimental">Experimental</option>
|
| 669 |
-
</select>
|
| 670 |
-
</div>
|
| 671 |
-
|
| 672 |
-
<!-- Tags -->
|
| 673 |
-
<div>
|
| 674 |
-
<label class="block text-xs font-medium text-gray-500 uppercase tracking-wider mb-2">Tags</label>
|
| 675 |
-
<div class="w-full bg-white/5 border border-white/10 rounded-xl px-3 py-2 flex flex-wrap gap-2 min-h-[46px]" id="tagContainer" onclick="document.getElementById('tagInput').focus()">
|
| 676 |
-
<input type="text" id="tagInput" class="tag-input py-1.5" placeholder="Add tags (press Enter)" onkeydown="handleTagInput(event)">
|
| 677 |
-
</div>
|
| 678 |
-
<p class="text-xs text-gray-600 mt-2">Add up to 10 tags to help people find your track</p>
|
| 679 |
-
</div>
|
| 680 |
-
|
| 681 |
-
<!-- Description -->
|
| 682 |
-
<div>
|
| 683 |
-
<label class="block text-xs font-medium text-gray-500 uppercase tracking-wider mb-2">Description</label>
|
| 684 |
-
<textarea placeholder="Tell the story behind this track, production details, gear used..."
|
| 685 |
-
class="w-full bg-white/5 border border-white/10 rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-cyan-500/50 transition h-32 resize-none"></textarea>
|
| 686 |
-
</div>
|
| 687 |
-
</div>
|
| 688 |
-
</div>
|
| 689 |
-
|
| 690 |
-
<!-- Artwork Upload -->
|
| 691 |
-
<div class="glass-panel rounded-2xl p-6">
|
| 692 |
-
<h3 class="text-sm font-semibold text-gray-300 mb-4 flex items-center gap-2">
|
| 693 |
-
<i data-lucide="image" class="w-4 h-4 text-cyan-400"></i>
|
| 694 |
-
Artwork
|
| 695 |
-
</h3>
|
| 696 |
-
|
| 697 |
-
<div class="flex items-start gap-6">
|
| 698 |
-
<div class="w-40 h-40 rounded-xl bg-white/5 border border-white/10 border-dashed flex items-center justify-center flex-shrink-0 overflow-hidden relative group cursor-pointer" onclick="document.getElementById('artworkInput').click()">
|
| 699 |
-
<input type="file" id="artworkInput" accept="image/*" class="hidden" onchange="handleArtworkUpload(this)">
|
| 700 |
-
<div id="artworkPlaceholder" class="text-center p-4">
|
| 701 |
-
<i data-lucide="image-plus" class="w-8 h-8 text-gray-500 mx-auto mb-2"></i>
|
| 702 |
-
<p class="text-xs text-gray-500">Click to upload</p>
|
| 703 |
-
</div>
|
| 704 |
-
<img id="artworkPreview" class="w-full h-full object-cover hidden">
|
| 705 |
-
<div class="absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition flex items-center justify-center hidden" id="artworkOverlay">
|
| 706 |
-
<span class="text-sm font-medium">Change</span>
|
| 707 |
-
</div>
|
| 708 |
-
</div>
|
| 709 |
-
|
| 710 |
-
<div class="flex-1">
|
| 711 |
-
<p class="text-sm text-white font-medium mb-2">Upload cover art</p>
|
| 712 |
-
<p class="text-sm text-gray-500 mb-4">Recommended size: 1400x1400px (JPG or PNG)</p>
|
| 713 |
-
<button class="px-4 py-2 bg-white/10 hover:bg-white/20 border border-white/20 rounded-lg text-sm transition" onclick="document.getElementById('artworkInput').click()">
|
| 714 |
-
Choose File
|
| 715 |
-
</button>
|
| 716 |
-
</div>
|
| 717 |
-
</div>
|
| 718 |
-
</div>
|
| 719 |
-
|
| 720 |
-
</div>
|
| 721 |
-
|
| 722 |
-
<!-- Right Column - Settings -->
|
| 723 |
-
<div class="space-y-6">
|
| 724 |
-
|
| 725 |
-
<!-- Visibility -->
|
| 726 |
-
<div class="glass-panel rounded-2xl p-6">
|
| 727 |
-
<h3 class="text-sm font-semibold text-gray-300 mb-4 flex items-center gap-2">
|
| 728 |
-
<i data-lucide="eye" class="w-4 h-4 text-cyan-400"></i>
|
| 729 |
-
Visibility
|
| 730 |
-
</h3>
|
| 731 |
-
|
| 732 |
-
<div class="space-y-3">
|
| 733 |
-
<div class="visibility-option selected p-4 rounded-xl border border-white/10 cursor-pointer" onclick="setVisibility(this, 'public')">
|
| 734 |
-
<div class="flex items-start gap-3">
|
| 735 |
-
<i data-lucide="globe" class="w-5 h-5 text-cyan-400 mt-0.5"></i>
|
| 736 |
-
<div>
|
| 737 |
-
<p class="text-sm font-medium text-white">Public</p>
|
| 738 |
-
<p class="text-xs text-gray-500 mt-1">Anyone can search for and listen to this track</p>
|
| 739 |
-
</div>
|
| 740 |
-
</div>
|
| 741 |
-
</div>
|
| 742 |
-
|
| 743 |
-
<div class="visibility-option p-4 rounded-xl border border-white/10 cursor-pointer" onclick="setVisibility(this, 'private')">
|
| 744 |
-
<div class="flex items-start gap-3">
|
| 745 |
-
<i data-lucide="lock" class="w-5 h-5 text-gray-400 mt-0.5"></i>
|
| 746 |
-
<div>
|
| 747 |
-
<p class="text-sm font-medium text-white">Private</p>
|
| 748 |
-
<p class="text-xs text-gray-500 mt-1">Only you can listen to this track</p>
|
| 749 |
-
</div>
|
| 750 |
-
</div>
|
| 751 |
-
</div>
|
| 752 |
-
|
| 753 |
-
<div class="visibility-option p-4 rounded-xl border border-white/10 cursor-pointer" onclick="setVisibility(this, 'scheduled')">
|
| 754 |
-
<div class="flex items-start gap-3">
|
| 755 |
-
<i data-lucide="calendar" class="w-5 h-5 text-gray-400 mt-0.5"></i>
|
| 756 |
-
<div>
|
| 757 |
-
<p class="text-sm font-medium text-white">Scheduled</p>
|
| 758 |
-
<p class="text-xs text-gray-500 mt-1">Set a release date for this track</p>
|
| 759 |
-
</div>
|
| 760 |
-
</div>
|
| 761 |
-
</div>
|
| 762 |
-
</div>
|
| 763 |
-
</div>
|
| 764 |
-
|
| 765 |
-
<!-- Additional Settings -->
|
| 766 |
-
<div class="glass-panel rounded-2xl p-6">
|
| 767 |
-
<h3 class="text-sm font-semibold text-gray-300 mb-4 flex items-center gap-2">
|
| 768 |
-
<i data-lucide="settings" class="w-4 h-4 text-cyan-400"></i>
|
| 769 |
-
Additional Settings
|
| 770 |
-
</h3>
|
| 771 |
-
|
| 772 |
-
<div class="space-y-4">
|
| 773 |
-
<label class="flex items-start gap-3 cursor-pointer">
|
| 774 |
-
<input type="checkbox" class="w-4 h-4 rounded border-white/10 bg-white/5 text-cyan-400 focus:ring-cyan-400 mt-0.5" checked>
|
| 775 |
-
<div>
|
| 776 |
-
<p class="text-sm text-white">Enable downloads</p>
|
| 777 |
-
<p class="text-xs text-gray-500 mt-1">Allow listeners to download this track</p>
|
| 778 |
-
</div>
|
| 779 |
-
</label>
|
| 780 |
-
|
| 781 |
-
<label class="flex items-start gap-3 cursor-pointer">
|
| 782 |
-
<input type="checkbox" class="w-4 h-4 rounded border-white/10 bg-white/5 text-cyan-400 focus:ring-cyan-400 mt-0.5">
|
| 783 |
-
<div>
|
| 784 |
-
<p class="text-sm text-white">Include in RSS feed</p>
|
| 785 |
-
<p class="text-xs text-gray-500 mt-1">Add to your podcast RSS feed</p>
|
| 786 |
-
</div>
|
| 787 |
-
</label>
|
| 788 |
-
|
| 789 |
-
<label class="flex items-start gap-3 cursor-pointer">
|
| 790 |
-
<input type="checkbox" class="w-4 h-4 rounded border-white/10 bg-white/5 text-cyan-400 focus:ring-cyan-400 mt-0.5" checked>
|
| 791 |
-
<div>
|
| 792 |
-
<p class="text-sm text-white">Enable comments</p>
|
| 793 |
-
<p class="text-xs text-gray-500 mt-1">Allow listeners to comment on this track</p>
|
| 794 |
-
</div>
|
| 795 |
-
</label>
|
| 796 |
-
</div>
|
| 797 |
-
</div>
|
| 798 |
-
|
| 799 |
-
<!-- License -->
|
| 800 |
-
<div class="glass-panel rounded-2xl p-6">
|
| 801 |
-
<h3 class="text-sm font-semibold text-gray-300 mb-4 flex items-center gap-2">
|
| 802 |
-
<i data-lucide="copyright" class="w-4 h-4 text-cyan-400"></i>
|
| 803 |
-
License
|
| 804 |
-
</h3>
|
| 805 |
-
|
| 806 |
-
<select class="w-full bg-white/5 border border-white/10 rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-cyan-500/50 transition text-white [&>option]:bg-gray-900">
|
| 807 |
-
<option value="all-rights">All Rights Reserved</option>
|
| 808 |
-
<option value="cc-by">Creative Commons (CC BY)</option>
|
| 809 |
-
<option value="cc-by-nc">Creative Commons Non-Commercial</option>
|
| 810 |
-
<option value="cc0">Public Domain (CC0)</option>
|
| 811 |
-
</select>
|
| 812 |
-
</div>
|
| 813 |
-
|
| 814 |
-
<!-- Action Buttons -->
|
| 815 |
-
<div class="flex gap-3">
|
| 816 |
-
<button class="flex-1 px-4 py-3 bg-white/10 hover:bg-white/20 border border-white/20 rounded-xl text-sm font-medium transition" onclick="saveDraft()">
|
| 817 |
-
Save Draft
|
| 818 |
-
</button>
|
| 819 |
-
<button class="flex-1 px-4 py-3 bg-cyan-500 hover:bg-cyan-400 text-black font-semibold rounded-xl transition glow-cyan" onclick="publishTrack()">
|
| 820 |
-
Publish
|
| 821 |
-
</button>
|
| 822 |
-
</div>
|
| 823 |
-
|
| 824 |
-
</div>
|
| 825 |
-
</div>
|
| 826 |
-
</div>
|
| 827 |
-
|
| 828 |
-
<!-- Sticky Bottom Player -->
|
| 829 |
-
<div class="sticky-player glass border-t border-white/10 px-4 py-3">
|
| 830 |
-
<div class="max-w-[1600px] mx-auto flex items-center gap-4">
|
| 831 |
-
|
| 832 |
-
<!-- Track Info -->
|
| 833 |
-
<div class="flex items-center gap-3 w-64 flex-shrink-0">
|
| 834 |
-
<div class="w-14 h-14 rounded-lg overflow-hidden relative group cursor-pointer">
|
| 835 |
-
<img id="playerArt" src="http://static.photos/technology/200x200/1" class="w-full h-full object-cover">
|
| 836 |
-
<div class="absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition flex items-center justify-center">
|
| 837 |
-
<i data-lucide="maximize-2" class="w-5 h-5"></i>
|
| 838 |
-
</div>
|
| 839 |
-
</div>
|
| 840 |
-
<div class="min-w-0 flex-1">
|
| 841 |
-
<p id="playerTitle" class="text-sm font-medium text-white truncate cursor-pointer hover:text-cyan-400 transition" onclick="window.location.href='track.html'">Midnight Synthesis</p>
|
| 842 |
-
<p id="playerArtist" class="text-xs text-gray-400 truncate cursor-pointer hover:text-cyan-400 transition" onclick="window.location.href='artist.html'">Aurora Void</p>
|
| 843 |
-
</div>
|
| 844 |
-
<button class="text-gray-400 hover:text-cyan-400 transition">
|
| 845 |
-
<i data-lucide="heart" class="w-5 h-5"></i>
|
| 846 |
-
</button>
|
| 847 |
-
</div>
|
| 848 |
-
|
| 849 |
-
<!-- Controls -->
|
| 850 |
-
<div class="flex-1 flex flex-col items-center max-w-2xl mx-auto">
|
| 851 |
-
<div class="flex items-center gap-6 mb-2">
|
| 852 |
-
<button class="text-gray-400 hover:text-white transition" onclick="toggleShuffle(this)">
|
| 853 |
-
<i data-lucide="shuffle" class="w-4 h-4"></i>
|
| 854 |
-
</button>
|
| 855 |
-
<button class="text-gray-300 hover:text-white transition" onclick="previousTrack()">
|
| 856 |
-
<i data-lucide="skip-back" class="w-5 h-5 fill-current"></i>
|
| 857 |
-
</button>
|
| 858 |
-
<button class="w-10 h-10 rounded-full bg-white text-black flex items-center justify-center hover:scale-105 transition" onclick="togglePlay()" id="playPauseBtn">
|
| 859 |
-
<i data-lucide="play" class="w-5 h-5 fill-current ml-0.5" id="playIcon"></i>
|
| 860 |
-
</button>
|
| 861 |
-
<button class="text-gray-300 hover:text-white transition" onclick="nextTrack()">
|
| 862 |
-
<i data-lucide="skip-forward" class="w-5 h-5 fill-current"></i>
|
| 863 |
-
</button>
|
| 864 |
-
<button class="text-gray-400 hover:text-white transition" onclick="toggleRepeat(this)">
|
| 865 |
-
<i data-lucide="repeat" class="w-4 h-4"></i>
|
| 866 |
-
</button>
|
| 867 |
-
</div>
|
| 868 |
-
|
| 869 |
-
<!-- Progress -->
|
| 870 |
-
<div class="w-full flex items-center gap-3">
|
| 871 |
-
<span class="text-xs text-gray-400 w-10 text-right" id="currentTime">1:24</span>
|
| 872 |
-
<div class="flex-1 h-8 flex items-center cursor-pointer group" id="progressContainer">
|
| 873 |
-
<div class="w-full h-1.5 bg-white/10 rounded-full overflow-hidden relative">
|
| 874 |
-
<div class="absolute inset-y-0 left-0 bg-gradient-to-r from-cyan-400 to-purple-500 w-[30%] rounded-full group-hover:h-2 transition-all"></div>
|
| 875 |
-
<div class="absolute top-1/2 -translate-y-1/2 left-[30%] w-3 h-3 bg-white rounded-full opacity-0 group-hover:opacity-100 transition shadow-lg"></div>
|
| 876 |
-
</div>
|
| 877 |
-
</div>
|
| 878 |
-
<span class="text-xs text-gray-400 w-10" id="duration">4:32</span>
|
| 879 |
-
</div>
|
| 880 |
-
</div>
|
| 881 |
-
|
| 882 |
-
<!-- Volume & Extra -->
|
| 883 |
-
<div class="flex items-center gap-3 w-64 justify-end">
|
| 884 |
-
<button class="text-gray-400 hover:text-white transition">
|
| 885 |
-
<i data-lucide="mic-2" class="w-4 h-4"></i>
|
| 886 |
-
</button>
|
| 887 |
-
<button class="text-gray-400 hover:text-white transition">
|
| 888 |
-
<i data-lucide="list-music" class="w-4 h-4"></i>
|
| 889 |
-
</button>
|
| 890 |
-
<div class="flex items-center gap-2 group">
|
| 891 |
-
<button class="text-gray-400 hover:text-white transition" onclick="toggleMute()">
|
| 892 |
-
<i data-lucide="volume-2" class="w-5 h-5" id="volumeIcon"></i>
|
| 893 |
-
</button>
|
| 894 |
-
<div class="w-24 h-1 bg-white/10 rounded-full overflow-hidden cursor-pointer">
|
| 895 |
-
<div class="h-full bg-cyan-400 w-[70%] rounded-full"></div>
|
| 896 |
-
</div>
|
| 897 |
-
</div>
|
| 898 |
-
<button class="text-gray-400 hover:text-white transition ml-2">
|
| 899 |
-
<i data-lucide="cast" class="w-4 h-4"></i>
|
| 900 |
-
</button>
|
| 901 |
-
</div>
|
| 902 |
-
</div>
|
| 903 |
-
</div>
|
| 904 |
-
|
| 905 |
<script>
|
| 906 |
lucide.createIcons();
|
| 907 |
|
|
|
|
| 502 |
</p>
|
| 503 |
</div>
|
| 504 |
</div>
|
| 505 |
+
<script src="app.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 506 |
<script>
|
| 507 |
lucide.createIcons();
|
| 508 |
|