import {Component, OnInit} from '@angular/core'; import {Title} from '@angular/platform-browser'; import {ALTITUDE_VERSION} from '../constant'; @Component({ standalone: false, selector: 'app-home', templateUrl: './home.component.html', styleUrl: './home.component.scss' }) export class HomeComponent implements OnInit { constructor(private titleService: Title) {} ngOnInit(): void { this.titleService.setTitle('Survival Minecraft Server on ' + ALTITUDE_VERSION + ' | Altitude Community'); } private slides: string[] = ["/public/img/backgrounds/caruselimage2.png", "/public/img/backgrounds/caruselimage4.png", "/public/img/backgrounds/caruselimage1.png", "/public/img/backgrounds/caruselimage5.png", "/public/img/backgrounds/caruselimage3.png" ]; private slideIndex = 0; get slide(): string { return this.slides[this.slideIndex]; } public previousSlide() { if (this.slideIndex > 0) { this.slideIndex--; } else { this.slideIndex = this.slides.length - 1; } } public nextSlide() { this.slideIndex = (this.slideIndex + 1) % this.slides.length; } public copyToClipboard(text: string) { navigator.clipboard.writeText(text); } protected readonly ALTITUDE_VERSION = ALTITUDE_VERSION; }