From 46c755040d45e955eb505532464e790babc3ef6b Mon Sep 17 00:00:00 2001 From: Peter <42907716+MrShack@users.noreply.github.com> Date: Sat, 5 Apr 2025 22:24:38 +0200 Subject: [PATCH] Added FooterComponent and updated various UI elements Introduced a new FooterComponent and integrated it into the application. Adjusted home page layout and refined styles for better consistency, including minor restructuring of CSS rules and HTML elements. --- frontend/src/app/app.module.ts | 2 + .../src/app/copy-ip/copy-ip.component.html | 2 +- frontend/src/app/footer/footer.component.html | 1 + frontend/src/app/footer/footer.component.scss | 0 .../src/app/footer/footer.component.spec.ts | 23 ++++++++++ frontend/src/app/footer/footer.component.ts | 11 +++++ frontend/src/app/home/home.component.html | 14 ++++-- frontend/src/app/home/home.component.ts | 4 +- frontend/src/styles.scss | 43 ++++++++----------- 9 files changed, 68 insertions(+), 32 deletions(-) create mode 100644 frontend/src/app/footer/footer.component.html create mode 100644 frontend/src/app/footer/footer.component.scss create mode 100644 frontend/src/app/footer/footer.component.spec.ts create mode 100644 frontend/src/app/footer/footer.component.ts diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index b6037fc..b690393 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -10,6 +10,7 @@ import {CookieService} from 'ngx-cookie-service'; import {MapComponent} from './map/map.component'; import {RulesComponent} from './rules/rules.component'; import {CopyIpComponent} from './copy-ip/copy-ip.component'; +import {FooterComponent} from './footer/footer.component'; const routes: Routes = [ {path: '', component: HomeComponent}, @@ -21,6 +22,7 @@ const routes: Routes = [ declarations: [ AppComponent, HeaderComponent, + FooterComponent, HomeComponent, ThemeComponent, MapComponent, diff --git a/frontend/src/app/copy-ip/copy-ip.component.html b/frontend/src/app/copy-ip/copy-ip.component.html index 8d42ab0..a4ee88e 100644 --- a/frontend/src/app/copy-ip/copy-ip.component.html +++ b/frontend/src/app/copy-ip/copy-ip.component.html @@ -1,3 +1,3 @@ - diff --git a/frontend/src/app/footer/footer.component.html b/frontend/src/app/footer/footer.component.html new file mode 100644 index 0000000..28c0d7d --- /dev/null +++ b/frontend/src/app/footer/footer.component.html @@ -0,0 +1 @@ +

footer works!

diff --git a/frontend/src/app/footer/footer.component.scss b/frontend/src/app/footer/footer.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/frontend/src/app/footer/footer.component.spec.ts b/frontend/src/app/footer/footer.component.spec.ts new file mode 100644 index 0000000..3f93915 --- /dev/null +++ b/frontend/src/app/footer/footer.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { FooterComponent } from './footer.component'; + +describe('FooterComponent', () => { + let component: FooterComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [FooterComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(FooterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/frontend/src/app/footer/footer.component.ts b/frontend/src/app/footer/footer.component.ts new file mode 100644 index 0000000..7da7554 --- /dev/null +++ b/frontend/src/app/footer/footer.component.ts @@ -0,0 +1,11 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'app-footer', + standalone: false, + templateUrl: './footer.component.html', + styleUrl: './footer.component.scss' +}) +export class FooterComponent { + +} diff --git a/frontend/src/app/home/home.component.html b/frontend/src/app/home/home.component.html index e1bf89a..b8014df 100644 --- a/frontend/src/app/home/home.component.html +++ b/frontend/src/app/home/home.component.html @@ -17,7 +17,9 @@

Loading...

Server IP: play.alttd.com

- +
+ +
@@ -66,8 +68,8 @@
-

Survival Shaped by You

-

Altitude is built by the +

Survival Shaped by You

+

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.

@@ -106,6 +108,9 @@
+

Community Builds

+

Have a look at some of the incredible builds + made by the community. something more? idk placeholder placeholder

@@ -136,7 +141,7 @@
Alternative Altitude Server Logo -

play.alttd.com

+

play.alttd.com

@@ -145,4 +150,5 @@

Scroll Down

+ diff --git a/frontend/src/app/home/home.component.ts b/frontend/src/app/home/home.component.ts index 999db45..8c0cdf1 100644 --- a/frontend/src/app/home/home.component.ts +++ b/frontend/src/app/home/home.component.ts @@ -20,6 +20,8 @@ export class HomeComponent implements OnInit { "/public/img/backgrounds/caruselimage3.png" ]; + private slideIndex = 0; + ngOnInit(): void { this.titleService.setTitle('Survival Minecraft Server on ' + ALTITUDE_VERSION + ' | Altitude Community'); this.randomizeSlides() @@ -36,8 +38,6 @@ export class HomeComponent implements OnInit { this.slides = array; } - private slideIndex = 0; - get slide(): string { return this.slides[this.slideIndex]; } diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss index 6ac414a..a194a11 100644 --- a/frontend/src/styles.scss +++ b/frontend/src/styles.scss @@ -299,29 +299,7 @@ tr { background: #8b8a8f; } -// Everything for darkmode - -.darkmodeSection { - background-color: var(--color-secondary); - transition: 0.5s background ease; -} - -@media (max-width: 1150px) { - .container { - width: 90%; - } - - h1 { - font-size: 3em; - } - - .title { - height: calc(100% - 150px); - margin-top: 0; - } - -} - +// Darkmode sections .darkmodeSection { background-color: var(--color-secondary); transition: 0.5s background ease; @@ -337,7 +315,7 @@ tr { transition: 0.5s background ease; } - +// Scroll-up button .scroll-up-button.active:hover { opacity: 1.0; } @@ -387,4 +365,19 @@ tr { box-sizing: border-box; } -/* main css end */ +// Different resolution changes +@media (max-width: 1150px) { + .container { + width: 90%; + } + + h1 { + font-size: 3em; + } + + .title { + height: calc(100% - 150px); + margin-top: 0; + } + +}