reduce faq's page title, tweaks for homepage's scrolling section on mobile view, update submodules

This commit is contained in:
Alex Martzios 2022-12-08 11:52:26 +02:00
parent e5b7d4b5ba
commit 017a38c667
4 changed files with 26 additions and 13 deletions

View File

@ -16,7 +16,7 @@
<div class="uk-background-muted"> <div class="uk-background-muted">
<div class="uk-container uk-container-large"> <div class="uk-container uk-container-large">
<div class="uk-text-center" uk-scrollspy-class> <div class="uk-text-center" uk-scrollspy-class>
<h1 class="uk-heading-small uk-margin-medium-top uk-margin-medium-bottom">Frequently Asked <br> Questions<span <h1 class="uk-margin-medium-top uk-margin-medium-bottom">Frequently Asked <br> Questions<span
class="uk-text-primary">.</span></h1> class="uk-text-primary">.</span></h1>
</div> </div>
</div> </div>

View File

@ -1,4 +1,4 @@
<div class="uk-visible@m"> <div *ngIf="!isMobile" class="uk-visible@m">
<div class="uk-section uk-padding-remove-bottom uk-overflow-hidden home-background"> <div class="uk-section uk-padding-remove-bottom uk-overflow-hidden home-background">
<div class="uk-container uk-container-large" uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200"> <div class="uk-container uk-container-large" uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200">
<div class="uk-grid uk-flex-middle" uk-grid> <div class="uk-grid uk-flex-middle" uk-grid>
@ -24,7 +24,7 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <ng-template #scrolling_text let-position_class="position_class"> <ng-template #scrolling_text let-position_class="position_class">
<div #scrolling_element [class]="position_class" uk-parallax="target: #js-sticky-parallax-images-all; start: 0vh; end: 100% + 100vh - 150vh; opacity: 0,1 20%,1 99%,0"> <div #scrolling_element [class]="position_class" uk-parallax="target: #js-sticky-parallax-images-all; start: 0vh; end: 100% + 100vh - 150vh; opacity: 0,1 20%,1 99%,0">
<h3 class="uk-h2 uk-text-primary"> <h3 class="uk-h2 uk-text-primary">
Monitor, discover and understand. Monitor, discover and understand.
@ -73,7 +73,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> --> </div>
<div class="uk-background-norepeat graph-background"> <div class="uk-background-norepeat graph-background">
<div class="uk-section uk-section-large uk-container uk-container-large uk-margin-large-top uk-margin-large-bottom uk-overflow-hidden"> <div class="uk-section uk-section-large uk-container uk-container-large uk-margin-large-top uk-margin-large-bottom uk-overflow-hidden">
<div class="uk-flex uk-flex-column uk-flex-middle"> <div class="uk-flex uk-flex-column uk-flex-middle">
@ -89,15 +89,14 @@
</div> </div>
</div> </div>
<div class="uk-flex uk-flex-center uk-margin-top uk-margin-medium-bottom" uk-parallax="y: 80, 40, 0, 0"> <div class="uk-flex uk-flex-center uk-margin-top uk-margin-medium-bottom" uk-parallax="y: 80, 40, 0, 0">
<div class="uk-width-1-1 uk-flex-center uk-grid" uk-grid uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-fade; repeat: true"> <div class="uk-width-1-1 uk-flex-center uk-grid" uk-grid uk-height-match="target: .targetName;" uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-fade; repeat: true">
<ng-template #numberCard let-numberSize="numberSize" let-name="name" let-url="url"> <ng-template #numberCard let-numberSize="numberSize" let-name="name" let-url="url">
<a class="uk-card uk-card-default uk-card-hover uk-position-relative uk-padding-small uk-display-block uk-link-reset" <a class="uk-card uk-card-default uk-card-hover uk-position-relative uk-padding-small uk-display-block uk-link-reset"
[href]="url" target="_blank" uk-scrollspy-class> [href]="url" target="_blank" uk-scrollspy-class>
<div class="uk-height-small uk-width-small uk-flex uk-flex-center uk-flex-column"> <div class="uk-height-small uk-width-small uk-flex uk-flex-center uk-flex-column">
<div class="uk-text-center"> <div class="uk-text-center">
<div <div class="uk-text-background uk-text-bold number">{{(numberSize.number|number) + numberSize.size}}</div>
class="uk-text-background uk-text-bold number">{{(numberSize.number|number) + numberSize.size}}</div> <div class="uk-margin-small-top uk-text-large targetName">{{name}}</div>
<div class="uk-margin-small-top uk-text-large">{{name}}</div>
</div> </div>
</div> </div>
</a> </a>
@ -281,7 +280,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="uk-hidden@m"> <div *ngIf="isMobile || isServer" class="uk-hidden@m">
<div class="uk-section uk-padding-remove-bottom uk-overflow-hidden home-background"> <div class="uk-section uk-padding-remove-bottom uk-overflow-hidden home-background">
<div class="uk-container uk-container-large" uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200"> <div class="uk-container uk-container-large" uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-slide-bottom-medium; delay: 200">
<div class="uk-margin-large-bottom"> <div class="uk-margin-large-bottom">
@ -374,7 +373,7 @@
<div class="uk-flex uk-flex-center uk-flex-column uk-margin-auto uk-margin-top"> <div class="uk-flex uk-flex-center uk-flex-column uk-margin-auto uk-margin-top">
<div class="uk-text-center"> <div class="uk-text-center">
<div class="uk-text-background uk-text-bold number">{{(numberSize.number|number) + numberSize.size}}</div> <div class="uk-text-background uk-text-bold number">{{(numberSize.number|number) + numberSize.size}}</div>
<div class="uk-margin-small-top uk-text-bold targetName">{{name}}</div> <div class="uk-margin-small-top uk-text-bolder targetName">{{name}}</div>
</div> </div>
</div> </div>
</a> </a>

