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.
* chore: added svg's for settings and avatar * feat: added profile page, mostly fixed contend for showcase * fix: formatting of sections + "Statistik" headline * feat: added statistic entrys
- Loading branch information
Showing
14 changed files
with
205 additions
and
2 deletions.
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
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
4 changes: 4 additions & 0 deletions
4
frontend/src/app/components/atoms/statistic-entry/statistic-entry.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,4 @@ | ||
<div id="wrapper"> | ||
<div id="name">{{name}}<br/><br/></div> | ||
<div id="value">{{value}}</div> | ||
</div> |
20 changes: 20 additions & 0 deletions
20
frontend/src/app/components/atoms/statistic-entry/statistic-entry.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,20 @@ | ||
#wrapper{ | ||
background-color: var(--white); | ||
text-align: center; | ||
height: 6em; | ||
color: var(--font); | ||
text-indent: 0em; | ||
border-radius: 1em; | ||
display: flex; | ||
flex-direction: column; | ||
min-width: 8em; | ||
padding: 0.5em; | ||
div{ | ||
height: 40%; | ||
width: 100%; | ||
} | ||
} | ||
#name{ | ||
padding-top: 1em; | ||
font-weight: bold; | ||
} |
23 changes: 23 additions & 0 deletions
23
frontend/src/app/components/atoms/statistic-entry/statistic-entry.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 { StatisticEntryComponent } from './statistic-entry.component'; | ||
|
||
describe('StatisticEntryComponent', () => { | ||
let component: StatisticEntryComponent; | ||
let fixture: ComponentFixture<StatisticEntryComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [StatisticEntryComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(StatisticEntryComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
11 changes: 11 additions & 0 deletions
11
frontend/src/app/components/atoms/statistic-entry/statistic-entry.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,11 @@ | ||
import { Component, Input, input } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-statistic-entry', | ||
templateUrl: './statistic-entry.component.html', | ||
styleUrl: './statistic-entry.component.scss' | ||
}) | ||
export class StatisticEntryComponent { | ||
@Input() name:string = 'Distanz gelaufen'; | ||
@Input() value:string = '12.3 km'; | ||
} |
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
19 changes: 19 additions & 0 deletions
19
frontend/src/app/components/pages/profilepage/profilepage.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,19 @@ | ||
<div id="wrapper"> | ||
<div id="avatar"> | ||
<img (click)="settings()" src="../../../../assets/icons/settings.svg" alt="settings-svg" id="settings"> | ||
<img src="../../../../assets/icons/avatar.svg" alt="avatar-svg" id="avatar-svg"> | ||
</div> | ||
<div id="data" class="pf-section"> | ||
<h2 id="name">{{name}}</h2> | ||
<p id="email">{{email}}</p> | ||
</div> | ||
<div id="statistics" class="pf-section"> | ||
<h2>Statistiken</h2> | ||
<div id="entrys-wrapper"> | ||
<app-statistic-entry class="entry" | ||
*ngFor="let statistic of statistics" | ||
[name]="statistic.name" | ||
[value]="statistic.value"/> | ||
</div> | ||
</div> | ||
</div> |
51 changes: 51 additions & 0 deletions
51
frontend/src/app/components/pages/profilepage/profilepage.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,51 @@ | ||
#wrapper{ | ||
background-color: var(--background-black); | ||
height: 90vh; | ||
overflow-y: scroll; | ||
} | ||
#settings { | ||
position: fixed; | ||
top: 0.5em; | ||
right: 0.5em; | ||
width: 2.5em; | ||
height: auto; | ||
} | ||
#avatar { | ||
width: 100%; | ||
height: 10em; | ||
background-color: var(--white); | ||
} | ||
#avatar-svg{ | ||
height: 100%; | ||
padding-top: 1.5em; | ||
margin-top: auto; | ||
margin-left: calc(50% - 80px); | ||
clip-path: inset(0px 0px 1.5em 0px); | ||
} | ||
|
||
//sections below the avatar | ||
@mixin section{ | ||
text-indent: 1em; | ||
background-color: var(--font); | ||
border-radius: 2em; | ||
margin: 1em; | ||
h2{ | ||
padding-top: 1em; | ||
} | ||
} | ||
|
||
#data{ | ||
@include section; | ||
height: 20vh; | ||
} | ||
#statistics{ | ||
@include section; | ||
min-height: 30vh; | ||
} | ||
#entrys-wrapper{ | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: center; | ||
gap: 1em; | ||
padding-bottom: 1em; | ||
} |
23 changes: 23 additions & 0 deletions
23
frontend/src/app/components/pages/profilepage/profilepage.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 { ProfilepageComponent } from './profilepage.component'; | ||
|
||
describe('ProfilepageComponent', () => { | ||
let component: ProfilepageComponent; | ||
let fixture: ComponentFixture<ProfilepageComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ProfilepageComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(ProfilepageComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
27 changes: 27 additions & 0 deletions
27
frontend/src/app/components/pages/profilepage/profilepage.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,27 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { Router } from '@angular/router'; | ||
|
||
@Component({ | ||
selector: 'app-profilepage', | ||
templateUrl: './profilepage.component.html', | ||
styleUrl: './profilepage.component.scss' | ||
}) | ||
export class ProfilepageComponent { | ||
name: string = "David Hasselhoff"; | ||
email: string = "[email protected]"; | ||
statistics: {name: string, value: string}[] = [ | ||
{name: 'Distanz gelaufen', value: '12.3 km'}, | ||
{name: 'Zeit aktiv', value: '2:34:56'}, | ||
{name: 'Kalorien verbrannt', value: '1234 kcal'}, | ||
{name: 'Schritte', value: '12345'}, | ||
]; | ||
|
||
router:Router; | ||
constructor(router: Router) { | ||
this.router = router; | ||
} | ||
|
||
settings(){ | ||
this.router.navigate(['/settings']); | ||
} | ||
} |
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.