[master]: Change text size in about first section and fix resize observer in server

This commit is contained in:
Konstantinos Triantafyllou 2024-03-19 16:53:27 +02:00
parent 5196f25525
commit 090eaa08cc
2 changed files with 22 additions and 20 deletions

View File

@ -21,7 +21,7 @@
</ng-template> </ng-template>
<ng-template #mission> <ng-template #mission>
<div class="uk-h5 uk-width-2-5@m uk-width-1-1"> <div class="uk-text-large uk-width-2-5@m uk-width-1-1">
At the heart of this platform is the mission to provide transparent, comprehensive insights into the state of Open Access in Ireland. 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, It serves as a key instrument for analyzing trends, identifying challenges,
and guiding policy development towards achieving an open, accessible, and sustainable research environment. and guiding policy development towards achieving an open, accessible, and sustainable research environment.
@ -144,7 +144,7 @@
<ng-container *ngTemplateOutlet="about"></ng-container> <ng-container *ngTemplateOutlet="about"></ng-container>
</div> </div>
<div [ngClass]="isMobile ? 'uk-margin-medium-top' : ''"> <div [ngClass]="isMobile ? 'uk-margin-medium-top' : ''">
<div class="uk-card uk-card-body uk-card-default uk-background-secondary uk-light uk-margin-auto pilot"> <div class="uk-card uk-card-body uk-card-default uk-background-secondary uk-light uk-margin-auto pilot uk-text-large">
<ng-container *ngTemplateOutlet="pilot"></ng-container> <ng-container *ngTemplateOutlet="pilot"></ng-container>
</div> </div>
</div> </div>

View File

@ -87,13 +87,14 @@ export class YouWeComponent implements AfterViewInit, AfterContentChecked, OnDes
ngOnDestroy() { ngOnDestroy() {
this.subscriptions.forEach(subscription => { this.subscriptions.forEach(subscription => {
if (subscription instanceof (ResizeObserver || IntersectionObserver)) { if (typeof ResizeObserver != 'undefined' && subscription instanceof ResizeObserver) {
subscription.disconnect(); subscription.disconnect();
} }
}); });
} }
public observeSticky() { public observeSticky() {
if(typeof ResizeObserver != 'undefined') {
let resizeObs = new ResizeObserver(entries => { let resizeObs = new ResizeObserver(entries => {
entries.forEach(entry => { entries.forEach(entry => {
setTimeout(() => { setTimeout(() => {
@ -111,6 +112,7 @@ export class YouWeComponent implements AfterViewInit, AfterContentChecked, OnDes
this.isSticky = false; this.isSticky = false;
})); }));
} }
}
calcOffset(element) { calcOffset(element) {
this.height = element.offsetHeight; this.height = element.offsetHeight;