import { CommonModule } from '@angular/common';
import { Component, OnDestroy, OnInit, HostListener } from '@angular/core';
import { Navigation } from './components/navigation/navigation';
import { Feature } from './interfaces/feature';
import { Plan } from './interfaces/plan';
import { Stat } from './interfaces/stat';
import { Footer } from './components/footer/footer';
@Component({
selector: 'app-root',
imports: [CommonModule, Navigation, Footer],
templateUrl: './app.html',
styleUrl: './app.css'
})
export class App implements OnInit, OnDestroy {
mobileMenuOpen = false;
scrolled = false;
stats: Stat[] = [
{ value: '99.9%', label: 'Uptime' },
{ value: '10k+', label: 'Servers' },
{ value: '24/7', label: 'Support' },
{ value: '<1min', label: 'Setup Time' }
];
features: Feature[] = [
{
icon: '',
title: 'Lightning Fast',
description: 'NVMe SSDs and powerful CPUs ensure zero lag and instant world loading.'
},
{
icon: '',
title: 'DDoS Protected',
description: 'Enterprise-grade protection keeps your server online during attacks.'
},
{
icon: '',
title: 'Instant Deploy',
description: 'Your server goes live in under 60 seconds. No waiting, just playing.'
},
{
icon: '',
title: '24/7 Support',
description: 'Expert team ready to help anytime via chat, ticket, or Discord.'
}
];
plans: Plan[] = [
{
name: 'Starter',
price: '$5',
players: '10 Players',
ram: '2GB RAM',
storage: '10GB SSD',
features: ['DDoS Protection', 'Instant Setup', 'Daily Backups', 'Mod Support']
},
{
name: 'Pro',
price: '$15',
players: '50 Players',
ram: '6GB RAM',
storage: '30GB SSD',
features: ['DDoS Protection', 'Instant Setup', 'Daily Backups', 'Mod Support', 'Priority Support', 'Free Subdomain'],
popular: true
},
{
name: 'Ultimate',
price: '$30',
players: 'Unlimited',
ram: '16GB RAM',
storage: '100GB SSD',
features: ['DDoS Protection', 'Instant Setup', 'Daily Backups', 'Mod Support', 'Priority Support', 'Free Subdomain', 'Dedicated IP', 'Custom Plugins']
},
{
name: 'Custom',
price: '$$$',
players: 'Unlimited',
ram: 'Up to 128GB RAM',
storage: 'Up to 2TB',
features: ['DDoS Protection', 'Instant Setup', 'Daily Backups', 'Mod Support', 'Priority Support', 'Free Subdomain', 'Dedicated IP', 'Custom Plugins', 'Priority Support']
},
];
ngOnInit(): void {
window.addEventListener('scroll', this.onWindowScroll.bind(this));
}
ngOnDestroy(): void {
window.removeEventListener('scroll', this.onWindowScroll.bind(this));
}
@HostListener('window:scroll', [])
onWindowScroll(): void {
this.scrolled = window.scrollY > 50;
}
}