From 017a38c667c6be36890d931c5f94f8ea764bb27a Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Thu, 8 Dec 2022 11:52:26 +0200 Subject: [PATCH] reduce faq's page title, tweaks for homepage's scrolling section on mobile view, update submodules --- src/app/about/faqs.component.html | 2 +- src/app/home/home.component.html | 17 ++++++++--------- src/app/home/home.component.ts | 18 ++++++++++++++++-- src/app/openaireLibrary | 2 +- 4 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/app/about/faqs.component.html b/src/app/about/faqs.component.html index 31b343f..d5634e7 100644 --- a/src/app/about/faqs.component.html +++ b/src/app/about/faqs.component.html @@ -16,7 +16,7 @@
-

Frequently Asked
QuestionsFrequently Asked
Questions.

diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index 9c7c285..cebf255 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -1,4 +1,4 @@ -
+
@@ -24,7 +24,7 @@
- +
@@ -89,15 +89,14 @@
-
+
@@ -374,7 +373,7 @@
{{(numberSize.number|number) + numberSize.size}}
-
{{name}}
+
{{name}}
diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index d232da1..92f8b75 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -1,9 +1,12 @@ import { AfterViewInit, + ChangeDetectorRef, Component, ElementRef, + Inject, OnDestroy, OnInit, + PLATFORM_ID, QueryList, ViewChild, ViewChildren @@ -12,7 +15,6 @@ import {ActivatedRoute, Router} from '@angular/router'; import {Meta, Title} from '@angular/platform-browser'; import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service'; - import {ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes'; import {ErrorMessagesComponent} from '../openaireLibrary/utils/errorMessages.component'; import {HelperService} from "../openaireLibrary/utils/helper/helper.service"; @@ -30,6 +32,8 @@ import {Subscriber} from "rxjs"; import {QuickContactService} from '../openaireLibrary/sharedComponents/quick-contact/quick-contact.service'; import {IDeactivateComponent} from "../openaireLibrary/utils/can-exit.guard"; import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields"; +import {isPlatformServer} from '@angular/common'; +import {LayoutService} from '../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service'; @Component({ selector: 'home', @@ -69,6 +73,8 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit, IDeactiv private user: User; @ViewChildren('scrolling_element') elements: QueryList; @ViewChild('contact') contact: ElementRef; + isMobile: boolean = false; + isServer: boolean; constructor( private route: ActivatedRoute, @@ -83,7 +89,10 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit, IDeactiv private seoService: SEOService, private _refineFieldResultsService: RefineFieldResultsService, private _searchResearchResultsService: SearchResearchResultsService, - private quickContactService: QuickContactService) { + private quickContactService: QuickContactService, + private layoutService: LayoutService, + private cdr: ChangeDetectorRef, + @Inject(PLATFORM_ID) private platform: any) { this._meta.updateTag({content: this.description}, "name='description'"); this._meta.updateTag({content: this.description}, "property='og:description'"); this._meta.updateTag({content: this.pageTitle}, "property='og:title'"); @@ -91,6 +100,7 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit, IDeactiv this.errorCodes = new ErrorCodes(); this.errorMessages = new ErrorMessagesComponent(); this.status = this.errorCodes.LOADING; + this.isServer = isPlatformServer(this.platform); } public ngOnInit() { @@ -108,6 +118,10 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit, IDeactiv this.user = user; this.getStakeholders(); })); + this.layoutService.isMobile.subscribe(isMobile => { + this.isMobile = isMobile; + this.cdr.detectChanges(); + }); } canExit(): boolean { diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index de42da8..b50deff 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit de42da8b6cfa2fd27d2120efb18a62f6c85240eb +Subproject commit b50deff46b84e18496718839e99d065deb9c3884