import {Component} from '@angular/core'; import {ActivatedRoute, Router} from '@angular/router'; import {Title} from '@angular/platform-browser'; import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service'; import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; import {FAQ} from "../openaireLibrary/utils/entities/FAQ"; @Component({ selector: 'learn-how', template: `
` }) export class LearnHowComponent { public piwiksub: any; questions: FAQ[] = [ /*{ question: 'Coming soon?', answer: 'Yes' }, { question: 'Could you be more specific?', answer: 'No' }*/ ]; public first: {"gif": string, "header": string, "text"}[] = []; public second: {"gif": string, "header": string, "text"}[] = []; private pageTitle = "OpenAIRE - Connect | Learn How"; properties:EnvProperties; constructor ( private route: ActivatedRoute, private _router: Router, private _title: Title, private _piwikService: PiwikService) { var description = "OpenAIRE - Connect, Community Dashboard, research community"; this._title.setTitle(this.pageTitle); } public ngOnInit() { this.route.data .subscribe((data: { envSpecific: EnvProperties }) => { this.properties = data.envSpecific; if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){ this.piwiksub = this._piwikService.trackView(this.properties, "OpenAIRE Connect | Create and manage your community page", this.properties.piwikSiteId).subscribe(); } }); this.createGifs(); } public ngOnDestroy() { if(this.piwiksub){ this.piwiksub.unsubscribe(); } } private createGifs() { this.first.push({ gif: "../../../../assets/Connect%20animations.gif", header: "Research Community Dashboard", text: "This is OpenAIRE’s key service for research communities, both established and emerging ones. Our service helps you reach out and engage all your researchers to practice open science out-of-the-box." }); this.first.push({ gif: "../../../../assets/admin-portal.png", header: "Research Community Dashboard 2", text: "This is OpenAIRE’s key service for research communities, both established and emerging ones. Our service helps you reach out and engage all your researchers to practice open science out-of-the-box." }); this.first.push({ gif: "../../../../assets/banner connect.jpg", header: "Research Community Dashboard 3", text: "This is OpenAIRE’s key service for research communities, both established and emerging ones. Our service helps you reach out and engage all your researchers to practice open science out-of-the-box." }); this.second.push({ gif: "../../../../assets/Connect%20animations.gif", header: "Research Community Dashboard", text: "This is OpenAIRE’s key service for research communities, both established and emerging ones. Our service helps you reach out and engage all your researchers to practice open science out-of-the-box." }); this.second.push({ gif: "../../../../assets/admin-portal.png", header: "Research Community Dashboard 2", text: "This is OpenAIRE’s key service for research communities, both established and emerging ones. Our service helps you reach out and engage all your researchers to practice open science out-of-the-box." }); this.second.push({ gif: "../../../../assets/banner connect.jpg", header: "Research Community Dashboard 3", text: "This is OpenAIRE’s key service for research communities, both established and emerging ones. Our service helps you reach out and engage all your researchers to practice open science out-of-the-box." }); } }