[develop | DONE | ADDED] add cookie banner

This commit is contained in:
argirok 2023-12-06 15:14:43 +02:00
parent c549507a22
commit ac88f3c670
2 changed files with 19 additions and 1 deletions

View File

@ -27,6 +27,17 @@ import {LayoutService} from "./openaireLibrary/dashboard/sharedComponents/sideba
</main>
</div>
</div>
<cookie-law *ngIf="isClient" position="bottom" cookieName="cookieLawSeen-NOAMIreland">
National Open Access Monitor - Ireland, uses cookies in order to function properly.<br>
Cookies are small pieces of data that websites store in your browser to allow us to give you the best browsing
experience possible.
By using the National Open Access Monitor - Ireland portal you accept our use of cookies. <!--<a
href="https://www.openaire.eu/privacy-policy#cookies" target="_blank"> Read more <span class="uk-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="chevron-right"
ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.03"
points="7 4 13 10 7 16"></polyline></svg>
</span></a>-->
</cookie-law>
`
})
export class AppComponent extends StakeholderBaseComponent implements OnInit {
@ -45,6 +56,7 @@ export class AppComponent extends StakeholderBaseComponent implements OnInit {
userMenuItems: MenuItem[] = [];
irish: Irish = new Irish();
user: User;
isClient:boolean = false;
constructor(protected _route: ActivatedRoute,
protected _router: Router,
@ -72,6 +84,10 @@ export class AppComponent extends StakeholderBaseComponent implements OnInit {
this.subscriptions.push(this.layoutService.rootClass.subscribe(rootClass => {
this.rootClass = rootClass;
}));
if (typeof document !== 'undefined') {
this.isClient = true;
}
}
initialize() {

View File

@ -13,6 +13,7 @@ import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-int
import {SharedModule} from "./openaireLibrary/shared/shared.module";
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
import {ErrorModule} from "./openaireLibrary/error/error.module";
import {CookieLawModule} from "./openaireLibrary/sharedComponents/cookie-law/cookie-law.module";
@NgModule({
declarations: [
@ -27,7 +28,8 @@ import {ErrorModule} from "./openaireLibrary/error/error.module";
LoadingModule,
NavigationBarModule,
BottomModule,
AppRoutingModule
AppRoutingModule,
CookieLawModule
],
providers: [
{provide: APP_ID, useValue: 'irish-monitor'},