[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 {
text-align: left;
padding-top: 10%;

View file

@ -1,5 +1,8 @@
<h1>
{{ hood.name }}
</h1>
<div class="container">
<h1 class="heading">Hood - {{ hood.name }}</h1>
<div>
<markdown class="markdown" [data]="hood.landingpage"></markdown>
</div>
<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'],
})
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;

View file

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