From 94c3f537bcc5a72d92015b8404276b67ea08a16d Mon Sep 17 00:00:00 2001 From: Jegor Date: Sun, 16 May 2021 22:42:59 +0200 Subject: [PATCH] wip: new component created and added to the app.module.ts. Added a minimal grid layout. --- Frontend/src/app/app.module.ts | 4 +- .../hot-deals-widget.component.css | 72 +++++++++++++++++++ .../hot-deals-widget.component.html | 23 ++++++ .../hot-deals-widget.component.spec.ts | 25 +++++++ .../hot-deals-widget.component.ts | 15 ++++ 5 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.css create mode 100644 Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.html create mode 100644 Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.spec.ts create mode 100644 Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.ts diff --git a/Frontend/src/app/app.module.ts b/Frontend/src/app/app.module.ts index 0e74770..169233b 100644 --- a/Frontend/src/app/app.module.ts +++ b/Frontend/src/app/app.module.ts @@ -29,6 +29,7 @@ import {MatIconModule} from '@angular/material/icon'; import {MatSidenavModule} from '@angular/material/sidenav'; import {MatListModule} from "@angular/material/list"; import {BottomBarComponent} from './components/bottom-bar/bottom-bar.component'; +import { HotDealsWidgetComponent } from './components/hot-deals-widget/hot-deals-widget.component'; // For cookie popup @@ -85,7 +86,8 @@ const cookieConfig: NgcCookieConsentConfig = { ImprintComponent, PrivacyComponent, TopBarComponent, - BottomBarComponent + BottomBarComponent, + HotDealsWidgetComponent ], imports: [ BrowserModule, diff --git a/Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.css b/Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.css new file mode 100644 index 0000000..4876607 --- /dev/null +++ b/Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.css @@ -0,0 +1,72 @@ +.hot-deal-widget-wrapper{ + width: 1640px; + height: 820px; + background-color: #f8f9fa; + display: grid; + grid-template-columns: repeat(2, 1fr); + grid-column-gap: 0px; + grid-row-gap: 0px; + align-items: center; +} + +.product-description { + /*background-color: #3480E3;*/ + height: 100%; + display: grid; + grid-template-columns: 15% 16px 15% 16px 15% 16px 15% 16px 15% 16px 15% 8px; + grid-template-rows: repeat(5, 1fr); +} + +.product-image { + +} + +#hot-deals{ + /*background-color: #E53167;*/ + justify-self: center; + align-self: center; + grid-column: 3/10; + grid-row: 1/2; +} + +#product-name { + justify-self: center; + align-self: center; + grid-column: 3/10; + grid-row: 2/3; + /*background-color: #E53167;*/ +} + +#product-name > p { + font-size: 65px; +} + +#sales { + justify-self: center; + align-self: center; + grid-column: 3/10; + grid-row: 3/4; + /*background-color: #E53167;*/ +} + +#futher-informations { + justify-self: center; + align-self: center; + grid-column: 3/10; + grid-row: 4/5; + /*background-color: #E53167;*/ +} + +#points { + justify-self: center; + align-self: start; + grid-column: 3/10; + grid-row: 5/6; + /*background-color: #E53167;*/ +} + +.product-image { + display: grid; + justify-content: center; +} + diff --git a/Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.html b/Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.html new file mode 100644 index 0000000..ae2d98f --- /dev/null +++ b/Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.html @@ -0,0 +1,23 @@ +
+
+
+

HOT DEALS

+
+
+

Neues Apple iPhone 12 Pro
(512 GB) - Graphit

+
+
+ SPARE BIS ZU 7%! +
+
+ Weitere Informationen +
+
+ points +
+
+
+ +
+
+ diff --git a/Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.spec.ts b/Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.spec.ts new file mode 100644 index 0000000..9826e63 --- /dev/null +++ b/Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { HotDealsWidgetComponent } from './hot-deals-widget.component'; + +describe('HotDealsWidgetComponent', () => { + let component: HotDealsWidgetComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ HotDealsWidgetComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(HotDealsWidgetComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.ts b/Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.ts new file mode 100644 index 0000000..f41d5da --- /dev/null +++ b/Frontend/src/app/components/hot-deals-widget/hot-deals-widget.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-hot-deals-widget', + templateUrl: './hot-deals-widget.component.html', + styleUrls: ['./hot-deals-widget.component.css'] +}) +export class HotDealsWidgetComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +}