This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Footer/navigationbar implemented (#171)
* chore: added icons for footer * feat: Add footer component * fix: footer wird nurnoch bei den gewünschten seiten angezeigt * feat: routing bei footer-html implementiert * style: highlighten der aktuellen Maske innerhalb des Footers --------- Co-authored-by: Justin Hubert <135236159+Jstn2004@users.noreply.github.com>
- Loading branch information
Showing
11 changed files
with
176 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<router-outlet></router-outlet> | ||
<app-footer *ngIf="hasFooter()"></app-footer> | ||
<!--TODO: set visible for the laoding progress--> | ||
<app-loader *ngIf="isLoading" ></app-loader> | ||
<app-toast></app-toast> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
frontend/src/app/components/organisms/footer/footer.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<div id="container"> | ||
<div id="nav-main" | ||
(click)="navigate('/main')" | ||
[ngClass]="isOnPage('/main')? 'nav-element highlight': 'nav-element'"> | ||
<img class="icons" src="../../../../assets/icons/home.svg" alt="home-svg"> | ||
</div> | ||
<div id="nav-ranked" | ||
(click)="navigate('/ranking')" | ||
[ngClass]="isOnPage('/ranking')? 'nav-element highlight': 'nav-element'"> | ||
<img class="icons" src="../../../../assets/icons/podium.svg" alt="podium-svg"> | ||
</div> | ||
<div id="nav-friendlist" | ||
(click)="navigate('/friendlist')" | ||
[ngClass]="isOnPage('/friendlist')? 'nav-element highlight': 'nav-element'"> | ||
<img class="icons" src="../../../../assets/icons/friends.svg" alt="friends-svg"> | ||
</div> | ||
<div id="nav-profile" | ||
(click)="navigate('/profile')" | ||
[ngClass]="isOnPage('/profile')? 'nav-element highlight': 'nav-element'"> | ||
<img class="icons" src="../../../../assets/icons/profile.svg" alt="profile-svg"> | ||
</div> | ||
</div> |
39 changes: 39 additions & 0 deletions
39
frontend/src/app/components/organisms/footer/footer.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#container{ | ||
//fix position at the bottom of the page | ||
position: fixed; | ||
bottom: 0; | ||
|
||
//format + borders | ||
display: flex; | ||
justify-content: space-evenly; | ||
width: 100%; | ||
height: 10vh; | ||
background-color: var(--background-black); | ||
color: var(--white); | ||
border-top: 1px solid; | ||
|
||
//format navigation elements | ||
.nav-element{ | ||
text-align: center; | ||
width: 25%; | ||
height: 100%; | ||
|
||
.icons{ | ||
width: 60%; | ||
max-width: 4.5rem; | ||
filter: brightness(0) invert(1); | ||
padding-top: 5%; | ||
} | ||
} | ||
.highlight{ | ||
background-color: var(--white)!important; | ||
.icons{ | ||
filter:invert(0); | ||
} | ||
} | ||
|
||
//seperate navigation elements with borders | ||
#nav-main, #nav-ranked, #nav-friendlist{ | ||
border-right: 1px solid var(--white); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
frontend/src/app/components/organisms/footer/footer.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { FooterComponent } from './footer.component'; | ||
|
||
describe('FooterComponent', () => { | ||
let component: FooterComponent; | ||
let fixture: ComponentFixture<FooterComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [FooterComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(FooterComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
22 changes: 22 additions & 0 deletions
22
frontend/src/app/components/organisms/footer/footer.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Component } from '@angular/core'; | ||
import { Router } from '@angular/router'; | ||
|
||
@Component({ | ||
selector: 'app-footer', | ||
templateUrl: './footer.component.html', | ||
styleUrl: './footer.component.scss' | ||
}) | ||
export class FooterComponent { | ||
router: Router; | ||
|
||
constructor(router:Router){ | ||
this.router=router | ||
} | ||
|
||
navigate(path:string){ | ||
this.router.navigateByUrl(path); | ||
} | ||
isOnPage(path:string):boolean{ | ||
return this.router.url==path; | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.