From e65dadf4dddd09c7c241ec22790b739ce8ded6ad Mon Sep 17 00:00:00 2001 From: Cathy Hu Date: Thu, 3 Sep 2020 19:54:46 +0200 Subject: [PATCH] [frontend] Add public platform section --- .../platforms-info-dialog.component.html | 1 + .../platforms-info-dialog.component.scss | 0 .../platforms-info-dialog.component.ts | 12 ++++++++++ .../platforms-info-page.component.html | 17 +++++++++++++ .../platforms-info-page.component.scss | 9 +++++++ .../platforms-info-page.component.spec.ts | 24 +++++++++++++++++++ .../platforms-info-page.component.ts | 20 ++++++++++++++++ 7 files changed, 83 insertions(+) create mode 100644 kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-dialog/platforms-info-dialog.component.html create mode 100644 kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-dialog/platforms-info-dialog.component.scss create mode 100644 kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-dialog/platforms-info-dialog.component.ts create mode 100644 kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-page.component.html create mode 100644 kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-page.component.scss create mode 100644 kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-page.component.spec.ts create mode 100644 kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-page.component.ts diff --git a/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-dialog/platforms-info-dialog.component.html b/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-dialog/platforms-info-dialog.component.html new file mode 100644 index 0000000..d9dd255 --- /dev/null +++ b/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-dialog/platforms-info-dialog.component.html @@ -0,0 +1 @@ +

platforms-info-dialog works!

diff --git a/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-dialog/platforms-info-dialog.component.scss b/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-dialog/platforms-info-dialog.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-dialog/platforms-info-dialog.component.ts b/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-dialog/platforms-info-dialog.component.ts new file mode 100644 index 0000000..57b23e8 --- /dev/null +++ b/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-dialog/platforms-info-dialog.component.ts @@ -0,0 +1,12 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-platforms-info-dialog', + templateUrl: './platforms-info-dialog.component.html', + styleUrls: ['./platforms-info-dialog.component.scss'], +}) +export class PlatformsInfoDialogComponent implements OnInit { + constructor() {} + + ngOnInit(): void {} +} diff --git a/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-page.component.html b/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-page.component.html new file mode 100644 index 0000000..e75ecd0 --- /dev/null +++ b/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-page.component.html @@ -0,0 +1,17 @@ +

+ Platforms - choose one, get all hood messages + +

+ +
+ + + +
diff --git a/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-page.component.scss b/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-page.component.scss new file mode 100644 index 0000000..f74a4a3 --- /dev/null +++ b/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-page.component.scss @@ -0,0 +1,9 @@ +.container { + display: grid; + grid-template-columns: 1fr 1fr 1fr; + gap: 10px; + + @media (max-width: 600px) { + grid-template-columns: 1fr; + } +} diff --git a/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-page.component.spec.ts b/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-page.component.spec.ts new file mode 100644 index 0000000..c744658 --- /dev/null +++ b/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-page.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PlatformsInfoPageComponent } from './platforms-info-page.component'; + +describe('PlatformsInfoPageComponent', () => { + let component: PlatformsInfoPageComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [PlatformsInfoPageComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(PlatformsInfoPageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-page.component.ts b/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-page.component.ts new file mode 100644 index 0000000..7bc9dd8 --- /dev/null +++ b/kibicara-frontend/src/app/platforms/platforms-info-page/platforms-info-page.component.ts @@ -0,0 +1,20 @@ +import { Component, OnInit, Input } from '@angular/core'; +import { MatDialog } from '@angular/material/dialog'; +import { PlatformsInfoDialogComponent } from './platforms-info-dialog/platforms-info-dialog.component'; + +@Component({ + selector: 'app-platforms-info-page', + templateUrl: './platforms-info-page.component.html', + styleUrls: ['./platforms-info-page.component.scss'], +}) +export class PlatformsInfoPageComponent implements OnInit { + @Input() hoodId; + + constructor(private dialog: MatDialog) {} + + ngOnInit(): void {} + + onInfoClick() { + this.dialog.open(PlatformsInfoDialogComponent); + } +}