From acc6e3316423d733b2a95868fdbbbe35c0d1a12d Mon Sep 17 00:00:00 2001 From: Cathy Hu Date: Thu, 3 Sep 2020 19:56:00 +0200 Subject: [PATCH] [frontend] Fix hood page --- .../app/dashboard/hoods/hoods.component.scss | 4 ---- .../src/app/hoodpage/hoodpage.component.html | 11 +++++++---- .../src/app/hoodpage/hoodpage.component.scss | 17 +++++++++++++++++ .../src/app/hoodpage/hoodpage.component.ts | 7 ++++--- .../src/app/hoodspage/hoodspage.component.scss | 4 ---- 5 files changed, 28 insertions(+), 15 deletions(-) diff --git a/kibicara-frontend/src/app/dashboard/hoods/hoods.component.scss b/kibicara-frontend/src/app/dashboard/hoods/hoods.component.scss index 6b48f55..08d432b 100644 --- a/kibicara-frontend/src/app/dashboard/hoods/hoods.component.scss +++ b/kibicara-frontend/src/app/dashboard/hoods/hoods.component.scss @@ -1,7 +1,3 @@ -a { - text-decoration: none; -} - .title { text-align: left; padding-top: 10%; diff --git a/kibicara-frontend/src/app/hoodpage/hoodpage.component.html b/kibicara-frontend/src/app/hoodpage/hoodpage.component.html index 9f70a60..e636aab 100644 --- a/kibicara-frontend/src/app/hoodpage/hoodpage.component.html +++ b/kibicara-frontend/src/app/hoodpage/hoodpage.component.html @@ -1,5 +1,8 @@ -

- {{ hood.name }} -

+
+

Hood - {{ hood.name }}

+
+ +
- + +
diff --git a/kibicara-frontend/src/app/hoodpage/hoodpage.component.scss b/kibicara-frontend/src/app/hoodpage/hoodpage.component.scss index e69de29..27ddfd6 100644 --- a/kibicara-frontend/src/app/hoodpage/hoodpage.component.scss +++ b/kibicara-frontend/src/app/hoodpage/hoodpage.component.scss @@ -0,0 +1,17 @@ +.container { + display: grid; + margin-left: 15%; + margin-right: 15%; + margin-top: 5%; + margin-bottom: 5%; + gap: 30px; +} + +.heading { + font-size: 2.3125rem; + margin-bottom: 20px; +} + +.markdown { + margin-bottom: 50px; +} diff --git a/kibicara-frontend/src/app/hoodpage/hoodpage.component.ts b/kibicara-frontend/src/app/hoodpage/hoodpage.component.ts index 3445bf5..c82879a 100644 --- a/kibicara-frontend/src/app/hoodpage/hoodpage.component.ts +++ b/kibicara-frontend/src/app/hoodpage/hoodpage.component.ts @@ -9,6 +9,7 @@ import { first } from 'rxjs/operators'; styleUrls: ['./hoodpage.component.scss'], }) export class HoodpageComponent implements OnInit { + hoodId; hood: BodyHood; constructor( @@ -18,10 +19,10 @@ export class HoodpageComponent implements OnInit { ) {} ngOnInit(): void { - const hoodId = this.route.snapshot.params['id']; - if (hoodId) { + this.hoodId = this.route.snapshot.params['id']; + if (this.hoodId) { this.hoodsService - .getHood(hoodId) + .getHood(this.hoodId) .pipe(first()) .subscribe((data) => { this.hood = data; diff --git a/kibicara-frontend/src/app/hoodspage/hoodspage.component.scss b/kibicara-frontend/src/app/hoodspage/hoodspage.component.scss index 159bd85..c3435b1 100644 --- a/kibicara-frontend/src/app/hoodspage/hoodspage.component.scss +++ b/kibicara-frontend/src/app/hoodspage/hoodspage.component.scss @@ -1,7 +1,3 @@ -a { - text-decoration: none; -} - .searchbar { margin-top: 30px; width: 100%;