From 090eaa08cccff46a2c8b5f1cc645d69965dd1b6b Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 19 Mar 2024 16:53:27 +0200 Subject: [PATCH] [master]: Change text size in about first section and fix resize observer in server --- .../how-it-works/about.component.html | 6 ++-- .../how-it-works/you-we.component.ts | 36 ++++++++++--------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/app/resources/how-it-works/about.component.html b/src/app/resources/how-it-works/about.component.html index 8df72a9..7c323e2 100644 --- a/src/app/resources/how-it-works/about.component.html +++ b/src/app/resources/how-it-works/about.component.html @@ -21,7 +21,7 @@ -
+
At the heart of this platform is the mission to provide transparent, comprehensive insights into the state of Open Access in Ireland. It serves as a key instrument for analyzing trends, identifying challenges, and guiding policy development towards achieving an open, accessible, and sustainable research environment. @@ -144,7 +144,7 @@
-
+
@@ -180,4 +180,4 @@
- \ No newline at end of file + diff --git a/src/app/resources/how-it-works/you-we.component.ts b/src/app/resources/how-it-works/you-we.component.ts index d8a459a..00d5f18 100644 --- a/src/app/resources/how-it-works/you-we.component.ts +++ b/src/app/resources/how-it-works/you-we.component.ts @@ -87,29 +87,31 @@ export class YouWeComponent implements AfterViewInit, AfterContentChecked, OnDes ngOnDestroy() { this.subscriptions.forEach(subscription => { - if (subscription instanceof (ResizeObserver || IntersectionObserver)) { + if (typeof ResizeObserver != 'undefined' && subscription instanceof ResizeObserver) { subscription.disconnect(); } }); } public observeSticky() { - let resizeObs = new ResizeObserver(entries => { - entries.forEach(entry => { - setTimeout(() => { - this.offset = this.calcOffset(entry.target); - this.cdr.detectChanges(); - }); - }) - }); - this.subscriptions.push(resizeObs); - resizeObs.observe(this.sticky.nativeElement); - this.subscriptions.push(UIkit.util.on('#sticky-' + this.id, 'active', (): void => { - this.isSticky = true; - })); - this.subscriptions.push(UIkit.util.on('#sticky-' + this.id, 'inactive', () => { - this.isSticky = false; - })); + if(typeof ResizeObserver != 'undefined') { + let resizeObs = new ResizeObserver(entries => { + entries.forEach(entry => { + setTimeout(() => { + this.offset = this.calcOffset(entry.target); + this.cdr.detectChanges(); + }); + }) + }); + this.subscriptions.push(resizeObs); + resizeObs.observe(this.sticky.nativeElement); + this.subscriptions.push(UIkit.util.on('#sticky-' + this.id, 'active', (): void => { + this.isSticky = true; + })); + this.subscriptions.push(UIkit.util.on('#sticky-' + this.id, 'inactive', () => { + this.isSticky = false; + })); + } } calcOffset(element) {