BETTERZON-109 (#57)

* BETTERZON-31, dependencies.

* BETTERZON-31: Fixing dependencies

* BETTERZON-31,
BETTERZON-50

info popover and footer had been changed.

* BETTERZON-74

simple top-bar has been created.

* WIP: creating footer using grid.

* BETTERZON-78 adding bottom bar and top bar

* Adding cookieconsent as dependency again since it was removed by a merge

* Adding cookieconsent as dependency again since it was removed by a merge

* Apply suggestions from code review

Switching from single to double quotes

* BETTERZON-78 - grid added, structured as in Adobe XD mockup

* wip: component rewritten, simple grid applied.

* wip: new component created and added to the app.module.ts. Added a minimal grid layout.

* wip: all components were wrapped now. Grid structure has been applied to the main wrapper-class "container".

* wip: component created and added to the app.module.ts

Co-authored-by: Patrick Müller <patrick@mueller-patrick.tech>
Co-authored-by: Patrick <50352812+Mueller-Patrick@users.noreply.github.com>
This commit is contained in:
Reboooooorn 2021-05-20 10:36:52 +02:00 committed by GitHub
parent fc9c7f63cf
commit e4565f7435
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 307 additions and 15 deletions

View File

@ -9,6 +9,5 @@
<exclude-output /> <exclude-output />
<content url="file://$MODULE_DIR$" /> <content url="file://$MODULE_DIR$" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Python 3.9 (venv) interpreter library" level="application" />
</component> </component>
</module> </module>

View File

@ -1,7 +1,13 @@
<app-top-bar></app-top-bar> <div class="container">
<div class="page-content"> <div class="header">
<app-top-bar></app-top-bar>
</div>
<div class="page-content">
<router-outlet></router-outlet> <router-outlet></router-outlet>
</div>
<div class="footer">
<app-bottom-bar></app-bottom-bar>
</div>
</div> </div>
<app-bottom-bar></app-bottom-bar>

View File

@ -29,6 +29,8 @@ import {MatIconModule} from '@angular/material/icon';
import {MatSidenavModule} from '@angular/material/sidenav'; import {MatSidenavModule} from '@angular/material/sidenav';
import {MatListModule} from "@angular/material/list"; import {MatListModule} from "@angular/material/list";
import {BottomBarComponent} from './components/bottom-bar/bottom-bar.component'; import {BottomBarComponent} from './components/bottom-bar/bottom-bar.component';
import { HotDealsWidgetComponent } from './components/hot-deals-widget/hot-deals-widget.component';
import { SliderForProductsComponent } from './components/slider-for-products/slider-for-products.component';
// For cookie popup // For cookie popup
@ -85,7 +87,9 @@ const cookieConfig: NgcCookieConsentConfig = {
ImprintComponent, ImprintComponent,
PrivacyComponent, PrivacyComponent,
TopBarComponent, TopBarComponent,
BottomBarComponent BottomBarComponent,
HotDealsWidgetComponent,
SliderForProductsComponent
], ],
imports: [ imports: [
BrowserModule, BrowserModule,

View File

@ -0,0 +1,70 @@
.hot-deal-widget-wrapper{
width: 1640px;
height: 820px;
background-color: #f8f9fa;
display: grid;
grid-template-columns: repeat(2, 1fr);
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;
}

View File

@ -0,0 +1,23 @@
<div class="hot-deal-widget-wrapper">
<div class="product-description">
<div id="hot-deals">
<h1>HOT DEALS</h1>
</div>
<div id="product-name">
<h1>Neues Apple iPhone 12 Pro <br> (512 GB) - Graphit</h1>
</div>
<div id="sales">
SPARE BIS ZU 7%!
</div>
<div id="futher-informations">
Weitere Informationen
</div>
<div id="points">
points
</div>
</div>
<div class="product-image">
<img src="assets/images/iphone-12-pro-silver-hero.png" height="771">
</div>
</div>

View File

@ -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<HotDealsWidgetComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ HotDealsWidgetComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(HotDealsWidgetComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

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

View File

@ -0,0 +1 @@
<p>slider-for-products works!</p>

View File

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { SliderForProductsComponent } from './slider-for-products.component';
describe('SliderForProductsComponent', () => {
let component: SliderForProductsComponent;
let fixture: ComponentFixture<SliderForProductsComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ SliderForProductsComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(SliderForProductsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-slider-for-products',
templateUrl: './slider-for-products.component.html',
styleUrls: ['./slider-for-products.component.css']
})
export class SliderForProductsComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

View File

@ -1 +1,54 @@
.top-bar-wrapper {
display: grid;
grid-template-columns: 200px 360px 820px 20px 250px;
grid-template-rows: 40px;
grid-column-gap: 0px;
grid-row-gap: 0px;
align-items: center;
}
.top-logo {
grid-area: 1/1;
}
#better {
font-size: 28px;
font-weight: bold;
color: #3480E3;
}
#zon {
font-size: 28px;
font-weight: bold;
color: #E53167;
}
.search-button {
/*background-color: #E53167;*/
}
.sign-up {
/*background-color: #E53167;*/
margin-left: 50px;
margin-right: 25px;
}
.login {
margin-right: 25px;
}
#signin {
border-radius: 25px;
background-color: #E53167;
}
._links > a {
/*background-color: #E53167;*/
margin-left: 10px;
margin-right: 10px;
}
._signing_links > a {
/*background-color: #E53167;*/
margin-left: 50px;
}

View File

@ -1,4 +1,26 @@
<div class="top-bar-wrapper">
<div class="<top-logo>">
<a><span id="better">BETTER</span><span id="zon">ZON</span></a>
</div>
<div class="links">
<nav class="_links">
<a>KONTAKTIERE UNS</a>
<a>KUNDEN</a>
<a>FAQ</a>
</nav>
</div>
<div class="footer_space">
</div>
<div class="search-button">
<a> <a>
<img src="assets/images/Betterzon.svg" [routerLink]="''" alt="Betterzon Logo" width="50px"> <img src="assets/images/search_black_24dp.svg" alt="Sarch button">
</a> </a>
<a class="button fancy-button"><i class="material-icons">shopping_cart</i>Checkout</a> </div>
<div class="links">
<nav class="_signing_links">
<a>SIGN UP</a>
<a><span id="signin">SIGN IN</span></a>
</nav>
</div>
</div>

View File

@ -1,4 +1,6 @@
<div id="mainComponents"> <app-hot-deals-widget></app-hot-deals-widget>
<!--<div id="mainComponents">
<div id="searchContainer"> <div id="searchContainer">
<input type="text" [(ngModel)]="searchInput" placeholder="Search" (keyup.enter)="startedSearch()"> <input type="text" [(ngModel)]="searchInput" placeholder="Search" (keyup.enter)="startedSearch()">
</div> </div>
@ -14,3 +16,4 @@
</div> </div>
</div> </div>
</div> </div>
-->

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0z" fill="none"/><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>

After

Width:  |  Height:  |  Size: 392 B

View File

@ -104,18 +104,48 @@ label {
padding-right: 4px; padding-right: 4px;
} }
/* Main Container */
.container {
position: fixed;
left: 50%;
margin-left: -820px;
width: 1640px;
height: auto;
display: grid;
grid-template-rows: 70px auto 210px;
}
.header {
grid-row: 1/2;
}
.page-content {
grid-row: 2/3;
}
.footer {
grid-row: 3/4;
}
/* End of Main Container */
/* Top Bar */ /* Top Bar */
app-top-bar { app-top-bar {
width: 100%; width: 1640px;
height: 68px; height: 70px;
background-color: #f2f2f2; background-color: #ffffff;
padding: 16px; padding: 16px;
position: fixed;
left: 50%;
top:0;
margin-left: -820px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
box-shadow: 0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12) /*box-shadow: 0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)*/
} }
app-top-bar h1 { app-top-bar h1 {