diff --git a/src/app/components/about/about.component.html b/src/app/components/about/about.component.html index f0d7f9d..d03061a 100644 --- a/src/app/components/about/about.component.html +++ b/src/app/components/about/about.component.html @@ -1,5 +1,6 @@
+

Greenvironment






Keep it clean and green!

@@ -9,7 +10,51 @@

What's Greenvironment?

-

We, the greenviroment team want to create a network for environmentalists who care for our nature and our planet as much as we do.

+

We, the greenviroment team want to create a network for environmentalists who care for our nature and our planet as much as we do.

+
+

What does the level mean?

+

There are different levels you can reach through green behaviour. + Collect 100 points to level up! The levels are called: +

+ + + + + + + + + + + +
level {{level.level}} level name {{level.name}}
+
+

How to level up?

+

There is an always growing list of things you can do, + to support your environment + and earn points to level up at the same time. + You can get a different amount of points + for differnet actions you can see in the list below: +

+ + + + + + + + + + + + + + + + + +
points {{action.points}} action {{action.name}}

We believe, that together we can do amazing things to protect our environment and keep it clean and green.

diff --git a/src/app/components/about/about.component.sass b/src/app/components/about/about.component.sass index 90e88b1..be12ffc 100644 --- a/src/app/components/about/about.component.sass +++ b/src/app/components/about/about.component.sass @@ -1,7 +1,5 @@ @import '../../../styles/mixins.sass' @import '../../../styles/vars.sass' -@import '~@angular/material/theming' -@import '../../../styles/greenvironment-material-theme.scss' #about position: fixed @@ -28,3 +26,11 @@ width: 100% max-width: 30em margin-bottom: 1em + +.mat-table + width: 100% + max-width: 690px + margin: 0 auto + text-align: left +.mat-header-cell + padding-right: 0.5em diff --git a/src/app/components/about/about.component.ts b/src/app/components/about/about.component.ts index 88f7f9f..4b81aa9 100644 --- a/src/app/components/about/about.component.ts +++ b/src/app/components/about/about.component.ts @@ -1,4 +1,8 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { Actionlist } from 'src/app/models/actionlist'; +import { Levellist } from 'src/app/models/levellist'; +import {MatSort} from '@angular/material/sort'; +import {MatTableDataSource} from '@angular/material/table'; @Component({ selector: 'app-about', @@ -6,10 +10,19 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./about.component.sass'] }) export class AboutComponent implements OnInit { + actionlist: Actionlist = new Actionlist(); + levellist: Levellist = new Levellist(); + + displayedColumns = ['points', 'name']; + dataSource = new MatTableDataSource(this.actionlist.Actions); + displayedLevelColumns = ['level', 'name']; + levelSource = this.levellist.levels; constructor() { } + @ViewChild(MatSort, {static: true}) sort: MatSort; ngOnInit() { + this.dataSource.sort = this.sort; } } diff --git a/src/app/components/feed/feed.component.ts b/src/app/components/feed/feed.component.ts index 73094f0..400c4d3 100644 --- a/src/app/components/feed/feed.component.ts +++ b/src/app/components/feed/feed.component.ts @@ -36,12 +36,12 @@ export class FeedComponent implements OnInit { this.data.currentUserInfo.subscribe(user => { this.user = user; this.loggedIn = user.loggedIn; - this.feedService.getAllPostsRaw().subscribe(response => { - this.loading = false; - this.feedNew = this.feedService.renderAllPosts(response.json()); - this.parentSelectedPostList = this.feedNew; - this.feedMostLiked = this.feedNew; - }); + }); + this.feedService.getAllPostsRaw().subscribe(response => { + this.loading = false; + this.feedNew = this.feedService.renderAllPosts(response.json()); + this.parentSelectedPostList = this.feedNew; + this.feedMostLiked = this.feedNew; }); } diff --git a/src/app/components/profile/profile.component.html b/src/app/components/profile/profile.component.html index 12bad54..7dad600 100644 --- a/src/app/components/profile/profile.component.html +++ b/src/app/components/profile/profile.component.html @@ -60,50 +60,7 @@
-
-

What does the level mean?

-

There are different levels you can reach through green behaviour. - Collect 100 points to level up! The levels are called: -

- - - - - - - - - - - -
level {{level.level}} level name {{level.name}}
-
-

How to level up?

-

There is an always growing list of things you can do, - to support your environment - and earn points to level up at the same time. - You can get a different amount of points - for differnet actions you can see in the list below: -

- - - - - - - - - - - - - - - - - -
points {{action.points}} action {{action.name}}
+