View File

@ -1,9 +1,12 @@
import { import {
AfterViewInit, AfterViewInit,
ChangeDetectorRef,
Component, Component,
ElementRef, ElementRef,
Inject,
OnDestroy, OnDestroy,
OnInit, OnInit,
PLATFORM_ID,
QueryList, QueryList,
ViewChild, ViewChild,
ViewChildren ViewChildren
@ -12,7 +15,6 @@ import {ActivatedRoute, Router} from '@angular/router';
import {Meta, Title} from '@angular/platform-browser'; import {Meta, Title} from '@angular/platform-browser';
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service'; import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes'; import {ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
import {ErrorMessagesComponent} from '../openaireLibrary/utils/errorMessages.component'; import {ErrorMessagesComponent} from '../openaireLibrary/utils/errorMessages.component';
import {HelperService} from "../openaireLibrary/utils/helper/helper.service"; 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 {QuickContactService} from '../openaireLibrary/sharedComponents/quick-contact/quick-contact.service';
import {IDeactivateComponent} from "../openaireLibrary/utils/can-exit.guard"; import {IDeactivateComponent} from "../openaireLibrary/utils/can-exit.guard";
import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields"; import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields";
import {isPlatformServer} from '@angular/common';
import {LayoutService} from '../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service';
@Component({ @Component({
selector: 'home', selector: 'home',
@ -69,6 +73,8 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit, IDeactiv
private user: User; private user: User;
@ViewChildren('scrolling_element') elements: QueryList<ElementRef>; @ViewChildren('scrolling_element') elements: QueryList<ElementRef>;
@ViewChild('contact') contact: ElementRef; @ViewChild('contact') contact: ElementRef;
isMobile: boolean = false;
isServer: boolean;
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,
@ -83,7 +89,10 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit, IDeactiv
private seoService: SEOService, private seoService: SEOService,
private _refineFieldResultsService: RefineFieldResultsService, private _refineFieldResultsService: RefineFieldResultsService,
private _searchResearchResultsService: SearchResearchResultsService, 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}, "name='description'");
this._meta.updateTag({content: this.description}, "property='og:description'"); this._meta.updateTag({content: this.description}, "property='og:description'");
this._meta.updateTag({content: this.pageTitle}, "property='og:title'"); 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.errorCodes = new ErrorCodes();
this.errorMessages = new ErrorMessagesComponent(); this.errorMessages = new ErrorMessagesComponent();
this.status = this.errorCodes.LOADING; this.status = this.errorCodes.LOADING;
this.isServer = isPlatformServer(this.platform);
} }
public ngOnInit() { public ngOnInit() {
@ -108,6 +118,10 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit, IDeactiv
this.user = user; this.user = user;
this.getStakeholders(); this.getStakeholders();
})); }));
this.layoutService.isMobile.subscribe(isMobile => {
this.isMobile = isMobile;
this.cdr.detectChanges();
});
} }
canExit(): boolean { canExit(): boolean {

@ -1 +1 @@
Subproject commit de42da8b6cfa2fd27d2120efb18a62f6c85240eb Subproject commit b50deff46b84e18496718839e99d065deb9c3884