diff --git a/ASAshop.html b/ASAshop.html index 35a8e19..b0d2cf1 100644 --- a/ASAshop.html +++ b/ASAshop.html @@ -427,7 +427,11 @@ Merch Servers Server Perks + Custom Maps + Bundles + VIP / Subscriptions + Sort: Featured Price: Low → High @@ -472,19 +476,19 @@ { id: 'server3', name: 'Server Class 3', price: 75.00, category: 'servers', tag: 'Server monthly', img: 'img/PrivateServerCLASS03.png', payment: 'https://buy.stripe.com/test_123ost' }, { id: 'slot30', name: 'ASA Server Slot x30 days', price: 5.00, category: 'perks', tag: 'Server Perk monthly', img: 'img/ServerSlotX30.png', payment: 'https://buy.stripe.com/test_123perk' }, - { id: 'mutants', name: 'Mutated Creatures', price: 1.50, category: 'perks', tag: 'Dino Pack One Time Payment 10 non-breedable', img: 'img/MutatedCretures.png', payment: 'https://buy.stripe.com/test_123perk' }, - { id: 'starter', name: 'Starter Pack', price: 1.50, category: 'perks', tag: 'Starter Pack One Time Payment', img: 'img/StarterPack.png', payment: 'https://buy.stripe.com/test_123perk' }, + { id: 'mutants', name: 'Mutated Creatures', price: 1.50, category: 'bundles', tag: 'Dino Pack One Time Payment 10 non-breedable', img: 'img/MutatedCretures.png', payment: 'https://buy.stripe.com/test_123perk' }, + { id: 'starter', name: 'Starter Pack', price: 1.50, category: 'bundles', tag: 'Starter Pack One Time Payment', img: 'img/StarterPack.png', payment: 'https://buy.stripe.com/test_123perk' }, - { id: 'supporter1', name: 'ASA Server Supporter Pack 1', price: 5.00, category: 'perks', tag: 'Server Perk monthly ✨ Perks Included ✨ 💎 50,000 Points every week🎁 50,000 Bonus Points at the start of each wipe 🏅 Exclusive VIP Role on Discord 🔒 Access to the Donator - Only Chat', img: 'img/SP1.png', payment: 'https://buy.stripe.com/test_123perk' }, - { id: 'supporter2', name: 'ASA Server Supporter Pack 2', price: 10.00, category: 'perks', tag: 'Server Perk monthly ✨ Perks Included ✨ 💎 100,000 Points every week🎁 100,000 Bonus Points at the start of each wipe 🏅 Exclusive VIP Role on Discord 🔒 Access to the Donator - Only Chat', img: 'img/SP2.png', payment: 'https://buy.stripe.com/test_123perk' }, - { id: 'supporter3', name: 'ASA Server Supporter Pack 3', price: 15.00, category: 'perks', tag: 'Server Perk monthly ✨ Perks Included ✨ 💎 150,000 Points every week🎁 150,000 Bonus Points at the start of each wipe 🏅 Exclusive VIP Role on Discord 🔒 Access to the Donator - Only Chat', img: 'img/SP3.png', payment: 'https://buy.stripe.com/test_123perk' }, - { id: 'supporter4', name: 'ASA Server Supporter Pack 4', price: 20.00, category: 'perks', tag: 'Server Perk monthly ✨ Perks Included ✨ 💎 500,000 Points every week🎁 500,000 Bonus Points at the start of each wipe 🏅 Exclusive MVP Role on Discord 🔒 Access to the Donator - Only Chat', img: 'img/SP4.png', payment: 'https://buy.stripe.com/test_123perk' }, - { id: 'supporter5', name: 'ASA Server Supporter Pack 5', price: 25.00, category: 'perks', tag: 'Server Perk monthly ✨ Perks Included ✨ 💎 1,000,000 Points every week🎁 1,000,000 Bonus Points at the start of each wipe 🏅 Exclusive MVP Role on Discord 🔒 Access to the Donator - Only Chat', img: 'img/SP5.png', payment: 'https://buy.stripe.com/test_123perk' }, - { id: 'supporter6', name: 'ASA Server Supporter Pack 6', price: 35.00, category: 'perks', tag: 'Server Perk monthly ✨ Perks Included ✨ 💎 1,500,000 Points every week🎁 1,500,000 Bonus Points at the start of each wipe 🏅 Exclusive MVP Role on Discord 🔒 Access to the Donator - Only Chat', img: 'img/SP6.png', payment: 'https://buy.stripe.com/test_123perk' }, + { id: 'supporter1', name: 'ASA Server Supporter Pack 1', price: 5.00, category: 'vip', tag: 'Server Perk monthly ✨ Perks Included ✨ 💎 50,000 Points every week🎁 50,000 Bonus Points at the start of each wipe 🏅 Exclusive VIP Role on Discord 🔒 Access to the Donator - Only Chat', img: 'img/SP1.png', payment: 'https://buy.stripe.com/test_123perk' }, + { id: 'supporter2', name: 'ASA Server Supporter Pack 2', price: 10.00, category: 'vip', tag: 'Server Perk monthly ✨ Perks Included ✨ 💎 100,000 Points every week🎁 100,000 Bonus Points at the start of each wipe 🏅 Exclusive VIP Role on Discord 🔒 Access to the Donator - Only Chat', img: 'img/SP2.png', payment: 'https://buy.stripe.com/test_123perk' }, + { id: 'supporter3', name: 'ASA Server Supporter Pack 3', price: 15.00, category: 'vip', tag: 'Server Perk monthly ✨ Perks Included ✨ 💎 150,000 Points every week🎁 150,000 Bonus Points at the start of each wipe 🏅 Exclusive VIP Role on Discord 🔒 Access to the Donator - Only Chat', img: 'img/SP3.png', payment: 'https://buy.stripe.com/test_123perk' }, + { id: 'supporter4', name: 'ASA Server Supporter Pack 4', price: 20.00, category: 'vip', tag: 'Server Perk monthly ✨ Perks Included ✨ 💎 500,000 Points every week🎁 500,000 Bonus Points at the start of each wipe 🏅 Exclusive MVP Role on Discord 🔒 Access to the Donator - Only Chat', img: 'img/SP4.png', payment: 'https://buy.stripe.com/test_123perk' }, + { id: 'supporter5', name: 'ASA Server Supporter Pack 5', price: 25.00, category: 'vip', tag: 'Server Perk monthly ✨ Perks Included ✨ 💎 1,000,000 Points every week🎁 1,000,000 Bonus Points at the start of each wipe 🏅 Exclusive MVP Role on Discord 🔒 Access to the Donator - Only Chat', img: 'img/SP5.png', payment: 'https://buy.stripe.com/test_123perk' }, + { id: 'supporter6', name: 'ASA Server Supporter Pack 6', price: 35.00, category: 'vip', tag: 'Server Perk monthly ✨ Perks Included ✨ 💎 1,500,000 Points every week🎁 1,500,000 Bonus Points at the start of each wipe 🏅 Exclusive MVP Role on Discord 🔒 Access to the Donator - Only Chat', img: 'img/SP6.png', payment: 'https://buy.stripe.com/test_123perk' }, - { id: 'map-small', name: 'Small Map manipulation', price: 5.00, category: 'servers', tag: 'Small Map manipulation Pack One Time Payment', img: 'img/SmallMap.png', payment: 'https://buy.stripe.com/test_123perk' }, - { id: 'map-medium', name: 'Medium Map manipulation', price: 10.00, category: 'servers', tag: 'Medium Map manipulation Pack One Time Payment', img: 'img/MediumMap.png', payment: 'https://buy.stripe.com/test_123perk' }, - { id: 'map-large', name: 'Large Map manipulation', price: 15.00, category: 'servers', tag: 'Large Map manipulation Pack One Time Payment', img: 'img/LargeMap.png', payment: 'https://buy.stripe.com/test_123perk' }, + { id: 'map-small', name: 'Small Map manipulation', price: 5.00, category: 'maps', tag: 'Small Map manipulation Pack One Time Payment', img: 'img/SmallMap.png', payment: 'https://buy.stripe.com/test_123perk' }, + { id: 'map-medium', name: 'Medium Map manipulation', price: 10.00, category: 'maps', tag: 'Medium Map manipulation Pack One Time Payment', img: 'img/MediumMap.png', payment: 'https://buy.stripe.com/test_123perk' }, + { id: 'map-large', name: 'Large Map manipulation', price: 15.00, category: 'maps', tag: 'Large Map manipulation Pack One Time Payment', img: 'img/LargeMap.png', payment: 'https://buy.stripe.com/test_123perk' }, ]; @@ -603,12 +607,14 @@ const modal = $('#infoModal'); const infoClose = $('#infoClose'); + // Info modals (define once) const modals = { - 'server-class-1': $('#infoModal'), - 'server-class-2': $('#infoModal2'), - 'server-class-3': $('#infoModal3') + 'server-class-1': document.getElementById('infoModal'), + 'server-class-2': document.getElementById('infoModal2'), + 'server-class-3': document.getElementById('infoModal3') }; + // Open correct modal when an Info button is clicked document.body.addEventListener('click', (e) => { const infoBtn = e.target.closest('[data-info]'); if (infoBtn) { @@ -620,6 +626,7 @@ } } + // Close button on any modal const closeBtn = e.target.closest('.modal__close'); if (closeBtn) { const id = closeBtn.getAttribute('data-close'); @@ -631,19 +638,22 @@ } }); - // Backdrop click + ESC close + // Backdrop click closes Object.values(modals).forEach(modal => { - modal.addEventListener('click', e => { + if (!modal) return; + modal.addEventListener('click', (e) => { if (e.target === modal) { modal.classList.remove('open'); modal.setAttribute('aria-hidden', 'true'); } }); }); - document.addEventListener('keydown', e => { + + // Esc closes whichever is open + document.addEventListener('keydown', (e) => { if (e.key === 'Escape') { Object.values(modals).forEach(modal => { - if (modal.classList.contains('open')) { + if (modal && modal.classList.contains('open')) { modal.classList.remove('open'); modal.setAttribute('aria-hidden', 'true'); } @@ -652,6 +662,7 @@ }); + infoClose.addEventListener('click', () => { modal.classList.remove('open'); modal.setAttribute('aria-hidden', 'true');