Standardize coding style and formatting across the project

Updated codebase to follow consistent styling for spacing, braces, and indentation. Changes improve readability and align with standardized conventions throughout SCSS, TypeScript, and HTML files.
This commit is contained in:
Teriuihi 2025-04-05 18:19:10 +02:00
parent 5bf9c725f4
commit a993c1cc3e
21 changed files with 107 additions and 86 deletions

View File

@ -27,4 +27,5 @@ const routes: Routes = [
providers: [CookieService],
bootstrap: [AppComponent]
})
export class AppModule { }
export class AppModule {
}

View File

@ -1,4 +1,5 @@
export const ALTITUDE_VERSION = "1.21"
export const enum THEME_MODE {
LIGHT = 'theme-light',
DARK = 'theme-dark'

View File

@ -65,8 +65,7 @@
</div>
<a href="/"><img ngSrc="/public/img/logos/logo.png" alt="Altitude Server Logo" height="319" width="550"></a>
<ul id="nav_list">
<li class="nav_li"><a [id]="[current_page === 'index' ? 'current-page' : null]" class="nav_link"
href="/">Home</a>
<li class="nav_li"><a [id]="getCurrentPageId(['home'])" class="nav_link" href="/">Home</a>
</li>
<li class="nav_li">
<span [id]="getCurrentPageId(['map', 'customfeatures', 'economy', 'events', 'mypet', 'warps',

View File

@ -10,9 +10,9 @@ import {ALTITUDE_VERSION} from '../constant';
export class HeaderComponent {
@Input() title: string = '';
@Input() sub_title: string = '';
@Input() current_page: string = ''
@Input() current_page: string = '';
public active: string = ''
public active: string = '';
@HostListener('window:scroll', [])
onWindowScroll(): void {

View File

@ -14,9 +14,12 @@
<div class="container">
<div class="paragraph">
<h2>Adventure Begins</h2>
<p>You awake in a strange town, where are you? There are residents running about trading with each other and stories of distant realms with more towns. It's time to write your story. Welcome to Altitude, the laid-back community-oriented server that hosts your home for Minecraft.</p>
<p>You awake in a strange town, where are you? There are residents running about trading with each other and
stories of distant realms with more towns. It's time to write your story. Welcome to Altitude, the laid-back
community-oriented server that hosts your home for Minecraft.</p>
</div>
<img ngSrc="/public/img/items/bookquill.png" style="width: 150px; align-self: center; margin: 0 auto;" alt="Alternative Altitude Server Logo"
<img ngSrc="/public/img/items/bookquill.png" style="width: 150px; align-self: center; margin: 0 auto;"
alt="Alternative Altitude Server Logo"
height="150" width="150">
</div>
</section>
@ -38,7 +41,9 @@
<iframe id="discordwidget" src="https://discordapp.com/widget?id=141644560005595136&theme=dark"></iframe>
<div class="paragraph" id="discordp">
<h2>Meet the Community</h2>
<p>Altitude is home to players young and old from all around the globe, and here, everyone is family. Altitude is your place to get together with friends and relax - and maybe enjoy some survival too. Altitude is intended for older players, but all are welcome!</p>
<p>Altitude is home to players young and old from all around the globe, and here, everyone is family. Altitude
is your place to get together with friends and relax - and maybe enjoy some survival too. Altitude is
intended for older players, but all are welcome!</p>
<p>Don't have Discord? Keep up with news and announcements at the <a href="alttd.com/blog">blog</a>.</p>
<div style="display: flex; justify-content: center;">
<a target="_blank" rel="noopener" href="https://discordapp.com/invite/TGqpzCJ">
@ -53,11 +58,14 @@
<section id="section2">
<div class="customcontainer">
<h2 style="color: white; padding-bottom: 35px; font-size:2.8em">Survival Shaped by You</h2>
<p style="color: white; padding-bottom: 35px; margin: auto; font-size: 1.1em;">Altitude is built by the community, for the community. We've added features requested by our members and several custom plugins to create our "perfect" survival experience.</p>
<p style="color: white; padding-bottom: 35px; margin: auto; font-size: 1.1em;">Altitude is built by the
community, for the community. We've added features requested by our members and several custom plugins to
create our "perfect" survival experience.</p>
<div id="customcontainer2">
<div class="customcontainer3">
<h2>McMMO & MyPet</h2>
<p>Two of the most requested plugins on Altitude, level up yourself and your pet with these MMO-based plugins!</p>
<p>Two of the most requested plugins on Altitude, level up yourself and your pet with these MMO-based
plugins!</p>
<a [routerLink]="['/mypet']">
<div class="button-outer">
<span class="button-inner">MyPet Info</span>
@ -66,7 +74,8 @@
</div>
<div class="customcontainer3">
<h2>Dynamic map</h2>
<p>See the world and the players around it in real-time! The map shows the entire survival world with claims and warps.</p>
<p>See the world and the players around it in real-time! The map shows the entire survival world with claims
and warps.</p>
<a [routerLink]="['/map']">
<div class="button-outer">
<span class="button-inner">Visit Map</span>
@ -75,7 +84,8 @@
</div>
<div class="customcontainer3">
<h2>Player Shops</h2>
<p>Our economy is built on player shops, encouraging player interaction and putting the control in your hands.</p>
<p>Our economy is built on player shops, encouraging player interaction and putting the control in your
hands.</p>
<a [routerLink]="['/economy']">
<div class="button-outer">
<span class="button-inner">Shop Guide</span>
@ -101,7 +111,9 @@
</section>
<section style="background: #202020;">
<div class="customcontainer">
<h2 id="quote" style="color: white; font-family: 'minecraft-text',sans-serif; line-height: 1.3em;">"Great community, great people, great server all round . . . If it can bring back my love for minecraft, it could work wonders for you."</h2>
<h2 id="quote" style="color: white; font-family: 'minecraft-text',sans-serif; line-height: 1.3em;">"Great
community, great people, great server all round . . . If it can bring back my love for minecraft, it could
work wonders for you."</h2>
<p style="color: white; margin-top:30px;">- /u/seanhanley1993</p>
</div>
</section>

View File

@ -9,7 +9,8 @@ import {ALTITUDE_VERSION} from '../constant';
styleUrl: './home.component.scss'
})
export class HomeComponent implements OnInit {
constructor(private titleService: Title) {}
constructor(private titleService: Title) {
}
ngOnInit(): void {
this.titleService.setTitle('Survival Minecraft Server on ' + ALTITUDE_VERSION + ' | Altitude Community');
@ -23,6 +24,7 @@ export class HomeComponent implements OnInit {
];
private slideIndex = 0;
get slide(): string {
return this.slides[this.slideIndex];
}

View File

@ -13,7 +13,8 @@ export class ThemeComponent implements OnInit, OnDestroy {
isDarkMode: boolean = false;
private themeSubscription: Subscription | null = null;
constructor(private themeService: ThemeService) {}
constructor(private themeService: ThemeService) {
}
ngOnInit(): void {
this.themeSubscription = this.themeService.theme$.subscribe(theme => {

View File

@ -22,9 +22,14 @@ export class ThemeService {
: THEME_MODE.DARK;
let currentTheme: THEME_MODE;
switch (savedTheme) {
case THEME_MODE.DARK: currentTheme = THEME_MODE.DARK; break;
case THEME_MODE.DARK: {
currentTheme = THEME_MODE.DARK;
break;
}
case THEME_MODE.LIGHT:
default: currentTheme = THEME_MODE.LIGHT;
default: {
currentTheme = THEME_MODE.LIGHT;
}
}
this.setTheme(currentTheme);
}