File size: 11,612 Bytes
67fda86 7aec586 67fda86 7aec586 67fda86 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | // CORE64 Records - Main Application Logic
// CMS Data stored in localStorage
const defaultData = {
releases: [
{
id: 1,
title: "Neural Network",
artist: "Cybernetic",
genre: "Neurofunk",
year: "2024",
image: "http://static.photos/technology/640x360/1",
link: "#"
},
{
id: 2,
title: "Dark Matter",
artist: "Synapse",
genre: "Techstep",
year: "2024",
image: "http://static.photos/abstract/640x360/2",
link: "#"
},
{
id: 3,
title: "System Shock",
artist: "Binary Soul",
genre: "Breakbeat",
year: "2023",
image: "http://static.photos/industry/640x360/3",
link: "#"
},
{
id: 4,
title: "Core Dump",
artist: "Null Pointer",
genre: "DnB",
year: "2024",
image: "http://static.photos/technology/640x360/4",
link: "#"
}
],
artists: [
{
id: 1,
name: "Cybernetic",
genre: "Neurofunk",
bio: "Піонер української нейрофанк сцени. Виробляє потужні басові лінії з 2019 року.",
image: "http://static.photos/people/640x360/10",
soundcloud: "#",
instagram: "#"
},
{
id: 2,
name: "Synapse",
genre: "Techstep",
bio: "Майстер темних атмосфер та агресивних ритмів.",
image: "http://static.photos/people/640x360/11",
soundcloud: "#",
instagram: "#"
},
{
id: 3,
name: "Binary Soul",
genre: "Breakbeat",
bio: "Експериментатор, що поєднує класичний брейкбіт з сучасним звучанням.",
image: "http://static.photos/people/640x360/12",
soundcloud: "#",
instagram: "#"
}
],
events: [
{
id: 1,
title: "CORE64 Label Night",
date: "2024-02-15",
time: "22:00",
venue: "Київ, Atlas",
description: "Великий лейбл-ніч з усіма артистами CORE64.",
image: "http://static.photos/nightlife/640x360/20"
},
{
id: 2,
title: "Neurofunk Madness",
date: "2024-03-01",
time: "23:00",
venue: "Львів, !FESTrepublic",
description: "Вечірка присвячена найважчому нейрофанку.",
image: "http://static.photos/nightlife/640x360/21"
}
],
settings: {
title: "CORE64 Records",
about: "CORE64 Records — незалежний музичний лейбл, заснований у 2024 році. Ми спеціалізуємося на найважчих жанрах електронної музики: Neurofunk, Techstep, Darkstep та Breakbeat.",
mission: "Наша місія — підтримувати андерграунд сцену та виводити Drum & Bass на новий рівень. Кожен реліз — це унікальна історія, закодована в звуках синтезаторів та ритмах барабанів.",
email: "demo@core64.records",
password: "core64admin" // Default admin password
}
};
// Initialize data
function initData() {
if (!localStorage.getItem('core64_data')) {
localStorage.setItem('core64_data', JSON.stringify(defaultData));
}
return JSON.parse(localStorage.getItem('core64_data'));
}
// Get data
function getData() {
return JSON.parse(localStorage.getItem('core64_data')) || defaultData;
}
// Save data
function saveData(data) {
localStorage.setItem('core64_data', JSON.stringify(data));
}
// Render releases
function renderReleases() {
const data = getData();
const grid = document.getElementById('releases-grid');
if (!grid) return;
grid.innerHTML = data.releases.map(release => `
<div class="release-card border border-cyan-500/20 rounded-lg overflow-hidden group cursor-pointer">
<div class="relative aspect-square overflow-hidden bg-gray-900">
<img src="${release.image}" alt="${release.title}" class="w-full h-full object-cover vinyl-spin">
<div class="absolute inset-0 bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-4">
<button class="p-3 bg-cyan-400 rounded-full text-black hover:scale-110 transition-transform">
<i data-lucide="play" class="w-6 h-6 fill-current"></i>
</button>
</div>
<div class="absolute top-2 right-2 genre-tag px-3 py-1 text-xs rounded uppercase tracking-wider">
${release.genre}
</div>
</div>
<div class="p-4">
<h3 class="text-xl font-bold text-white mb-1 group-hover:text-cyan-400 transition-colors">${release.title}</h3>
<p class="text-gray-400 text-sm mb-2">${release.artist}</p>
<div class="flex justify-between items-center text-xs text-gray-500 uppercase tracking-wider">
<span>${release.year}</span>
<span class="text-cyan-400">CORE64</span>
</div>
</div>
</div>
`).join('');
// Update stats
const statEl = document.getElementById('stat-releases');
if (statEl) statEl.textContent = data.releases.length;
if (window.lucide) lucide.createIcons();
}
// Render artists
function renderArtists() {
const data = getData();
const grid = document.getElementById('artists-grid');
if (!grid) return;
grid.innerHTML = data.artists.map(artist => `
<div class="card rounded-lg overflow-hidden group">
<div class="relative aspect-[4/3] overflow-hidden">
<img src="${artist.image}" alt="${artist.name}" class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-110">
<div class="absolute inset-0 bg-gradient-to-t from-black via-transparent to-transparent"></div>
<div class="absolute bottom-0 left-0 right-0 p-6">
<span class="inline-block px-3 py-1 bg-pink-500/20 border border-pink-500/50 text-pink-400 text-xs rounded uppercase tracking-wider mb-2">
${artist.genre}
</span>
<h3 class="text-2xl font-bold text-white">${artist.name}</h3>
</div>
</div>
<div class="p-6">
<p class="text-gray-400 text-sm mb-4 line-clamp-2">${artist.bio}</p>
<div class="flex gap-3">
<a href="${artist.soundcloud}" class="p-2 bg-gray-800 rounded hover:bg-cyan-400 hover:text-black transition-colors">
<i data-lucide="music" class="w-4 h-4"></i>
</a>
<a href="${artist.instagram}" class="p-2 bg-gray-800 rounded hover:bg-pink-400 hover:text-black transition-colors">
<i data-lucide="instagram" class="w-4 h-4"></i>
</a>
</div>
</div>
</div>
`).join('');
// Update stats
const statEl = document.getElementById('stat-artists');
if (statEl) statEl.textContent = data.artists.length;
if (window.lucide) lucide.createIcons();
}
// Render events
function renderEvents() {
const data = getData();
const list = document.getElementById('events-list');
if (!list) return;
const sortedEvents = [...data.events].sort((a, b) => new Date(a.date) - new Date(b.date));
list.innerHTML = sortedEvents.map(event => {
const eventDate = new Date(event.date);
const day = eventDate.getDate();
const month = eventDate.toLocaleDateString('uk-UA', { month: 'short' });
return `
<div class="flex flex-col md:flex-row gap-6 p-6 border border-green-500/20 rounded-lg hover:border-green-500/50 transition-colors bg-black/30">
<div class="flex-shrink-0 w-full md:w-48 h-32 overflow-hidden rounded border border-green-500/30">
<img src="${event.image}" alt="${event.title}" class="w-full h-full object-cover">
</div>
<div class="flex-1">
<div class="flex flex-col md:flex-row md:items-center justify-between mb-2">
<h3 class="text-2xl font-bold text-white">${event.title}</h3>
<div class="flex items-center gap-2 text-green-400 mt-2 md:mt-0">
<i data-lucide="calendar" class="w-4 h-4"></i>
<span class="uppercase tracking-wider text-sm">${day} ${month} • ${event.time}</span>
</div>
</div>
<div class="flex items-center gap-2 text-gray-400 mb-3">
<i data-lucide="map-pin" class="w-4 h-4"></i>
<span>${event.venue}</span>
</div>
<p class="text-gray-300">${event.description}</p>
</div>
<div class="flex-shrink-0 flex items-center">
<button class="px-6 py-3 border border-green-400 text-green-400 hover:bg-green-400 hover:text-black transition-all uppercase tracking-wider text-sm font-bold">
Квитки
</button>
</div>
</div>
`;
}).join('');
if (window.lucide) lucide.createIcons();
}
// Mobile menu toggle
function toggleMobileMenu() {
const menu = document.getElementById('mobile-menu');
menu.classList.toggle('hidden');
}
// Scroll to section
function scrollToSection(id) {
const element = document.getElementById(id);
if (element) {
element.scrollIntoView({ behavior: 'smooth' });
// Close mobile menu if open
const mobileMenu = document.getElementById('mobile-menu');
if (mobileMenu) mobileMenu.classList.add('hidden');
}
}
// Contact form handler
function initContactForm() {
const form = document.getElementById('contact-form');
if (form) {
form.addEventListener('submit', (e) => {
e.preventDefault();
alert('Дякуємо за повідомлення! Ми зв\'яжемося з вами найближчим часом.');
form.reset();
});
}
}
// Initialize
document.addEventListener('DOMContentLoaded', () => {
initData();
renderReleases();
renderArtists();
renderEvents();
initContactForm();
// Load about text from settings
const data = getData();
const aboutEl = document.getElementById('about-text');
if (aboutEl && data.settings.about) {
aboutEl.textContent = data.settings.about;
}
// Load mission text from settings
const missionEl = document.getElementById('about-mission');
if (missionEl && data.settings.mission) {
missionEl.textContent = data.settings.mission;
}
}); |