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
This commit is contained in:
2025-07-04 19:50:21 +02:00
parent c42fc38b2c
commit ebe66c87c0
169 changed files with 123 additions and 113 deletions
@@ -0,0 +1,138 @@
<ng-container>
<app-header [current_page]="'vote'" height="460px" background_image="/public/img/backgrounds/town2.jpg"
[overlay_gradient]="0.5">
<div class="title" header-content>
<h1>Vote Daily!</h1>
<h2>Support the server and help us conquer the world by voting on the websites below every day. Thank you for
supporting the Altitude server!</h2>
</div>
</app-header>
<main>
<section class="darkmodeSection">
<section class="columnSection">
<div class="columnContainer">
<div class="columnParagraph">
<h2 style="text-align: center">Daily Vote Crate</h2>
<p>Vote on at least 5 sites to get a crate key every day! Crates contain a vast treasure of collectibles and
valuables. You can open vote crates at spawn on the survival server that you received the key on.</p>
<p><span style="font-family: 'opensans-bold', sans-serif;">Please note:</span> Days reset at midnight UTC
and votes do not process until you log in!</p>
</div>
</div>
<div class="columnContainer">
<div class="columnParagraph">
<h2 style="text-align: center;">Weekly Vote Crate</h2>
<p>Vote at least 36 times in a week (thats 6 times a day for 6 days!) to get a Weekly Crate Key! Weekly
Crates have higher value rewards, exclusive collectibles, and items with normally impossible
enchantments.</p>
<p><span style="font-family: 'opensans-bold', sans-serif;">Please note:</span> Weeks reset on Saturday at
midnight UTC and votes do not process until you log in!</p>
</div>
</div>
<div class="voteDisclaimer">
<h3 style="text-align: center;">Disclaimers & Info</h3>
<p style="text-align: center;">You can only store 7 daily crate keys, 1 weekly crate key and 2 quest crate
keys.</p><br>
<p style="text-align: center;">Voting within 30 minutes of midnight UTC can cause your votes to glitch. Keys
lost due to voting too close to midnight UTC will not be reimbursed.
<!--<p style="text-align: center;">Crate drop rates can be found <a href="/crate.php">here</a>.</p>-->
</div>
</section>
</section>
<section class="voteSection">
<div class="container" style="padding: 50px 0 0 0; justify-content: center;">
<div class="vote">
<h2>MinecraftServers</h2>
<div>
<a onclick="clickVote('vote1');" oncontextmenu="clickVote('vote1');" target="_blank" rel="noopener"
href="https://minecraftservers.org/vote/284208">
<div class="button-outer">
<span id="vote1" class="button-inner">Vote!</span>
</div>
</a>
</div>
</div>
<div class="vote">
<h2>TopMinecraftServers</h2>
<div>
<a (click)="clickVote('vote2')" oncontextmenu="clickVote('vote2'); return false;" target="_blank"
rel="noopener"
href="https://topminecraftservers.org/vote/4906">
<div class="button-outer">
<span id="vote2" class="button-inner">Vote!</span>
</div>
</a>
</div>
</div>
<div class="vote">
<h2>MCSL</h2>
<div>
<a (click)="clickVote('vote3')" oncontextmenu="clickVote('vote3'); return false;" target="_blank"
rel="noopener"
href="https://minecraft-server-list.com/server/298238/vote/">
<div class="button-outer">
<span id="vote3" class="button-inner">Vote!</span>
</div>
</a>
</div>
</div>
<div class="vote">
<h2>Minecraft-Server</h2>
<div>
<a (click)="clickVote('vote4')" oncontextmenu="clickVote('vote4'); return false;" target="_blank"
rel="noopener"
href="https://minecraft-server.net/vote/Altitude/">
<div class="button-outer">
<span id="vote4" class="button-inner">Vote!</span>
</div>
</a>
</div>
</div>
<div class="vote">
<h2>PlanetMinecraft</h2>
<div>
<a (click)="clickVote('vote5')" oncontextmenu="clickVote('vote5'); return false;" target="_blank"
rel="noopener"
href="https://www.planetminecraft.com/server/alttd/vote/">
<div class="button-outer">
<span id="vote5" class="button-inner">Vote!</span>
</div>
</a>
</div>
</div>
<div class="vote">
<h2>Minecraft-MP</h2>
<div>
<a (click)="clickVote('vote6')" oncontextmenu="clickVote('vote6'); return false;" target="_blank"
rel="noopener"
href="https://minecraft-mp.com/server/98955/vote/">
<div class="button-outer">
<span id="vote6" class="button-inner">Vote!</span>
</div>
</a>
</div>
</div>
</div>
</section>
<section class="darkmodeSection">
<div class="container" style="justify-content: center; text-align: center;">
<div class="paragraph">
<h2 style="font-size:3em; padding-bottom: 30px;">Reddit</h2>
<p>We are also listed on <a href="https://www.reddit.com/r/mcservers/">/r/mcservers</a>! We create a new
listing every 7 days, and comment on several of the [Wanted] ads. You can find and upvote our listing as
well as comment if you have a Reddit account.</p>
<a target="_blank" rel="noopener" href="https://www.reddit.com/r/mcservers/">
<div style="margin-top: 30px;" class="button-outer">
<span class="button-inner">Visit /r/mcservers</span>
</div>
</a>
</div>
</div>
</section>
<a (click)="this.scrollService.scrollToTop()" class="scroll-up-button, active">
<span></span>
<p style="display: none;">Scroll Down</p>
</a>
</main>
</ng-container>
@@ -0,0 +1,38 @@
.voteDisclaimer {
width: 60%;
padding-bottom: 60px;
margin: 0 auto;
}
.voteSection {
background-color: var(--link-color);
transition: 0.5s ease;
}
.vote {
width: 33%;
min-width: 220px;
padding-bottom: 50px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
margin: 0 5px;
}
.vote div {
display: flex;
justify-content: center;
}
.vote h2 {
text-align: center;
color: white;
padding-bottom: 15px;
}
.vote .button-outer {
background-color: white;
color: black;
text-shadow: none;
}
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { VoteComponent } from './vote.component';
describe('VoteComponent', () => {
let component: VoteComponent;
let fixture: ComponentFixture<VoteComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [VoteComponent]
})
.compileComponents();
fixture = TestBed.createComponent(VoteComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,25 @@
import {Component} from '@angular/core';
import {ScrollService} from '@services/scroll.service';
import {CommonModule} from '@angular/common';
import {HeaderComponent} from '@header/header.component';
@Component({
selector: 'app-vote',
standalone: true,
imports: [
CommonModule,
HeaderComponent
],
templateUrl: './vote.component.html',
styleUrl: './vote.component.scss'
})
export class VoteComponent {
constructor(public scrollService: ScrollService) {
}
voteMessage: string = '';
clickVote(id: string) {
this.voteMessage = 'Clicked!';
}
}