BeatFridge / analytics.html
Onttraders's picture
🐳 13/04 - 18:26 - Clicking on the website logo should redirect to the homepage
f5d33cd verified
Raw History Blame Contribute Delete
20.6 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Analytics - BeatFridge Pro</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/lucide@latest"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="responsive.css">
<style>
* {
font-family: 'Inter', sans-serif;
}
body {
background-color: #0a0a0a;
color: #ffffff;
}
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
background: #2d2d2d;
border-radius: 4px;
}
.glass {
background: rgba(20, 20, 20, 0.6);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.08);
}
.glass-panel {
background: rgba(30, 30, 30, 0.4);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border: 1px solid rgba(255, 255, 255, 0.05);
}
.neon-gradient {
background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 50%, #f97316 100%);
}
.premium-glow {
box-shadow: 0 0 30px rgba(249, 115, 22, 0.4);
}
.chart-bar {
background: linear-gradient(to top, #00d4ff, #7c3aed);
transition: height 0.5s ease;
}
.stat-card {
background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
}
</style>
</head>
<body class="bg-black text-white overflow-x-hidden pb-24">
<!-- Navigation -->
<nav class="fixed top-0 left-0 right-0 z-40 glass border-b border-white/5">
<div class="max-w-[1600px] mx-auto px-6 h-16 flex items-center justify-between">
<div class="flex items-center gap-8">
<a href="index.html" class="flex items-center gap-2 cursor-pointer hover:opacity-80 transition">
<div class="w-8 h-8 rounded-lg flex items-center justify-center bg-white/10 border border-white/20">
<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>
</div>
<span class="text-xl font-bold tracking-tight">BeatFridge</span>
</a>
<div class="hidden md:flex items-center gap-6 text-sm font-medium text-gray-400">
<a href="index.html" class="hover:text-cyan-400 transition">Home</a>
<a href="artist.html" class="hover:text-cyan-400 transition">Profile</a>
<a href="upload.html" class="hover:text-cyan-400 transition">Upload</a>
<span class="text-orange-400">Analytics</span>
</div>
</div>
<div class="flex items-center gap-4">
<div class="px-3 py-1 rounded-full bg-orange-500/20 text-orange-400 text-sm font-medium flex items-center gap-2">
<i data-lucide="crown" class="w-4 h-4"></i>
PRO
</div>
<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()">
<i data-lucide="menu" class="w-5 h-5 text-gray-300"></i>
</button>
<div class="w-10 h-10 rounded-full bg-gradient-to-br from-cyan-400 to-purple-600 cursor-pointer hover:scale-105 transition avatar-ring">
<img src="http://static.photos/people/200x200/77" alt="Profile" class="w-full h-full rounded-full object-cover">
</div>
</div>
</div>
</nav>
<!-- Mobile Nav Overlay -->
<div id="mobileNavOverlay" class="mobile-nav-overlay" onclick="closeMobileMenu()"></div>
<div id="mobileNavPanel" class="mobile-nav-panel">
<div class="flex items-center justify-between mb-8">
<a href="index.html" class="flex items-center gap-2 hover:opacity-80 transition">
<div class="w-8 h-8 rounded-lg flex items-center justify-center bg-white/10 border border-white/20">
<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>
</div>
<span class="text-xl font-bold">BeatFridge</span>
</a>
<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">
<i data-lucide="x" class="w-5 h-5"></i>
</button>
</div>
<nav class="space-y-1">
<a href="index.html" class="flex items-center gap-3 px-4 py-3 rounded-xl hover:bg-white/5 transition text-gray-300 hover:text-white">
<i data-lucide="home" class="w-5 h-5"></i> Home
</a>
<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">
<i data-lucide="compass" class="w-5 h-5"></i> Discover
</a>
<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">
<i data-lucide="library" class="w-5 h-5"></i> Library
</a>
<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">
<i data-lucide="upload-cloud" class="w-5 h-5"></i> Upload
</a>
<a href="analytics.html" class="flex items-center gap-3 px-4 py-3 rounded-xl bg-white/5 text-orange-400 font-medium">
<i data-lucide="bar-chart-2" class="w-5 h-5"></i> Analytics
</a>
</nav>
</div>
<!-- Main Layout -->
<div class="max-w-[1600px] mx-auto pt-20 pb-12 px-6 min-h-screen">
<!-- Header -->
<div class="mb-8 flex items-end justify-between">
<div>
<h1 class="text-3xl font-bold mb-2 flex items-center gap-3">
<i data-lucide="bar-chart-2" class="w-8 h-8 text-orange-400"></i>
Artist Analytics
</h1>
<p class="text-gray-400">Track your performance, earnings, and audience growth</p>
</div>
<div class="flex flex-wrap items-center gap-3">
<select class="bg-white/5 border border-white/10 rounded-xl px-4 py-2 text-sm text-white focus:outline-none focus:border-orange-500/50">
<option>Last 7 days</option>
<option>Last 30 days</option>
<option>Last 90 days</option>
<option>All time</option>
</select>
<button class="px-4 py-2 bg-white/10 hover:bg-white/20 border border-white/20 rounded-xl text-sm transition flex items-center gap-2">
<i data-lucide="download" class="w-4 h-4"></i>
<span class="hidden sm:inline">Export</span>
</button>
</div>
</div>
<!-- Revenue Overview -->
<div class="grid grid-cols-1 md:grid-cols-4 gap-4 mb-8">
<div class="glass-panel rounded-2xl p-6 stat-card">
<div class="flex items-center gap-3 mb-4">
<div class="w-10 h-10 rounded-full bg-green-500/20 flex items-center justify-center">
<i data-lucide="dollar-sign" class="w-5 h-5 text-green-400"></i>
</div>
<span class="text-sm text-gray-400">Total Earnings</span>
</div>
<p class="text-3xl font-bold text-white mb-1">€1,247.50</p>
<p class="text-xs text-green-400 flex items-center gap-1">
<i data-lucide="trending-up" class="w-3 h-3"></i>
+23% from last month
</p>
</div>
<div class="glass-panel rounded-2xl p-6">
<div class="flex items-center gap-3 mb-4">
<div class="w-10 h-10 rounded-full bg-cyan-500/20 flex items-center justify-center">
<i data-lucide="play-circle" class="w-5 h-5 text-cyan-400"></i>
</div>
<span class="text-sm text-gray-400">Total Plays</span>
</div>
<p class="text-3xl font-bold text-white mb-1">89.4K</p>
<p class="text-xs text-cyan-400 flex items-center gap-1">
<i data-lucide="trending-up" class="w-3 h-3"></i>
+45% from last month
</p>
</div>
<div class="glass-panel rounded-2xl p-6">
<div class="flex items-center gap-3 mb-4">
<div class="w-10 h-10 rounded-full bg-orange-500/20 flex items-center justify-center">
<i data-lucide="heart-handshake" class="w-5 h-5 text-orange-400"></i>
</div>
<span class="text-sm text-gray-400">Supporters</span>
</div>
<p class="text-3xl font-bold text-white mb-1">68</p>
<p class="text-xs text-orange-400 flex items-center gap-1">
<i data-lucide="trending-up" class="w-3 h-3"></i>
+12 new this month
</p>
</div>
<div class="glass-panel rounded-2xl p-6">
<div class="flex items-center gap-3 mb-4">
<div class="w-10 h-10 rounded-full bg-purple-500/20 flex items-center justify-center">
<i data-lucide="users" class="w-5 h-5 text-purple-400"></i>
</div>
<span class="text-sm text-gray-400">Followers</span>
</div>
<p class="text-3xl font-bold text-white mb-1">128.5K</p>
<p class="text-xs text-purple-400 flex items-center gap-1">
<i data-lucide="trending-up" class="w-3 h-3"></i>
+2.4K this month
</p>
</div>
</div>
<!-- Charts Section -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
<!-- Revenue Chart -->
<div class="lg:col-span-2 glass-panel rounded-2xl p-6">
<div class="flex items-center justify-between mb-6">
<h3 class="font-semibold text-white flex items-center gap-2">
<i data-lucide="trending-up" class="w-5 h-5 text-orange-400"></i>
Revenue Overview
</h3>
<div class="flex gap-2">
<span class="text-xs px-2 py-1 rounded bg-orange-500/20 text-orange-400">Tips: €856</span>
<span class="text-xs px-2 py-1 rounded bg-cyan-500/20 text-cyan-400">Subs: €392</span>
</div>
</div>
<div class="h-64 flex items-end gap-2 px-4" id="revenueChart">
<!-- Chart bars generated by JavaScript -->
</div>
<div class="flex justify-between mt-4 text-xs text-gray-500 px-4">
<span>Jan</span>
<span>Feb</span>
<span>Mar</span>
<span>Apr</span>
<span>May</span>
<span>Jun</span>
<span>Jul</span>
<span>Aug</span>
<span>Sep</span>
<span>Oct</span>
<span>Nov</span>
<span>Dec</span>
</div>
</div>
<!-- Top Tracks -->
<div class="glass-panel rounded-2xl p-6">
<h3 class="font-semibold text-white mb-6 flex items-center gap-2">
<i data-lucide="disc" class="w-5 h-5 text-cyan-400"></i>
Top Performing Tracks
</h3>
<div class="space-y-4">
<div class="flex items-center gap-3 p-3 rounded-xl bg-white/5 hover:bg-white/10 transition cursor-pointer">
<span class="text-lg font-bold text-orange-400 w-6">1</span>
<img src="http://static.photos/technology/100x100/5" class="w-12 h-12 rounded-lg object-cover">
<div class="flex-1 min-w-0">
<p class="font-medium text-white truncate">Midnight Synthesis</p>
<p class="text-xs text-gray-500">32.7K plays β€’ €245 earned</p>
</div>
</div>
<div class="flex items-center gap-3 p-3 rounded-xl bg-white/5 hover:bg-white/10 transition cursor-pointer">
<span class="text-lg font-bold text-gray-400 w-6">2</span>
<img src="http://static.photos/technology/100x100/3" class="w-12 h-12 rounded-lg object-cover">
<div class="flex-1 min-w-0">
<p class="font-medium text-white truncate">Cybernetic Dreams</p>
<p class="text-xs text-gray-500">24.1K plays β€’ €189 earned</p>
</div>
</div>
<div class="flex items-center gap-3 p-3 rounded-xl bg-white/5 hover:bg-white/10 transition cursor-pointer">
<span class="text-lg font-bold text-gray-400 w-6">3</span>
<img src="http://static.photos/technology/100x100/4" class="w-12 h-12 rounded-lg object-cover">
<div class="flex-1 min-w-0">
<p class="font-medium text-white truncate">Analog Heart</p>
<p class="text-xs text-gray-500">15.3K plays β€’ €124 earned</p>
</div>
</div>
</div>
<button class="w-full mt-4 py-2 rounded-xl bg-white/5 hover:bg-white/10 border border-white/10 text-sm text-gray-400 transition">
View All Tracks
</button>
</div>
</div>
<!-- Audience Demographics -->
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="glass-panel rounded-2xl p-6">
<h3 class="font-semibold text-white mb-4 flex items-center gap-2">
<i data-lucide="globe" class="w-5 h-5 text-cyan-400"></i>
Top Countries
</h3>
<div class="space-y-3" id="countryBars"></div>
</div>
<div class="glass-panel rounded-2xl p-6">
<h3 class="font-semibold text-white mb-4 flex items-center gap-2">
<i data-lucide="zap" class="w-5 h-5 text-orange-400"></i>
Boost Performance
</h3>
<div class="p-4 rounded-xl bg-gradient-to-r from-orange-500/20 to-red-500/20 border border-orange-500/30 mb-4">
<div class="flex items-center justify-between mb-2">
<span class="text-sm font-medium text-white">Current Campaign</span>
<span class="text-xs px-2 py-1 rounded bg-orange-500 text-black font-bold">ACTIVE</span>
</div>
<p class="text-xs text-gray-400 mb-3">"Digital Rain" - Premium Boost (5 days remaining)</p>
<div class="h-2 bg-white/10 rounded-full overflow-hidden mb-2">
<div class="h-full bg-orange-500 rounded-full" style="width: 65%"></div>
</div>
<div class="flex justify-between text-xs text-gray-500">
<span>Progress</span>
<span>+12.4K plays</span>
</div>
</div>
<button class="w-full py-2 rounded-xl bg-orange-500/20 hover:bg-orange-500/30 text-orange-400 border border-orange-500/30 text-sm font-medium transition flex items-center justify-center gap-2" onclick="window.location.href='discover.html'">
<i data-lucide="trending-up" class="w-4 h-4"></i>
Boost Another Track
</button>
</div>
</div>
</div>
<script src="app.js"></script>
<script>
BF.init('home');
lucide.createIcons();
// Render country bars
(function renderCountryBars() {
const countries = [
{country: 'Germany', percent: 35, flag: 'πŸ‡©πŸ‡ͺ'},
{country: 'United States', percent: 28, flag: 'πŸ‡ΊπŸ‡Έ'},
{country: 'United Kingdom', percent: 15, flag: 'πŸ‡¬πŸ‡§'},
{country: 'Netherlands', percent: 12, flag: 'πŸ‡³πŸ‡±'},
{country: 'France', percent: 10, flag: 'πŸ‡«πŸ‡·'}
];
const container = document.getElementById('countryBars');
if (!container) return;
container.innerHTML = countries.map(c =>
'<div class="flex items-center gap-3">' +
'<span class="text-xl">' + c.flag + '</span>' +
'<div class="flex-1">' +
'<div class="flex items-center justify-between mb-1">' +
'<span class="text-sm text-white">' + c.country + '</span>' +
'<span class="text-sm text-gray-400">' + c.percent + '%</span>' +
'</div>' +
'<div class="h-2 bg-white/10 rounded-full overflow-hidden">' +
'<div class="h-full bg-gradient-to-r from-cyan-500 to-purple-500 rounded-full" style="width: ' + c.percent + '%"></div>' +
'</div>' +
'</div>' +
'</div>'
).join('');
})();
// Generate chart bars on load
const chartData = [35, 42, 38, 55, 48, 62, 75, 68, 82, 95, 88, 102];
const chartContainer = document.getElementById('revenueChart');
if (chartContainer) {
chartContainer.innerHTML = chartData.map((h, i) => `
<div class="flex-1 flex flex-col items-center gap-2 group cursor-pointer">
<div class="w-full bg-gradient-to-t from-orange-500/50 to-orange-500 rounded-t-sm transition-all hover:from-orange-400 hover:to-orange-300 relative" style="height: ${h}%">
<div class="opacity-0 group-hover:opacity-100 absolute -top-8 left-1/2 -translate-x-1/2 bg-gray-800 px-2 py-1 rounded text-xs whitespace-nowrap transition">
€${(h * 12).toFixed(0)}
</div>
</div>
</div>
`).join('');
}
// Simulate real-time updates
setInterval(() => {
const plays = document.querySelector('.text-3xl.font-bold');
if (plays && plays.textContent.includes('K')) {
// Random small increment simulation
}
}, 5000);
</script>
</body>
</html>