[frontend] Fix hood page

This commit is contained in:
Cathy Hu 2020-09-03 19:56:00 +02:00
parent 380ed56795
commit acc6e33164
5 changed files with 28 additions and 15 deletions

View file

@ -1,7 +1,3 @@
a {
text-decoration: none;
}
.title { .title {
text-align: left; text-align: left;
padding-top: 10%; padding-top: 10%;

View file

@ -1,5 +1,8 @@
<h1> <div class="container">
{{ hood.name }} <h1 class="heading">Hood - {{ hood.name }}</h1>
</h1> <div>
<markdown class="markdown" [data]="hood.landingpage"></markdown>
</div>
<markdown class="markdown" [data]="hood.landingpage"></markdown> <app-platforms-info-page [hoodId]="hoodId"></app-platforms-info-page>
</div>

View file

@ -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;
}

View file

@ -9,6 +9,7 @@ import { first } from 'rxjs/operators';
styleUrls: ['./hoodpage.component.scss'], styleUrls: ['./hoodpage.component.scss'],
}) })
export class HoodpageComponent implements OnInit { export class HoodpageComponent implements OnInit {
hoodId;
hood: BodyHood; hood: BodyHood;
constructor( constructor(
@ -18,10 +19,10 @@ export class HoodpageComponent implements OnInit {
) {} ) {}
ngOnInit(): void { ngOnInit(): void {
const hoodId = this.route.snapshot.params['id']; this.hoodId = this.route.snapshot.params['id'];
if (hoodId) { if (this.hoodId) {
this.hoodsService this.hoodsService
.getHood(hoodId) .getHood(this.hoodId)
.pipe(first()) .pipe(first())
.subscribe((data) => { .subscribe((data) => {
this.hood = data; this.hood = data;

View file

@ -1,7 +1,3 @@
a {
text-decoration: none;
}
.searchbar { .searchbar {
margin-top: 30px; margin-top: 30px;
width: 100%; width: 100%;