Skip to content
Permalink
Browse files
chore(cookie-policy): reactivate the cookie policy banner (DSP-1727) (#…
…461)

* chore(cookie-policy): reactivate the cookie policy banner (DSP-1727)

* fix(cookie-policy): bug fix in cookie policy link

* chore(cookie-policy): better sentence
  • Loading branch information
kilchenmann committed Jun 11, 2021
1 parent a13b8ba commit ac99fbc74c0322eaa50a6bb510124714c72aa070
@@ -8,4 +8,16 @@
<router-outlet></router-outlet>
</div>

<!-- cookie information banner -->
<div class="cookie-banner" *ngIf="showCookieBanner">
<p class="note">
This web-application uses cookies to provide you with a greater user experience. By using the application you
accept our <span class="link" (click)="goToCookiePolicy()">use of cookies</span>.
</p>
<div class="action">
<button mat-flat-button color="accent" (click)="closeCookieBanner()">
ACCEPT
</button>
</div>
</div>
</div>
@@ -0,0 +1,28 @@
@import "../assets/style/theme";


.cookie-banner {
position: fixed;
bottom: 0;
height: 128px;
width: 100%;
background: rgba(0, 0, 0, 0.75);
color: #fff;
z-index: 100;
// display: inline-flex;
padding: 24px 0;

.note {
text-align: center;

.link {
color: $accent;
text-decoration: underline;
}
}

.action button {
margin: 0 auto 24px auto;
display: block;
}
}
@@ -1,5 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { Router } from '@angular/router';

@Component({
selector: 'app-root',
@@ -8,17 +9,33 @@ import { Title } from '@angular/platform-browser';
})
export class AppComponent implements OnInit {

showCookieBanner = true;
session = false;

constructor(
private _titleService: Title) {
private _router: Router,
private _titleService: Title
) {

// set the page title
this._titleService.setTitle('DaSCH Service Platform');

}

ngOnInit() {
if (sessionStorage.getItem('cookieBanner') === null) {
sessionStorage.setItem('cookieBanner', JSON.stringify(this.showCookieBanner));
} else {
this.showCookieBanner = JSON.parse(sessionStorage.getItem('cookieBanner'));
}
}

goToCookiePolicy() {
this._router.navigate(['cookie-policy']);
}

closeCookieBanner() {
this.showCookieBanner = !this.showCookieBanner;
sessionStorage.setItem('cookieBanner', JSON.stringify(this.showCookieBanner));
}
}
@@ -0,0 +1,3 @@
.content.large.middle {
padding-bottom: 196px;
}
@@ -1,17 +1,6 @@
<!-- show landing page in case of guest user -->
<div class="landing-page">
<div class="cookie-banner" *ngIf="showCookieBanner">
<p class="note">
This web-application uses cookies to provide you with great user experience. By using the application you
accept our
<a href="./cookie-policy">use of cookies</a>.
</p>
<div class="action">
<button mat-flat-button color="accent" (click)="closeCookieBanner()">
ACCEPT
</button>
</div>
</div>

<!-- introduction: headline, info and parallax background image -->
<section class="intro parallax-wrapper bg-1">
<div class="parallax-curtain">
@@ -74,32 +74,6 @@ section {
}
}

.cookie-banner {
position: fixed;
bottom: 0;
height: 128px;
width: 100%;
background: rgba(0, 0, 0, 0.75);
color: #fff;
z-index: 100;
// display: inline-flex;
padding: 24px 0;

.note {
text-align: center;

a {
color: inherit;
text-decoration: underline;
}
}

.action button {
margin: 0 auto 24px auto;
display: block;
}
}

.app-headline {
line-height: 1.5;
letter-spacing: 2px;
@@ -119,14 +93,6 @@ section {
height: 140px;
}

.help-page,
.landing-page {
.features,
.projects {
// width: calc(100% - 16px);
}
}

.research {
.content-research {
padding: 16px 0 1px 0 !important;
@@ -84,11 +84,6 @@ export class MainComponent implements OnInit {
}

ngOnInit() {
if (sessionStorage.getItem('cookieBanner') === null) {
sessionStorage.setItem('cookieBanner', JSON.stringify(this.showCookieBanner));
} else {
this.showCookieBanner = JSON.parse(sessionStorage.getItem('cookieBanner'));
}
this.loadProjects();
}

@@ -127,8 +122,4 @@ export class MainComponent implements OnInit {
);
}

closeCookieBanner() {
this.showCookieBanner = !this.showCookieBanner;
sessionStorage.setItem('cookieBanner', JSON.stringify(this.showCookieBanner));
}
}

0 comments on commit ac99fbc

Please sign in to comment.