Need more information?
diff --git a/explore/src/app/home/home.component.ts b/explore/src/app/home/home.component.ts
index d7093b5a..e7ea6bd8 100644
--- a/explore/src/app/home/home.component.ts
+++ b/explore/src/app/home/home.component.ts
@@ -19,7 +19,6 @@ import {SearchProjectsService} from '../openaireLibrary/services/searchProjects.
import {SearchOrganizationsService} from '../openaireLibrary/services/searchOrganizations.service';
import {RefineFieldResultsService} from '../openaireLibrary/services/refineFieldResults.service';
import {OpenaireEntities, SearchFields} from '../openaireLibrary/utils/properties/searchFields';
-
import {RouterHelper} from '../openaireLibrary/utils/routerHelper.class';
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
import {ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes';
@@ -32,6 +31,7 @@ import {properties} from "../../environments/environment";
import {Numbers, NumbersComponent} from "../openaireLibrary/sharedComponents/numbers/numbers.component";
import {StringUtils} from "../openaireLibrary/utils/string-utils.class";
import {NumberUtils} from '../openaireLibrary/utils/number-utils.class';
+import {QuickContactService} from '../openaireLibrary/sharedComponents/quick-contact/quick-contact.service';
@Component({
selector: 'home',
@@ -138,7 +138,8 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
properties: EnvProperties = properties;
public openaireEntities = OpenaireEntities;
public readMore: boolean = false;
-
+ public showQuickContact: boolean;
+ @ViewChild('contact') contact: ElementRef;
subscriptions: any[] = [];
@ViewChildren('scrolling_element') elements: QueryList;
@@ -195,7 +196,8 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
private location: Location, private _piwikService: PiwikService,
private config: ConfigurationService, private _meta: Meta, private _title: Title, private seoService: SEOService,
private helper: HelperService,
- private cdr: ChangeDetectorRef
+ private cdr: ChangeDetectorRef,
+ private quickContactService: QuickContactService
) {
let description = "OpenAIRE Explore: Over 100M of research deduplicated, 170K research software, 11M research data. One of the largest open scholarly records collection worldwide.";
let title = "OpenAIRE | Find and Share research";
@@ -304,11 +306,28 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
ngAfterViewInit() {
if (typeof window !== "undefined") {
- this.createObserver();
+ this.createObservers();
}
}
- createObserver() {
+ createObservers() {
+ let options = {
+ root: null,
+ rootMargin: '200px',
+ threshold: 1.0
+ };
+ let intersectionObserver = new IntersectionObserver(entries => {
+ entries.forEach(entry => {
+ if (entry.isIntersecting && this.showQuickContact) {
+ this.showQuickContact = false;
+ this.quickContactService.setDisplay(this.showQuickContact);
+ } else if (!entry.isIntersecting && !this.showQuickContact) {
+ this.showQuickContact = true;
+ this.quickContactService.setDisplay(this.showQuickContact);
+ }
+ });
+ }, options);
+ intersectionObserver.observe(this.contact.nativeElement);
let mutationObserver = new MutationObserver(entries => {
entries.forEach(entry => {
if (entry.attributeName === 'style') {
@@ -327,6 +346,7 @@ export class HomeComponent implements OnInit, OnDestroy, AfterViewInit {
this.elements.forEach(element => {
mutationObserver.observe(element.nativeElement, {attributes: true});
});
+ this.subscriptions.push(intersectionObserver);
this.subscriptions.push(mutationObserver);
}
diff --git a/explore/src/app/openaireLibrary b/explore/src/app/openaireLibrary
index 09706515..427e9105 160000
--- a/explore/src/app/openaireLibrary
+++ b/explore/src/app/openaireLibrary
@@ -1 +1 @@
-Subproject commit 09706515ba1feb0d44c02485bee9782f63a5978f
+Subproject commit 427e9105140fabb99f59693c94bc3b70db159901
diff --git a/explore/src/assets/explore-custom.less b/explore/src/assets/explore-custom.less
index 60707c55..5b160e16 100644
--- a/explore/src/assets/explore-custom.less
+++ b/explore/src/assets/explore-custom.less
@@ -3,6 +3,13 @@
/* Button */
@button-primary-background: @explore-color;
@inverse-button-primary-background: @explore-color;
+@button-secondary-border: @explore-color;
+@button-secondary-color: @explore-color;
+@button-secondary-hover-background: @global-secondary-background;
+@button-secondary-hover-background-gradient: none;
+@button-secondary-active-background: @global-secondary-background;
+@button-secondary-active-background-gradient: none;
+
/* Background */
@background-primary-background: @explore-color;