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|
|
|
|
|
|
|
|
|
| 1 |
+
window.tailwind.config = {
|
| 2 |
+
theme: {
|
| 3 |
+
extend: {
|
| 4 |
+
colors: {
|
| 5 |
+
gray: { 850: '#1a1a2e', 900: '#111827', 1000: '#0B0B0B' },
|
| 6 |
+
eva: { green: '#017D63', teal: '#BDD9D4', gold: '#FFD679' }
|
| 7 |
+
},
|
| 8 |
+
fontFamily: { unbounded: ['Unbounded', 'sans-serif'], inter: ['Inter', 'sans-serif'] }
|
| 9 |
+
}
|
| 10 |
+
}
|
| 11 |
+
};
|
| 12 |
+
const newGames = [
|
| 13 |
+
{ title: "Royal Easter", img: "image/001.jpg", provider: "BGaming" },
|
| 14 |
+
{ title: "Sugar Merge Up", img: "image/002.jpg", provider: "BGaming" },
|
| 15 |
+
{ title: "CULT.", img: "image/003.jpg", provider: "PragmaticPlay" },
|
| 16 |
+
{ title: "Rice & Riches", img: "image/004.jpg", provider: "Mascot" },
|
| 17 |
+
{ title: "Mummyland Treasures", img: "image/005.jpg", provider: "Belatra" },
|
| 18 |
+
{ title: "Mummy Mines", img: "image/006.jpg", provider: "Belatra" },
|
| 19 |
+
{ title: "Olympus Rivals", img: "image/007.jpg", provider: "AmigoGaming" },
|
| 20 |
+
{ title: "Sloteus Gold", img: "image/008.jpg", provider: "Endorphina" },
|
| 21 |
+
{ title: "Fruit Invaders", img: "image/009.jpg", provider: "AmigoGaming" },
|
| 22 |
+
{ title: "Crown Coins", img: "image/010.jpg", provider: "Endorphina" },
|
| 23 |
+
{ title: "Mummy's Jewels 100", img: "image/011.jpg", provider: "PragmaticPlay" },
|
| 24 |
+
{ title: "Sultans Fortune", img: "image/012.jpg", provider: "KAGaming" },
|
| 25 |
+
{ title: "Gold Canyon", img: "image/013.jpg", provider: "Betsoft" },
|
| 26 |
+
{ title: "Burning Hell 3000", img: "image/014.jpg", provider: "Endorphina" },
|
| 27 |
+
{ title: "Jewel Boost Reels", img: "image/015.jpg", provider: "Mascot" },
|
| 28 |
+
];
|
| 29 |
+
|
| 30 |
+
const topGames = [
|
| 31 |
+
{ title: "Striking Diamond 3", img: "image/016.jpg", provider: "Fugaso" },
|
| 32 |
+
{ title: "Mega Thunder", img: "image/017.jpg", provider: "Fugaso" },
|
| 33 |
+
{ title: "Atomic Coins 2", img: "image/010d6409210740aa3f2748721d44408b.png", provider: "Fugaso" },
|
| 34 |
+
{ title: "Bonanza Billion Xtreme", img: "image/100extracrown.webp", provider: "BGaming" },
|
| 35 |
+
{ title: "Merge Up 2", img: "image/10burningheart.webp", provider: "BGaming" },
|
| 36 |
+
{ title: "Mystery Heist", img: "image/15_coins_grand_platinum_edition.jpg", provider: "BGaming" },
|
| 37 |
+
{ title: "Starlight Princess 1000", img: "image/1aacfea064ab96655570ace48a52c850.png", provider: "PragmaticPlay" },
|
| 38 |
+
{ title: "Sweet Rush Bonanza", img: "image/2034d8e5fda33b28beaf7cc9d6b2c916.png", provider: "PragmaticPlay" },
|
| 39 |
+
{ title: "Haunted Crypt", img: "image/3_hot_chillies.webp", provider: "PragmaticPlay" },
|
| 40 |
+
{ title: "Knights vs Barbarians", img: "image/3buzzingwilds.webp", provider: "PragmaticPlay" },
|
| 41 |
+
{ title: "Fortune Bags", img: "image/40powerhotdiceeditiongoldencoinslink.webp", provider: "AmigoGaming" },
|
| 42 |
+
{ title: "Friar Tuck's INN", img: "image/46df9329ff3f8b9b3766bb6561c03de8.png", provider: "Mascot" },
|
| 43 |
+
];
|
| 44 |
+
|
| 45 |
+
const liveGames = [
|
| 46 |
+
{ title: "VIP Blackjack 1", img: "image/58a009ad18e46228614efbaff418c7f1.png", provider: "PragmaticPlayLive" },
|
| 47 |
+
{ title: "Mega Baccarat", img: "image/777_fruity_coins.webp", provider: "PragmaticPlayLive" },
|
| 48 |
+
{ title: "Crazy Time A", img: "image/7ef93054ff2108e4cb61f62168ea2d20.png", provider: "Evolution" },
|
| 49 |
+
{ title: "Super Sic Bo", img: "image/931bb982bf8d8f4b6c32b1249b3fa943.png", provider: "Evolution" },
|
| 50 |
+
{ title: "Lightning Baccarat", img: "image/a_night_in_paris_jp.webp", provider: "Evolution" },
|
| 51 |
+
{ title: "Infinite Blackjack", img: "image/afaf009cfe87f2f7a3de08fdea5d05db.png", provider: "Evolution" },
|
| 52 |
+
{ title: "Speed Baccarat 1", img: "image/aviamasters.webp", provider: "PragmaticPlayLive" },
|
| 53 |
+
{ title: "Craps", img: "image/banana_farm.jpg", provider: "Evolution" },
|
| 54 |
+
];
|
| 55 |
+
if (typeof lucide !== 'undefined') {
|
| 56 |
+
lucide.createIcons();
|
| 57 |
+
}
|
| 58 |
+
function createGameCard(game) {
|
| 59 |
+
return `
|
| 60 |
+
<div class="group relative mb-2 cursor-pointer overflow-hidden rounded-2xl border-2 border-gray-600 bg-gray-1000 game-card-shadow transition-all duration-300 hover:border-yellow-300">
|
| 61 |
+
<div class="aspect-[0.85] overflow-hidden">
|
| 62 |
+
<img src="${game.img}" alt="${game.title}" class="h-full w-full object-cover transition-transform duration-300 group-hover:scale-110" onerror="this.src='http://static.photos/gaming/320x240/1'"/>
|
| 63 |
+
</div>
|
| 64 |
+
<div class="absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/90 via-black/60 to-transparent p-2 pt-8">
|
| 65 |
+
<p class="text-xs font-bold text-white truncate">${game.title}</p>
|
| 66 |
+
<p class="text-[10px] text-gray-400">${game.provider}</p>
|
| 67 |
+
</div>
|
| 68 |
+
<div class="absolute inset-0 flex items-center justify-center bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity duration-300">
|
| 69 |
+
<button class="btn-gold px-4 py-2 text-xs rounded-xl">Играть</button>
|
| 70 |
+
</div>
|
| 71 |
+
</div>
|
| 72 |
+
`;
|
| 73 |
+
}
|
| 74 |
+
function renderGames(containerId, games) {
|
| 75 |
+
const container = document.getElementById(containerId);
|
| 76 |
+
if (container) {
|
| 77 |
+
container.innerHTML = games.map(createGameCard).join('');
|
| 78 |
+
}
|
| 79 |
+
}
|
| 80 |
+
renderGames('newGamesGrid', newGames);
|
| 81 |
+
renderGames('topGamesGrid', topGames);
|
| 82 |
+
renderGames('liveGamesGrid', liveGames);
|
| 83 |
+
const liveWinsContainer = document.getElementById('liveWinsContainer');
|
| 84 |
+
const gameNames = ['Sweet Bonanza', 'Gates of Olympus', 'Big Bass Bonanza', 'Starlight Princess', 'Sugar Rush', 'Book of Dead', 'Reactoonz', 'Fire Joker', 'Dog House', 'Money Train', 'Fruit Party', 'Gems Bonanza'];
|
| 85 |
+
const players = ['Игрок***23', 'Игрок***77', 'Игрок***41', 'Игрок***99', 'Игрок***12', 'Игрок***55', 'Игрок***88', 'Игрок***64'];
|
| 86 |
+
function generateLiveWin() {
|
| 87 |
+
const game = gameNames[Math.floor(Math.random() * gameNames.length)];
|
| 88 |
+
const player = players[Math.floor(Math.random() * players.length)];
|
| 89 |
+
const amount = (Math.floor(Math.random() * 50000) + 500).toLocaleString('ru-RU');
|
| 90 |
+
return `
|
| 91 |
+
<div class="live-win-pulse flex items-center gap-2 rounded-full bg-gray-800 border border-gray-700 px-3 py-1.5 text-xs whitespace-nowrap">
|
| 92 |
+
<span class="text-green-400 font-bold">${amount} ₽</span>
|
| 93 |
+
<span class="text-gray-400">${player}</span>
|
| 94 |
+
<span class="text-gray-500">•</span>
|
| 95 |
+
<span class="text-yellow-300">${game}</span>
|
| 96 |
+
</div>
|
| 97 |
+
`;
|
| 98 |
+
}
|
| 99 |
+
function refreshLiveWins() {
|
| 100 |
+
if (liveWinsContainer) {
|
| 101 |
+
let html = '';
|
| 102 |
+
for (let i = 0; i < 8; i++) {
|
| 103 |
+
html += generateLiveWin();
|
| 104 |
+
}
|
| 105 |
+
liveWinsContainer.innerHTML = html;
|
| 106 |
+
}
|
| 107 |
+
}
|
| 108 |
+
refreshLiveWins();
|
| 109 |
+
setInterval(refreshLiveWins, 5000);
|
| 110 |
+
const seoToggle = document.getElementById('seoToggle');
|
| 111 |
+
const seoContent = document.getElementById('seoContent');
|
| 112 |
+
const seoOverlay = document.getElementById('seoOverlay');
|
| 113 |
+
const seoArrow = document.getElementById('seoArrow');
|
| 114 |
+
let seoExpanded = false;
|
| 115 |
+
seoToggle.addEventListener('click', () => {
|
| 116 |
+
seoExpanded = !seoExpanded;
|
| 117 |
+
if (seoExpanded) {
|
| 118 |
+
seoContent.classList.remove('seo-collapsed');
|
| 119 |
+
seoContent.classList.add('seo-expanded');
|
| 120 |
+
seoOverlay.style.background = 'none';
|
| 121 |
+
seoToggle.innerHTML = `Свернуть <svg width="16" height="16" viewBox="0 0 24 24" fill="none" class="transition-all duration-300 [&_path]:fill-gray-50 rotate-180"><path d="M17.92 8.17969H11.69H6.07999C5.11999 8.17969 4.63999 9.33969 5.31999 10.0197L10.5 15.1997C11.33 16.0297 12.68 16.0297 13.51 15.1997L15.48 13.2297L18.69 10.0197C19.36 9.33969 18.88 8.17969 17.92 8.17969Z" fill="#BDD9D4"/></svg>`;
|
| 122 |
+
} else {
|
| 123 |
+
seoContent.classList.add('seo-collapsed');
|
| 124 |
+
seoContent.classList.remove('seo-expanded');
|
| 125 |
+
seoOverlay.style.background = 'linear-gradient(360deg, #0B0B0B 25%, transparent 85%)';
|
| 126 |
+
seoToggle.innerHTML = `Развернуть <svg width="16" height="16" viewBox="0 0 24 24" fill="none" class="transition-all duration-300 [&_path]:fill-gray-50"><path d="M17.92 8.17969H11.69H6.07999C5.11999 8.17969 4.63999 9.33969 5.31999 10.0197L10.5 15.1997C11.33 16.0297 12.68 16.0297 13.51 15.1997L15.48 13.2297L18.69 10.0197C19.36 9.33969 18.88 8.17969 17.92 8.17969Z" fill="#BDD9D4"/></svg>`;
|
| 127 |
+
}
|
| 128 |
+
});
|
| 129 |
+
const mobileMenuBtn = document.getElementById('mobileMenuBtn');
|
| 130 |
+
const mobileSidebar = document.getElementById('mobileSidebar');
|
| 131 |
+
const mobileSidebarPanel = document.getElementById('mobileSidebarPanel');
|
| 132 |
+
const closeSidebar = document.getElementById('closeSidebar');
|
| 133 |
+
function openMobileSidebar() {
|
| 134 |
+
mobileSidebar.classList.remove('invisible', 'opacity-0');
|
| 135 |
+
mobileSidebar.classList.add('visible', 'opacity-100');
|
| 136 |
+
setTimeout(() => {
|
| 137 |
+
mobileSidebarPanel.style.right = '0';
|
| 138 |
+
}, 10);
|
| 139 |
+
}
|
| 140 |
+
function closeMobileSidebar() {
|
| 141 |
+
mobileSidebarPanel.style.right = '-100%';
|
| 142 |
+
setTimeout(() => {
|
| 143 |
+
mobileSidebar.classList.add('invisible', 'opacity-0');
|
| 144 |
+
mobileSidebar.classList.remove('visible', 'opacity-100');
|
| 145 |
+
}, 300);
|
| 146 |
+
}
|
| 147 |
+
if (mobileMenuBtn) mobileMenuBtn.addEventListener('click', openMobileSidebar);
|
| 148 |
+
if (closeSidebar) closeSidebar.addEventListener('click', closeMobileSidebar);
|
| 149 |
+
if (mobileSidebar) mobileSidebar.addEventListener('click', (e) => {
|
| 150 |
+
if (e.target === mobileSidebar) closeMobileSidebar();
|
| 151 |
+
});
|
| 152 |
+
document.querySelectorAll('.category-tab').forEach(tab => {
|
| 153 |
+
tab.addEventListener('click', () => {
|
| 154 |
+
document.querySelectorAll('.category-tab').forEach(t => {
|
| 155 |
+
t.classList.remove('border-yellow-300', 'bg-gray-700');
|
| 156 |
+
t.classList.add('border-gray-600', 'bg-gray-800');
|
| 157 |
+
});
|
| 158 |
+
tab.classList.add('border-yellow-300', 'bg-gray-700');
|
| 159 |
+
tab.classList.remove('border-gray-600', 'bg-gray-800');
|
| 160 |
+
});
|
| 161 |
+
});
|
| 162 |
+
if (typeof lucide !== 'undefined') {
|
| 163 |
+
lucide.createIcons();
|
| 164 |
+
}
|