// Shared JavaScript across all pages console.log('BlockCrafters Haven - Minecraft Hosting App loaded'); // Pricing plans data const pricingPlans = [ { name: "ATOM", image: "https://hosting-minecraft.eu/images/game-play/1.png", monthly: "1.60 EUR", monthlyDiscounted: "1.52 EUR", quarterly: "1.36 EUR", yearly: "1.28 EUR", biennial: "1.12 EUR", features: [ "No player limit", "CPU: 2 x 4300 MHz", "RAM: 2 GB DDR4 2666MHz", "Disk: 40 GB NVMe SSD", "Free MySQL DB: 5 included", "Free Backups: 3 included", "Port Allocations: 10 included", "ANY CORE AND VERSION", "104,000 MODPACKS AND PLUGINS IN THE PANEL", "Free domains for the server" ], orderLink: "https://hosting-minecraft.eu/client/index.php?rp=/store/minecraft/atom&language=english" }, { name: "NANO", image: "https://hosting-minecraft.eu/images/game-play/2.png", monthly: "2.60 EUR", monthlyDiscounted: "2.47 EUR", quarterly: "2.21 EUR", yearly: "2.08 EUR", biennial: "1.82 EUR", features: [ "No player limit", "CPU: 2 x 4300 MHz", "RAM: 3 GB DDR4 2666MHz", "Disk: 50 GB NVMe SSD", "Free MySQL DB: 5 included", "Free Backups: 3 included", "Port Allocations: 10 included", "ANY CORE AND VERSION", "104,000 MODPACKS AND PLUGINS IN THE PANEL", "Free domains for the server" ], orderLink: "https://hosting-minecraft.eu/client/index.php?rp=/store/minecraft/nano&language=english" }, { name: "STEEL", image: "https://hosting-minecraft.eu/images/game-play/5.png", monthly: "3.80 EUR", monthlyDiscounted: "3.61 EUR", quarterly: "3.23 EUR", yearly: "3.04 EUR", biennial: "2.66 EUR", category: "PERFORMANCE", features: [ "No player limit", "CPU: 2 x 5700 MHz ⚡", "RAM: 3 GB DDR5 3600MHz", "Disk: 30 GB NVMe SSD", "Free MySQL DB: 5 included", "Free Backups: 3 included", "Port Allocations: 10 included", "ANY CORE AND VERSION", "104,000 MODPACKS AND PLUGINS IN THE PANEL", "Free domains for the server" ], orderLink: "https://hosting-minecraft.eu/client/index.php?rp=/store/hosting-minecraft-performance/steel&language=english" }, { name: "MICRO", image: "https://hosting-minecraft.eu/images/game-play/3.png", monthly: "3.80 EUR", monthlyDiscounted: "3.61 EUR", quarterly: "3.23 EUR", yearly: "3.04 EUR", biennial: "2.66 EUR", category: "Featured", features: [ "No player limit", "CPU: 2 x 4300 MHz", "RAM: 4 GB DDR4 2666MHz", "Disk: 60 GB NVMe SSD", "Free MySQL DB: 5 included", "Free Backups: 3 included", "Port Allocations: 10 included", "ANY CORE AND VERSION", "104,000 MODPACKS AND PLUGINS IN THE PANEL", "Free domains for the server" ], orderLink: "https://hosting-minecraft.eu/client/index.php?rp=/store/minecraft/micro&language=english" } ]; // FAQ data const faqData = [ { question: "Can I install mods/modpacks?", answer: "Yes. You can upload ABSOLUTELY ANY modpacks and mods to your server, either with one click from the control panel or via SFTP." }, { question: "How quickly will I receive the server after purchase?", answer: "In most cases, you receive the server instantly. However, there may sometimes be delays of a few hours in activation due to a high queue." }, { question: "If I don't like the service, can I get my money back?", answer: "A refund is possible only if there were errors on our part, such as prolonged technical work." }, { question: "I can't start my server, what should I do?", answer: "Don't panic 🙂 Remember, if your server doesn't start, it means you've configured it incorrectly." } ]; // Locations data const locationsData = [ { name: "Warsaw, Poland", image: "https://hosting-minecraft.eu/images/maps/poland.svg" }, { name: "Falkenstein, Germany", image: "https://hosting-minecraft.eu/images/maps/germany.svg" }, { name: "Helsinki, Finland", image: "https://hosting-minecraft.eu/images/maps/finland.svg" }, { name: "Strasbourg, France", image: "https://hosting-minecraft.eu/images/maps/france.svg" }, { name: "Washington, D.C - USA", image: "https://hosting-minecraft.eu/images/maps/usa.svg" } ]; // Initialize the application document.addEventListener('DOMContentLoaded', function() { initializePricingCards(); initializeFAQ(); initializeLocations(); initializeAnimations(); }); // Initialize pricing cards function initializePricingCards() { const pricingGrid = document.getElementById('pricing-grid'); if (!pricingGrid) return; pricingPlans.forEach(plan => { const card = createPricingCard(plan); pricingGrid.appendChild(card); }); // Re-initialize feather icons after cards are created setTimeout(() => { if (typeof feather !== 'undefined') { feather.replace(); } }, 100); } // Create individual pricing card function createPricingCard(plan) { const card = document.createElement('div'); card.className = 'pricing-card bg-gray-900/50 p-6 rounded-xl border border-gray-700 hover:border-primary transition-all duration-300'; card.innerHTML = ` ${plan.category ? `
${faq.answer}
`; faqGrid.appendChild(faqItem); }); } // Initialize locations section function initializeLocations() { const locationsGrid = document.getElementById('locations-grid'); if (!locationsGrid) return; locationsData.forEach(location => { const locationCard = document.createElement('div'); locationCard.className = 'bg-gray-900/50 p-6 rounded-xl border border-gray-700 text-center"> locationCard.innerHTML = `