AltitudeWeb/frontend/src/app/app.component.ts
akastijn ebe66c87c0 Rework folder structure in frontend
Pages are now grouped per group they appear in on in the header (where possible)
Utilities used by multiple pages in the project are grouped in folders such as services/pipes/etc
2025-07-04 19:50:21 +02:00

44 lines
1.9 KiB
TypeScript

import {Component, OnInit} from '@angular/core';
import {Meta, Title} from '@angular/platform-browser';
import {ALTITUDE_VERSION} from '@custom-types/constant';
import {Router, RouterOutlet} from '@angular/router';
import {FooterComponent} from '@pages/footer/footer/footer.component';
@Component({
standalone: true,
selector: 'app-root',
templateUrl: './app.component.html',
styleUrl: './app.component.scss',
imports: [
RouterOutlet,
FooterComponent
]
})
export class AppComponent implements OnInit {
title = 'Survival Minecraft Server on ' + ALTITUDE_VERSION + '! | Altitude Community';
title_og = 'Community-centered ' + ALTITUDE_VERSION + ' Survival Minecraft Server';
description = 'Start your adventure today! We are a ' +
ALTITUDE_VERSION + ' survival community with McMMO, MyPet, Dynmap, & player shop based economy. ' +
'Monthly server events. Best community in ' + ALTITUDE_VERSION + '!';
description_og = 'Start your adventure today! We host ' +
ALTITUDE_VERSION + ' survival with features suggested by our community: McMMO, MyPet, Dynmap, & economy. ' +
'Monthly server events...';
keywords = 'minecraft,survival,server,servers,community,small,vanilla,semivanilla,dynmap,mcmmo,griefing,' +
ALTITUDE_VERSION + ',altitude,alttd,play,join,find,friends,friendly,simple,private,whitelist,whitelisted,creative,' +
'worldedit'
constructor(private titleService: Title, private metaService: Meta, private router: Router) {
}
ngOnInit(): void {
this.titleService.setTitle(this.title)
this.metaService.updateTag({name: 'description', content: this.description});
this.metaService.updateTag({name: 'twitter:description', content: this.description_og})
this.metaService.updateTag({name: 'og:title', content: this.title_og})
this.metaService.updateTag({name: 'og:description', content: this.description_og})
this.metaService.updateTag({name: 'keywords', content: this.keywords})
}
}