mirror of
https://github.com/Mueller-Patrick/Betterzon.git
synced 2024-12-22 19:55:12 +00:00
BETTERZON-78 (#39)
* 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 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:
parent
e7543e6430
commit
fc9c7f63cf
|
@ -24,6 +24,9 @@
|
|||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
{
|
||||
"input": "src/themes.scss"
|
||||
},
|
||||
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
|
||||
"src/styles.css",
|
||||
"./node_modules/cookieconsent/build/cookieconsent.min.css"
|
||||
|
@ -88,13 +91,18 @@
|
|||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"codeCoverage": true,
|
||||
"codeCoverageExclude": ["src/app/mocks/mock.service.ts"],
|
||||
"codeCoverageExclude": [
|
||||
"src/app/mocks/mock.service.ts"
|
||||
],
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
|
||||
{
|
||||
"input": "src/themes.scss"
|
||||
},
|
||||
"src/styles.css",
|
||||
"./node_modules/cookieconsent/build/cookieconsent.min.css"
|
||||
],
|
||||
|
|
17128
Frontend/package-lock.json
generated
17128
Frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -18,15 +18,19 @@
|
|||
"@angular/compiler": "^10.2.3",
|
||||
"@angular/core": "^10.2.3",
|
||||
"@angular/forms": "^10.2.3",
|
||||
"@angular/localize": "^10.2.3",
|
||||
"@angular/material": "~10.2.7",
|
||||
"@angular/platform-browser": "^10.2.3",
|
||||
"@angular/platform-browser-dynamic": "^10.2.3",
|
||||
"@angular/router": "^10.2.3",
|
||||
"@ng-bootstrap/ng-bootstrap": "^8.0.4",
|
||||
"apexcharts": "^3.22.3",
|
||||
"bootstrap": "^4.5.0",
|
||||
"cookieconsent": "^3.1.1",
|
||||
"karma-firefox-launcher": "^2.1.0",
|
||||
"ng": "0.0.0",
|
||||
"ng-apexcharts": "^1.5.6",
|
||||
"ngx-bootstrap": "^6.2.0",
|
||||
"ngx-cookieconsent": "^2.2.3",
|
||||
"rxjs": "~6.6.0",
|
||||
"tslib": "^2.0.3",
|
||||
|
@ -42,7 +46,7 @@
|
|||
"codelyzer": "^6.0.0",
|
||||
"jasmine-core": "~3.6.0",
|
||||
"jasmine-spec-reporter": "~5.0.0",
|
||||
"karma": "~5.0.0",
|
||||
"karma": "^6.3.2",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma-coverage-istanbul-reporter": "~3.0.2",
|
||||
"karma-jasmine": "~4.0.0",
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -1 +1,7 @@
|
|||
<router-outlet></router-outlet>
|
||||
<app-top-bar></app-top-bar>
|
||||
<div class="page-content">
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
<app-bottom-bar></app-bottom-bar>
|
||||
|
||||
|
||||
|
|
|
@ -16,10 +16,20 @@ import {NewestPricesListComponent} from './components/newest-prices-list/newest-
|
|||
import {FormsModule} from '@angular/forms';
|
||||
import {PageNotFoundPageComponent} from './pages/page-not-found-page/page-not-found-page.component';
|
||||
import {MatMenuModule} from '@angular/material/menu';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
||||
import {ImprintComponent} from './pages/imprint/imprint.component';
|
||||
import {PrivacyComponent} from './pages/privacy/privacy.component';
|
||||
import {NgcCookieConsentModule, NgcCookieConsentConfig} from 'ngx-cookieconsent';
|
||||
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||
import {TopBarComponent} from './components/top-bar/top-bar.component';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {MatButtonModule} from "@angular/material/button";
|
||||
import {MatToolbarModule} from '@angular/material/toolbar';
|
||||
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';
|
||||
|
||||
|
||||
// For cookie popup
|
||||
const cookieConfig: NgcCookieConsentConfig = {
|
||||
|
@ -73,7 +83,9 @@ const cookieConfig: NgcCookieConsentConfig = {
|
|||
NewestPricesListComponent,
|
||||
PageNotFoundPageComponent,
|
||||
ImprintComponent,
|
||||
PrivacyComponent
|
||||
PrivacyComponent,
|
||||
TopBarComponent,
|
||||
BottomBarComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
|
@ -83,7 +95,17 @@ const cookieConfig: NgcCookieConsentConfig = {
|
|||
FormsModule,
|
||||
MatMenuModule,
|
||||
BrowserAnimationsModule,
|
||||
NgcCookieConsentModule.forRoot(cookieConfig)
|
||||
NgcCookieConsentModule.forRoot(cookieConfig),
|
||||
MatSlideToggleModule,
|
||||
MatButtonModule,
|
||||
MatToolbarModule,
|
||||
MatSidenavModule,
|
||||
MatListModule,
|
||||
MatButtonModule,
|
||||
MatIconModule,
|
||||
RouterModule.forRoot([
|
||||
{path: '', component: LandingpageComponent},
|
||||
]),
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent]
|
||||
|
|
|
@ -0,0 +1,63 @@
|
|||
.bottom-bar-wrapper {
|
||||
display: grid;
|
||||
grid-template-columns: 546px 546px 546px;
|
||||
grid-template-rows: 70px 70px 70px;
|
||||
grid-column-gap: 0px;
|
||||
grid-row-gap: 0px;
|
||||
}
|
||||
|
||||
.folge-uns-item {
|
||||
grid-column: 2; grid-row: 1;
|
||||
justify-self: center;
|
||||
}
|
||||
|
||||
.link-items {
|
||||
grid-column: 2; grid-row: 2;
|
||||
justify-self: center;
|
||||
}
|
||||
|
||||
.footer-links li {
|
||||
display: inline;
|
||||
margin-right: 60px;
|
||||
}
|
||||
|
||||
#footer-line {
|
||||
grid-area: 3/1/3/4;
|
||||
width: 100%;
|
||||
background-color: #000000;
|
||||
height: 2px;
|
||||
}
|
||||
|
||||
.bottom-logo {
|
||||
grid-column: 1; grid-row: 3;
|
||||
}
|
||||
|
||||
.bottom-info {
|
||||
grid-column: 3; grid-row: 3;
|
||||
justify-self: right;
|
||||
}
|
||||
|
||||
#folge {
|
||||
font-size: 46px;
|
||||
font-weight: bold;
|
||||
color: #E53167;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#uns {
|
||||
font-size: 32px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#better {
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
color: #3480E3;
|
||||
}
|
||||
|
||||
#zon {
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
color: #E53167;
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
<div class="bottom-bar-wrapper">
|
||||
<div class="folge-uns-item">
|
||||
<p><span id="folge">FOLGE</span><span id="uns">UNS</span></p>
|
||||
</div>
|
||||
<div class="link-items">
|
||||
<ul style="list-style-type:none" class="footer-links">
|
||||
<li><a href="https://github.com/Mueller-Patrick/Betterzon">GiT</a></li>
|
||||
<li><a href="https://blog.betterzon.xyz/">BLOG</a></li>
|
||||
<li><a href="https://github.com/Mueller-Patrick/Betterzon/wiki">Wiki</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="footer-line">
|
||||
|
||||
</div>
|
||||
<div class="bottom-logo">
|
||||
<p><span id="better">BETTER</span><span id="zon">ZON</span></p>
|
||||
</div>
|
||||
<div class="bottom-info">
|
||||
<ul style="list-style-type:none" class="footer-links">
|
||||
<li><a>DATENSCHUTZERKLÄRUNG</a></li>
|
||||
<li><a>IMPRESSUM</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { BottomBarComponent } from "./bottom-bar.component";
|
||||
|
||||
describe("BottomBarComponent", () => {
|
||||
let component: BottomBarComponent;
|
||||
let fixture: ComponentFixture<BottomBarComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ BottomBarComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(BottomBarComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,15 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-bottom-bar',
|
||||
templateUrl: "./bottom-bar.component.html",
|
||||
styleUrls: ["./bottom-bar.component.css"]
|
||||
})
|
||||
export class BottomBarComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background-color: dimgrey;
|
||||
background-color: #1976d2;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
@ -30,5 +30,3 @@
|
|||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -48,3 +48,8 @@
|
|||
padding: 10px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: relative;
|
||||
margin: auto;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
<div class="searchBox">
|
||||
<input *ngIf="showSearch===true" type="text" [(ngModel)]="searchInput" placeholder="Search" (keyup.enter)="startedSearch()">
|
||||
</div>
|
||||
<div class="slider">
|
||||
<mat-slide-toggle color="primary">dark me</mat-slide-toggle>
|
||||
</div>
|
||||
<div class="profileIcon">
|
||||
<button mat-button [matMenuTriggerFor]="menu">Menu</button>
|
||||
<mat-menu #menu="matMenu">
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
<a>
|
||||
<img src="assets/images/Betterzon.svg" [routerLink]="''" alt="Betterzon Logo" width="50px">
|
||||
</a>
|
||||
<a class="button fancy-button"><i class="material-icons">shopping_cart</i>Checkout</a>
|
|
@ -0,0 +1,25 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TopBarComponent } from './top-bar.component';
|
||||
|
||||
describe('TopBarComponent', () => {
|
||||
let component: TopBarComponent;
|
||||
let fixture: ComponentFixture<TopBarComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ TopBarComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TopBarComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
17
Frontend/src/app/components/top-bar/top-bar.component.ts
Normal file
17
Frontend/src/app/components/top-bar/top-bar.component.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-top-bar',
|
||||
templateUrl: './top-bar.component.html',
|
||||
styleUrls: ['./top-bar.component.css']
|
||||
})
|
||||
export class TopBarComponent implements OnInit {
|
||||
|
||||
sidenav: any;
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
<app-header [showSearch]="false"></app-header>
|
||||
<div id="mainComponents">
|
||||
<div id="searchContainer">
|
||||
<input type="text" [(ngModel)]="searchInput" placeholder="Search" (keyup.enter)="startedSearch()">
|
||||
|
@ -15,4 +14,3 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<app-footer></app-footer>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<app-header [showSearch]="true"></app-header>
|
||||
<div id="mainComponents">
|
||||
<app-product-details [productId]="productId"></app-product-details>
|
||||
<app-newest-prices-list [productId]="productId"></app-newest-prices-list>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<app-header [showSearch]="true"></app-header>
|
||||
<div id="mainComponents">
|
||||
<app-product-list numberOfProducts="20" [showProductPicture]="true" searchQuery="{{searchTerm}}"
|
||||
type="search"></app-product-list>
|
||||
</div>
|
||||
|
||||
<app-footer></app-footer>
|
||||
|
|
|
@ -1,9 +1,139 @@
|
|||
/* You can add global styles to this file, and also import other style files */
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: sans-serif;
|
||||
margin-bottom: 10em;
|
||||
/* general settings */
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html, body { height: 100%; }
|
||||
body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; }
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
/* Text */
|
||||
|
||||
h1 {
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
h1, h2 {
|
||||
font-weight: lighter;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* Hyperlink */
|
||||
|
||||
a {
|
||||
cursor: pointer;
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
opacity: 0.8;
|
||||
color: #3480E3;
|
||||
}
|
||||
|
||||
a, p{
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* links */
|
||||
|
||||
/* Input */
|
||||
|
||||
input {
|
||||
font-size: 14px;
|
||||
border-radius: 2px;
|
||||
padding: 8px;
|
||||
margin-bottom: 16px;
|
||||
border: 1px solid #BDBDBD;
|
||||
}
|
||||
|
||||
label {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 4px;
|
||||
display: block;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
/* Button */
|
||||
.button, button {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 8px 16px;
|
||||
border-radius: 2px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
background-color: #1976d2;
|
||||
color: white;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.button:hover, button:hover {
|
||||
opacity: 0.8;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.button:disabled, button:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: auto;
|
||||
}
|
||||
|
||||
/* Fancy Button */
|
||||
|
||||
.fancy-button {
|
||||
background-color: white;
|
||||
color: #1976d2;
|
||||
}
|
||||
|
||||
.fancy-button i.material-icons {
|
||||
color: #1976d2;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
/* Top Bar */
|
||||
|
||||
app-top-bar {
|
||||
width: 100%;
|
||||
height: 68px;
|
||||
background-color: #f2f2f2;
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
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)
|
||||
}
|
||||
|
||||
app-top-bar h1 {
|
||||
color: white;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Bottom Bar */
|
||||
app-bottom-bar{
|
||||
background-color: #F8F8F8;
|
||||
width: 1640px;
|
||||
height: 210px;
|
||||
position: fixed;
|
||||
margin-top: 90px;
|
||||
bottom: 0;
|
||||
flex-direction: row;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
|
||||
|
|
15
Frontend/src/themes.scss
Normal file
15
Frontend/src/themes.scss
Normal file
|
@ -0,0 +1,15 @@
|
|||
@import '~@angular/material/theming';
|
||||
|
||||
@include mat-core();
|
||||
|
||||
$themes_primary: mat-palette($mat-green);
|
||||
$themes_accent: mat-palette($mat-pink, A200, A100, A400);
|
||||
|
||||
$themes_theme: mat-light-theme((
|
||||
color: (
|
||||
primary: $themes_primary,
|
||||
accent: $themes_accent,
|
||||
)
|
||||
));
|
||||
|
||||
@include angular-material-theme($themes_theme);
|
Loading…
Reference in New Issue
Block a user