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:
parent
5bf9c725f4
commit
a993c1cc3e
|
|
@ -1,5 +1,5 @@
|
||||||
import { TestBed } from '@angular/core/testing';
|
import {TestBed} from '@angular/core/testing';
|
||||||
import { AppComponent } from './app.component';
|
import {AppComponent} from './app.component';
|
||||||
|
|
||||||
describe('AppComponent', () => {
|
describe('AppComponent', () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import {Router} from '@angular/router';
|
||||||
templateUrl: './app.component.html',
|
templateUrl: './app.component.html',
|
||||||
styleUrl: './app.component.scss',
|
styleUrl: './app.component.scss',
|
||||||
})
|
})
|
||||||
export class AppComponent implements OnInit{
|
export class AppComponent implements OnInit {
|
||||||
title = 'Survival Minecraft Server on ' + ALTITUDE_VERSION + '! | Altitude Community';
|
title = 'Survival Minecraft Server on ' + ALTITUDE_VERSION + '! | Altitude Community';
|
||||||
title_og = 'Community-centered ' + ALTITUDE_VERSION + ' Survival Minecraft Server';
|
title_og = 'Community-centered ' + ALTITUDE_VERSION + ' Survival Minecraft Server';
|
||||||
description = 'Start your adventure today! We are a ' +
|
description = 'Start your adventure today! We are a ' +
|
||||||
|
|
@ -28,11 +28,11 @@ export class AppComponent implements OnInit{
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.titleService.setTitle(this.title)
|
this.titleService.setTitle(this.title)
|
||||||
this.metaService.updateTag({ name: 'description', content: this.description});
|
this.metaService.updateTag({name: 'description', content: this.description});
|
||||||
this.metaService.updateTag({ name: 'twitter:description', content: this.description_og})
|
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:title', content: this.title_og})
|
||||||
this.metaService.updateTag({ name: 'og:description', content: this.description_og})
|
this.metaService.updateTag({name: 'og:description', content: this.description_og})
|
||||||
this.metaService.updateTag({ name: 'keywords', content: this.keywords})
|
this.metaService.updateTag({name: 'keywords', content: this.keywords})
|
||||||
}
|
}
|
||||||
|
|
||||||
public isHomePage(): boolean {
|
public isHomePage(): boolean {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
|
import {ApplicationConfig, provideZoneChangeDetection} from '@angular/core';
|
||||||
import { provideRouter } from '@angular/router';
|
import {provideRouter} from '@angular/router';
|
||||||
|
|
||||||
import { routes } from './app.routes';
|
import {routes} from './app.routes';
|
||||||
|
|
||||||
export const appConfig: ApplicationConfig = {
|
export const appConfig: ApplicationConfig = {
|
||||||
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes)]
|
providers: [provideZoneChangeDetection({eventCoalescing: true}), provideRouter(routes)]
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,24 @@
|
||||||
import { NgModule } from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import {BrowserModule} from '@angular/platform-browser';
|
||||||
import { AppComponent } from './app.component';
|
import {AppComponent} from './app.component';
|
||||||
import {RouterModule, Routes} from '@angular/router';
|
import {RouterModule, Routes} from '@angular/router';
|
||||||
import { HeaderComponent } from './header/header.component';
|
import {HeaderComponent} from './header/header.component';
|
||||||
import { HomeComponent } from './home/home.component';
|
import {HomeComponent} from './home/home.component';
|
||||||
import {NgOptimizedImage} from '@angular/common';
|
import {NgOptimizedImage} from '@angular/common';
|
||||||
import {ThemeComponent} from "./theme/theme.component";
|
import {ThemeComponent} from "./theme/theme.component";
|
||||||
import {CookieService} from 'ngx-cookie-service';
|
import {CookieService} from 'ngx-cookie-service';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', component: HomeComponent }
|
{path: '', component: HomeComponent}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
HeaderComponent,
|
HeaderComponent,
|
||||||
HomeComponent,
|
HomeComponent,
|
||||||
ThemeComponent
|
ThemeComponent
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
RouterModule.forRoot(routes),
|
RouterModule.forRoot(routes),
|
||||||
|
|
@ -27,4 +27,5 @@ const routes: Routes = [
|
||||||
providers: [CookieService],
|
providers: [CookieService],
|
||||||
bootstrap: [AppComponent]
|
bootstrap: [AppComponent]
|
||||||
})
|
})
|
||||||
export class AppModule { }
|
export class AppModule {
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import { Routes } from '@angular/router';
|
import {Routes} from '@angular/router';
|
||||||
|
|
||||||
export const routes: Routes = [];
|
export const routes: Routes = [];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
export const ALTITUDE_VERSION = "1.21"
|
export const ALTITUDE_VERSION = "1.21"
|
||||||
|
|
||||||
export const enum THEME_MODE {
|
export const enum THEME_MODE {
|
||||||
LIGHT= 'theme-light',
|
LIGHT = 'theme-light',
|
||||||
DARK = 'theme-dark'
|
DARK = 'theme-dark'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,8 +65,7 @@
|
||||||
</div>
|
</div>
|
||||||
<a href="/"><img ngSrc="/public/img/logos/logo.png" alt="Altitude Server Logo" height="319" width="550"></a>
|
<a href="/"><img ngSrc="/public/img/logos/logo.png" alt="Altitude Server Logo" height="319" width="550"></a>
|
||||||
<ul id="nav_list">
|
<ul id="nav_list">
|
||||||
<li class="nav_li"><a [id]="[current_page === 'index' ? 'current-page' : null]" class="nav_link"
|
<li class="nav_li"><a [id]="getCurrentPageId(['home'])" class="nav_link" href="/">Home</a>
|
||||||
href="/">Home</a>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="nav_li">
|
<li class="nav_li">
|
||||||
<span [id]="getCurrentPageId(['map', 'customfeatures', 'economy', 'events', 'mypet', 'warps',
|
<span [id]="getCurrentPageId(['map', 'customfeatures', 'economy', 'events', 'mypet', 'warps',
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ header .container {
|
||||||
#nav.active {
|
#nav.active {
|
||||||
height: 80px;
|
height: 80px;
|
||||||
background-color: var(--color-primary);
|
background-color: var(--color-primary);
|
||||||
box-shadow: 0 2px 3px -1px rgba(30,30,30,0.1);
|
box-shadow: 0 2px 3px -1px rgba(30, 30, 30, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav_link.active {
|
.nav_link.active {
|
||||||
|
|
@ -49,7 +49,7 @@ nav img {
|
||||||
|
|
||||||
.nav_li {
|
.nav_li {
|
||||||
display: inline;
|
display: inline;
|
||||||
font-family: 'minecraft-title',sans-serif;
|
font-family: 'minecraft-title', sans-serif;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
@ -162,7 +162,7 @@ nav img {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
transform-origin: 4px 0;
|
transform-origin: 4px 0;
|
||||||
transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0), background 0.5s cubic-bezier(0.77,0.2,0.05,1.0), opacity 0.55s ease;
|
transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0), background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0), opacity 0.55s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
#mobile_nav_list {
|
#mobile_nav_list {
|
||||||
|
|
@ -177,13 +177,13 @@ nav img {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
transform-origin: 0 0;
|
transform-origin: 0 0;
|
||||||
transform: translate(-100%, 0);
|
transform: translate(-100%, 0);
|
||||||
transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
|
transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#mobile_nav_list li {
|
#mobile_nav_list li {
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
font-family: 'opensans-bold',sans-serif;
|
font-family: 'opensans-bold', sans-serif;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -221,7 +221,7 @@ nav img {
|
||||||
|
|
||||||
.nav_li {
|
.nav_li {
|
||||||
display: inline;
|
display: inline;
|
||||||
font-family: 'minecraft-title',sans-serif;
|
font-family: 'minecraft-title', sans-serif;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
@ -249,7 +249,7 @@ nav img {
|
||||||
transition-delay: 0.1s;
|
transition-delay: 0.1s;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
min-width: 160px;
|
min-width: 160px;
|
||||||
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
|
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
|
|
@ -312,7 +312,7 @@ nav img {
|
||||||
content: '';
|
content: '';
|
||||||
width: 44px;
|
width: 44px;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
box-shadow: 0 0 0 0 rgba(255,255,255,.1);
|
box-shadow: 0 0 0 0 rgba(255, 255, 255, .1);
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
-webkit-animation: sdb03 3s infinite;
|
-webkit-animation: sdb03 3s infinite;
|
||||||
|
|
@ -330,7 +330,7 @@ nav img {
|
||||||
}
|
}
|
||||||
|
|
||||||
60% {
|
60% {
|
||||||
box-shadow: 0 0 0 60px rgba(255,255,255,.1);
|
box-shadow: 0 0 0 60px rgba(255, 255, 255, .1);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -349,7 +349,7 @@ nav img {
|
||||||
}
|
}
|
||||||
|
|
||||||
60% {
|
60% {
|
||||||
box-shadow: 0 0 0 60px rgba(255,255,255,.1);
|
box-shadow: 0 0 0 60px rgba(255, 255, 255, .1);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -359,13 +359,13 @@ nav img {
|
||||||
}
|
}
|
||||||
|
|
||||||
@-moz-document url-prefix() {
|
@-moz-document url-prefix() {
|
||||||
.dropdown2{
|
.dropdown2 {
|
||||||
top: 12px;
|
top: 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@supports (-ms-ime-align:auto) {
|
@supports (-ms-ime-align:auto) {
|
||||||
.dropdown2{
|
.dropdown2 {
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import {ComponentFixture, TestBed} from '@angular/core/testing';
|
||||||
|
|
||||||
import { HeaderComponent } from './header.component';
|
import {HeaderComponent} from './header.component';
|
||||||
|
|
||||||
describe('HeaderComponent', () => {
|
describe('HeaderComponent', () => {
|
||||||
let component: HeaderComponent;
|
let component: HeaderComponent;
|
||||||
|
|
@ -10,7 +10,7 @@ describe('HeaderComponent', () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [HeaderComponent]
|
imports: [HeaderComponent]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
|
||||||
fixture = TestBed.createComponent(HeaderComponent);
|
fixture = TestBed.createComponent(HeaderComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@ import {ALTITUDE_VERSION} from '../constant';
|
||||||
export class HeaderComponent {
|
export class HeaderComponent {
|
||||||
@Input() title: string = '';
|
@Input() title: string = '';
|
||||||
@Input() sub_title: string = '';
|
@Input() sub_title: string = '';
|
||||||
@Input() current_page: string = ''
|
@Input() current_page: string = '';
|
||||||
|
|
||||||
public active: string = ''
|
public active: string = '';
|
||||||
|
|
||||||
@HostListener('window:scroll', [])
|
@HostListener('window:scroll', [])
|
||||||
onWindowScroll(): void {
|
onWindowScroll(): void {
|
||||||
|
|
@ -27,7 +27,7 @@ export class HeaderComponent {
|
||||||
scrollToSection(): void {
|
scrollToSection(): void {
|
||||||
const element = document.getElementById('scrollingpoint');
|
const element = document.getElementById('scrollingpoint');
|
||||||
if (element) {
|
if (element) {
|
||||||
element.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
element.scrollIntoView({behavior: 'smooth', block: 'start'});
|
||||||
} else {
|
} else {
|
||||||
console.error('Element with id "scrollingpoint" not found.');
|
console.error('Element with id "scrollingpoint" not found.');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
<app-header [title]="'Altitude'" [current_page]="'home'"></app-header>
|
<app-header [title]="'Altitude'" [current_page]="'home'"></app-header>
|
||||||
<main>
|
<main>
|
||||||
<section id="scrollingpoint" style="background: #202020; text-align: center; padding: 80px 0px;">
|
<section id="scrollingpoint" style="background: #202020; text-align: center; padding: 80px 0px;">
|
||||||
<!-- TODO load player count from old api or backend?-->
|
<!-- TODO load player count from old api or backend?-->
|
||||||
<h2 style="color: white;"><span class="player-count">Loading...</span></h2>
|
<h2 style="color: white;"><span class="player-count">Loading...</span></h2>
|
||||||
<h2 style="color: white;">Server IP: play.alttd.com</h2>
|
<h2 style="color: white;">Server IP: play.alttd.com</h2>
|
||||||
<!-- TODO make copy be angular not js-->
|
<!-- TODO make copy be angular not js-->
|
||||||
<button type="button" style="margin-top: 50px;" class="button-outer" onclick="copyToClipboard('play.alttd.com')">
|
<button type="button" style="margin-top: 50px;" class="button-outer" onclick="copyToClipboard('play.alttd.com')">
|
||||||
<span class="button-inner" id="copybutton">Copy IP</span>
|
<span class="button-inner" id="copybutton">Copy IP</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -14,9 +14,12 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<h2>Adventure Begins</h2>
|
<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>
|
</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">
|
height="150" width="150">
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -38,7 +41,9 @@
|
||||||
<iframe id="discordwidget" src="https://discordapp.com/widget?id=141644560005595136&theme=dark"></iframe>
|
<iframe id="discordwidget" src="https://discordapp.com/widget?id=141644560005595136&theme=dark"></iframe>
|
||||||
<div class="paragraph" id="discordp">
|
<div class="paragraph" id="discordp">
|
||||||
<h2>Meet the Community</h2>
|
<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>
|
<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;">
|
<div style="display: flex; justify-content: center;">
|
||||||
<a target="_blank" rel="noopener" href="https://discordapp.com/invite/TGqpzCJ">
|
<a target="_blank" rel="noopener" href="https://discordapp.com/invite/TGqpzCJ">
|
||||||
|
|
@ -53,11 +58,14 @@
|
||||||
<section id="section2">
|
<section id="section2">
|
||||||
<div class="customcontainer">
|
<div class="customcontainer">
|
||||||
<h2 style="color: white; padding-bottom: 35px; font-size:2.8em">Survival Shaped by You</h2>
|
<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 id="customcontainer2">
|
||||||
<div class="customcontainer3">
|
<div class="customcontainer3">
|
||||||
<h2>McMMO & MyPet</h2>
|
<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']">
|
<a [routerLink]="['/mypet']">
|
||||||
<div class="button-outer">
|
<div class="button-outer">
|
||||||
<span class="button-inner">MyPet Info</span>
|
<span class="button-inner">MyPet Info</span>
|
||||||
|
|
@ -66,7 +74,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="customcontainer3">
|
<div class="customcontainer3">
|
||||||
<h2>Dynamic map</h2>
|
<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']">
|
<a [routerLink]="['/map']">
|
||||||
<div class="button-outer">
|
<div class="button-outer">
|
||||||
<span class="button-inner">Visit Map</span>
|
<span class="button-inner">Visit Map</span>
|
||||||
|
|
@ -75,7 +84,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="customcontainer3">
|
<div class="customcontainer3">
|
||||||
<h2>Player Shops</h2>
|
<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']">
|
<a [routerLink]="['/economy']">
|
||||||
<div class="button-outer">
|
<div class="button-outer">
|
||||||
<span class="button-inner">Shop Guide</span>
|
<span class="button-inner">Shop Guide</span>
|
||||||
|
|
@ -101,7 +111,9 @@
|
||||||
</section>
|
</section>
|
||||||
<section style="background: #202020;">
|
<section style="background: #202020;">
|
||||||
<div class="customcontainer">
|
<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>
|
<p style="color: white; margin-top:30px;">- /u/seanhanley1993</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
@ -110,7 +122,7 @@
|
||||||
<img ngSrc="/public/img/logos/log.png" alt="Alternative Altitude Server Logo" height="129"
|
<img ngSrc="/public/img/logos/log.png" alt="Alternative Altitude Server Logo" height="129"
|
||||||
width="120">
|
width="120">
|
||||||
<h2 style="margin: 20px 0; font-size: 1.8em;">play.alttd.com</h2>
|
<h2 style="margin: 20px 0; font-size: 1.8em;">play.alttd.com</h2>
|
||||||
<!-- TODO make this use angular not js-->
|
<!-- TODO make this use angular not js-->
|
||||||
<button type="button" class="button-outer" onclick="copyToClipboard('play.alttd.com')">
|
<button type="button" class="button-outer" onclick="copyToClipboard('play.alttd.com')">
|
||||||
<span class="button-inner" id="copybutton2">Copy IP</span>
|
<span class="button-inner" id="copybutton2">Copy IP</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import {ComponentFixture, TestBed} from '@angular/core/testing';
|
||||||
|
|
||||||
import { HomeComponent } from './home.component';
|
import {HomeComponent} from './home.component';
|
||||||
|
|
||||||
describe('HomeComponent', () => {
|
describe('HomeComponent', () => {
|
||||||
let component: HomeComponent;
|
let component: HomeComponent;
|
||||||
|
|
@ -10,7 +10,7 @@ describe('HomeComponent', () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [HomeComponent]
|
imports: [HomeComponent]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
|
||||||
fixture = TestBed.createComponent(HomeComponent);
|
fixture = TestBed.createComponent(HomeComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,8 @@ import {ALTITUDE_VERSION} from '../constant';
|
||||||
styleUrl: './home.component.scss'
|
styleUrl: './home.component.scss'
|
||||||
})
|
})
|
||||||
export class HomeComponent implements OnInit {
|
export class HomeComponent implements OnInit {
|
||||||
constructor(private titleService: Title) {}
|
constructor(private titleService: Title) {
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.titleService.setTitle('Survival Minecraft Server on ' + ALTITUDE_VERSION + ' | Altitude Community');
|
this.titleService.setTitle('Survival Minecraft Server on ' + ALTITUDE_VERSION + ' | Altitude Community');
|
||||||
|
|
@ -23,6 +24,7 @@ export class HomeComponent implements OnInit {
|
||||||
];
|
];
|
||||||
|
|
||||||
private slideIndex = 0;
|
private slideIndex = 0;
|
||||||
|
|
||||||
get slide(): string {
|
get slide(): string {
|
||||||
return this.slides[this.slideIndex];
|
return this.slides[this.slideIndex];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
height: 25px;
|
height: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.switch-div{
|
.switch-div {
|
||||||
right: 40px;
|
right: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import {ComponentFixture, TestBed} from '@angular/core/testing';
|
||||||
|
|
||||||
import { ThemeComponent } from './theme.component';
|
import {ThemeComponent} from './theme.component';
|
||||||
|
|
||||||
describe('ThemeComponent', () => {
|
describe('ThemeComponent', () => {
|
||||||
let component: ThemeComponent;
|
let component: ThemeComponent;
|
||||||
|
|
@ -10,7 +10,7 @@ describe('ThemeComponent', () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [ThemeComponent]
|
imports: [ThemeComponent]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
|
||||||
fixture = TestBed.createComponent(ThemeComponent);
|
fixture = TestBed.createComponent(ThemeComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@ export class ThemeComponent implements OnInit, OnDestroy {
|
||||||
isDarkMode: boolean = false;
|
isDarkMode: boolean = false;
|
||||||
private themeSubscription: Subscription | null = null;
|
private themeSubscription: Subscription | null = null;
|
||||||
|
|
||||||
constructor(private themeService: ThemeService) {}
|
constructor(private themeService: ThemeService) {
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.themeSubscription = this.themeService.theme$.subscribe(theme => {
|
this.themeSubscription = this.themeService.theme$.subscribe(theme => {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { TestBed } from '@angular/core/testing';
|
import {TestBed} from '@angular/core/testing';
|
||||||
|
|
||||||
import { ThemeService } from './theme.service';
|
import {ThemeService} from './theme.service';
|
||||||
|
|
||||||
describe('ThemeService', () => {
|
describe('ThemeService', () => {
|
||||||
let service: ThemeService;
|
let service: ThemeService;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { Injectable } from '@angular/core';
|
import {Injectable} from '@angular/core';
|
||||||
import { CookieService } from 'ngx-cookie-service';
|
import {CookieService} from 'ngx-cookie-service';
|
||||||
import { BehaviorSubject } from 'rxjs';
|
import {BehaviorSubject} from 'rxjs';
|
||||||
import {THEME_MODE} from '../constant';
|
import {THEME_MODE} from '../constant';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
|
|
@ -22,9 +22,14 @@ export class ThemeService {
|
||||||
: THEME_MODE.DARK;
|
: THEME_MODE.DARK;
|
||||||
let currentTheme: THEME_MODE;
|
let currentTheme: THEME_MODE;
|
||||||
switch (savedTheme) {
|
switch (savedTheme) {
|
||||||
case THEME_MODE.DARK: currentTheme = THEME_MODE.DARK; break;
|
case THEME_MODE.DARK: {
|
||||||
|
currentTheme = THEME_MODE.DARK;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case THEME_MODE.LIGHT:
|
case THEME_MODE.LIGHT:
|
||||||
default: currentTheme = THEME_MODE.LIGHT;
|
default: {
|
||||||
|
currentTheme = THEME_MODE.LIGHT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.setTheme(currentTheme);
|
this.setTheme(currentTheme);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,21 +9,21 @@
|
||||||
<meta name="theme-color" content="#1f9bde">
|
<meta name="theme-color" content="#1f9bde">
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
<!-- Twitter Card data -->
|
<!-- Twitter Card data -->
|
||||||
<meta name="twitter:card" content="summary" />
|
<meta name="twitter:card" content="summary"/>
|
||||||
<meta name="twitter:title" content="Community-centered Survival Minecraft Server" />
|
<meta name="twitter:title" content="Community-centered Survival Minecraft Server"/>
|
||||||
<!-- Twitter Summary card images must be at least 120x120px -->
|
<!-- Twitter Summary card images must be at least 120x120px -->
|
||||||
<meta name="twitter:image" content="https://www.alttd.com/assets/img/random/seo.jpg" />
|
<meta name="twitter:image" content="https://www.alttd.com/assets/img/random/seo.jpg"/>
|
||||||
<!-- Open Graph data -->
|
<!-- Open Graph data -->
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article"/>
|
||||||
<meta property="og:url" content="https://www.alttd.com/" />
|
<meta property="og:url" content="https://www.alttd.com/"/>
|
||||||
<meta property="og:image" content="https://www.alttd.com/assets/img/random/seo.jpg" />
|
<meta property="og:image" content="https://www.alttd.com/assets/img/random/seo.jpg"/>
|
||||||
<meta property="og:site_name" content="Altitude Community" />
|
<meta property="og:site_name" content="Altitude Community"/>
|
||||||
|
|
||||||
<link rel="icon" type="image/x-icon" href="public/favicon.ico">
|
<link rel="icon" type="image/x-icon" href="public/favicon.ico">
|
||||||
<style>
|
<style>
|
||||||
header {
|
header {
|
||||||
height: 460px;
|
height: 460px;
|
||||||
background: linear-gradient( rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) ), url("public/img/backgrounds/trees.jpg");
|
background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("public/img/backgrounds/trees.jpg");
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
|
@ -31,6 +31,6 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<app-root></app-root>
|
<app-root></app-root>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
|
||||||
import { AppModule } from './app/app.module';
|
import {AppModule} from './app/app.module';
|
||||||
|
|
||||||
platformBrowserDynamic()
|
platformBrowserDynamic()
|
||||||
.bootstrapModule(AppModule)
|
.bootstrapModule(AppModule)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
:root{
|
:root {
|
||||||
--white: #FFFFFF;
|
--white: #FFFFFF;
|
||||||
--black: #282828;
|
--black: #282828;
|
||||||
--pureblack: #000000;
|
--pureblack: #000000;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user