diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 6b648b7..7eed1f9 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -14,6 +14,7 @@ const routes: Routes = [ {path: 'about', redirectTo: 'about/learn-how', pathMatch: 'full'}, {path: 'about/learn-how', loadChildren: () => import('./learn-how/learn-how.module').then(m => m.LearnHowModule)}, {path: 'about/faq', loadChildren: () => import('./learn-how/faqs/faqs.module').then(m => m.FaqsModule)}, + {path: 'get-started', loadChildren: () => import('./get-started/get-started.module').then(m => m.GetStartedModule)}, {path: 'contact-us', loadChildren: () => import('./contact/contact.module').then(m => m.ContactModule)}, {path: 'invite', loadChildren: () => import('./utils/subscribe/invite/invite.module').then(m => m.InviteModule)}, {path: 'content', loadChildren: () => import('./content/contentPage.module').then(m => m.ContentPageModule), canActivate: [IsCommunity]}, diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 98580cc..584bcd0 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,4 +1,4 @@ -import {AfterViewInit, Component, OnDestroy, OnInit, ViewChild} from '@angular/core'; +import {Component, OnDestroy, OnInit, ViewChild} from '@angular/core'; import {ActivatedRoute, NavigationEnd, Router} from '@angular/router'; import {EnvProperties} from './openaireLibrary/utils/properties/env-properties'; @@ -35,13 +35,21 @@ import {NotificationHandler} from "./openaireLibrary/utils/notification-handler"
+ [showMenu]=showMenu [properties]="properties" [showHomeMenuItem]="false" communityId="connect"> + + Get Started + + [showHomeMenuItem]="false"> + +
+
+ +
+
+
+
+

Lorem ipsum dolor sit amet, consetetur.

+
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, + sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. +
+
+
+
+
+ Step 1 +
+ + Provide some
information
+
+
+
+ Step 2 +
+ + We contact
you
+
+
+
+
+
+
+
+

Contact us to learn more.

+
+
+ + +
+
+
+
+
+
+
+
+

Need more information?
View details on the process.

+ + + Learn More + + +
+
+
+ +
+
+
+ + Our team will respond to your submission soon.
+ Press OK to redirect to OpenAIRE Monitor home page. +
diff --git a/src/app/get-started/get-started.component.ts b/src/app/get-started/get-started.component.ts new file mode 100644 index 0000000..ea3c939 --- /dev/null +++ b/src/app/get-started/get-started.component.ts @@ -0,0 +1,156 @@ +import {Component, OnInit, ViewChild} from '@angular/core'; +import {ActivatedRoute, Router} from '@angular/router'; +import {EmailService} from "../openaireLibrary/utils/email/email.service"; +import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties"; +import {Composer} from "../openaireLibrary/utils/email/composer"; +import {Meta, Title} from "@angular/platform-browser"; +import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service"; +import {HelperService} from "../openaireLibrary/utils/helper/helper.service"; +import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; +import {FormBuilder, FormGroup, Validators} from "@angular/forms"; +import {Subscriber} from "rxjs"; +import {properties} from "../../environments/environment"; +import {Breadcrumb} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.component"; +import {NotificationHandler} from "../openaireLibrary/utils/notification-handler"; +import {StringUtils} from "../openaireLibrary/utils/string-utils.class"; + +@Component({ + selector: 'get-started', + templateUrl: './get-started.component.html' +}) +export class GetStartedComponent implements OnInit { + public url: string = null; + public pageTitle: string = "OpenAIRE - Connect | Get Started"; + public description: string = "OpenAIRE - Connect . Any Questions? Contact us to learn more"; + public piwiksub: any; + public sending = false; + public properties: EnvProperties = properties; + public pageContents = null; + public divContents = null; + public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'Get started'}]; + public contactForm: FormGroup; + @ViewChild('modal') modal; + private subscriptions = []; + + constructor(private route: ActivatedRoute, + private _router: Router, + private _emailService: EmailService, + private _meta: Meta, + private _title: Title, + private seoService: SEOService, + private _piwikService: PiwikService, + private fb: FormBuilder, + private helper: HelperService) { + } + + ngOnDestroy() { + this.subscriptions.forEach(subscription => { + if (subscription instanceof Subscriber) { + subscription.unsubscribe(); + } + }); + } + + ngOnInit() { + if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { + this.subscriptions.push(this._piwikService.trackView(this.properties, this.pageTitle, this.properties.piwikSiteId).subscribe()); + } + this.url = this.properties.domain + this.properties.baseLink + this._router.url; + this.seoService.createLinkForCanonicalURL(this.url); + this.updateUrl(this.url); + this.updateTitle(this.pageTitle); + this.updateDescription(this.description); + this.reset(); + //this.getDivContents(); + // this.getPageContents(); + } + + private getPageContents() { + this.subscriptions.push(this.helper.getPageHelpContents(this.properties, 'monitor', this._router.url).subscribe(contents => { + this.pageContents = contents; + })); + } + + private getDivContents() { + this.subscriptions.push(this.helper.getDivHelpContents(this.properties, 'monitor', this._router.url).subscribe(contents => { + this.divContents = contents; + })); + } + + public send(event) { + if (event.valid === true) { + this.sendMail(this.properties.admins); + } + } + + public reset() { + this.contactForm = this.fb.group({ + name: this.fb.control('', Validators.required), + surname: this.fb.control('', Validators.required), + email: this.fb.control('', [Validators.required, Validators.email]), + affiliation: this.fb.control('', Validators.required), + community: this.fb.control('', Validators.required), + message: this.fb.control('', Validators.required), + recaptcha: this.fb.control('', Validators.required) + }); + } + + private sendMail(admins: any) { + this.sending = true; + this.subscriptions.push(this._emailService.contact(this.properties, + Composer.composeEmailForNewCommunity(this.contactForm.value, admins), + this.contactForm.value.recaptcha).subscribe( + res => { + if (res) { + this.sending = false; + this.reset(); + this.modalOpen(); + } else { + this.handleError('Email sent failed! Please try again.'); + } + }, + error => { + this.handleError('Email sent failed! Please try again.', error); + + } + )); + } + + public modalOpen() { + this.modal.okButton = true; + this.modal.alertTitle = 'Your request has been successfully submitted'; + this.modal.alertMessage = false; + this.modal.cancelButton = false; + this.modal.okButtonLeft = false; + this.modal.okButtonText = 'OK'; + this.modal.open(); + } + + handleError(message: string, error = null) { + if(error) { + console.error(error); + } + NotificationHandler.rise(message, 'danger'); + this.sending = false; + this.contactForm.get('recaptcha').setValue(''); + } + + public goToHome() { + this._router.navigate(['/']); + } + + private updateDescription(description: string) { + this._meta.updateTag({content: description}, "name='description'"); + this._meta.updateTag({content: description}, "property='og:description'"); + } + + private updateTitle(title: string) { + var _title = ((title.length > 50) ? title.substring(0, 50) : title); + this._title.setTitle(_title); + this._meta.updateTag({content: _title}, "property='og:title'"); + } + + private updateUrl(url: string) { + this._meta.updateTag({content: url}, "property='og:url'"); + } +} diff --git a/src/app/get-started/get-started.module.ts b/src/app/get-started/get-started.module.ts new file mode 100644 index 0000000..11c89da --- /dev/null +++ b/src/app/get-started/get-started.module.ts @@ -0,0 +1,39 @@ +import {NgModule} from '@angular/core'; +import {CommonModule} from '@angular/common'; +import {RouterModule} from '@angular/router'; + +import {GetStartedComponent} from './get-started.component'; +import {GetStartedRoutingModule} from "./get-started-routing.module"; +import {EmailService} from "../openaireLibrary/utils/email/email.service"; +import {RecaptchaModule} from "ng-recaptcha"; +import {AlertModalModule} from "../openaireLibrary/utils/modal/alertModal.module"; +import {PiwikService} from "../openaireLibrary/utils/piwik/piwik.service"; +import {HelperModule} from "../openaireLibrary/utils/helper/helper.module"; +import {IsRouteEnabled} from "../openaireLibrary/error/isRouteEnabled.guard"; +import {Schema2jsonldModule} from "../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module"; +import {SEOServiceModule} from "../openaireLibrary/sharedComponents/SEO/SEOService.module"; +import {ContactUsModule} from "../openaireLibrary/contact-us/contact-us.module"; +import {BreadcrumbsModule} from "../openaireLibrary/utils/breadcrumbs/breadcrumbs.module"; +import {LoadingModule} from "../openaireLibrary/utils/loading/loading.module"; +import {IconsModule} from '../openaireLibrary/utils/icons/icons.module'; + + +@NgModule({ + imports: [ + GetStartedRoutingModule, CommonModule, RouterModule, + AlertModalModule, RecaptchaModule, HelperModule, + Schema2jsonldModule, SEOServiceModule, ContactUsModule, BreadcrumbsModule, LoadingModule, + IconsModule + ], + declarations: [ + GetStartedComponent + ], + providers: [ + EmailService, PiwikService, IsRouteEnabled + ], + exports: [ + GetStartedComponent + ] +}) + +export class GetStartedModule { } diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 6663dee..9542bd1 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 6663dee50814c4e6efb196cc02aa0ec59e715e68 +Subproject commit 9542bd1e329a5ce64feba5e2a39f56ba4a724a02 diff --git a/src/assets/Connect animations.gif b/src/assets/Connect animations.gif deleted file mode 100644 index d16d015..0000000 Binary files a/src/assets/Connect animations.gif and /dev/null differ diff --git a/src/assets/admin-portal.png b/src/assets/admin-portal.png deleted file mode 100644 index 67363a3..0000000 Binary files a/src/assets/admin-portal.png and /dev/null differ diff --git a/src/assets/ask-connect.svg b/src/assets/ask-connect.svg deleted file mode 100644 index 1d980cb..0000000 --- a/src/assets/ask-connect.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/community-first-page.jpg b/src/assets/community-first-page.jpg deleted file mode 100644 index c2bb98d..0000000 Binary files a/src/assets/community-first-page.jpg and /dev/null differ diff --git a/src/assets/connect-assets/OpenAIRE-RCD_howtos.png b/src/assets/connect-assets/OpenAIRE-RCD_howtos.png deleted file mode 100644 index 86db889..0000000 Binary files a/src/assets/connect-assets/OpenAIRE-RCD_howtos.png and /dev/null differ diff --git a/src/assets/connect-assets/banner/background.png b/src/assets/connect-assets/banner/background.png deleted file mode 100644 index 1434a44..0000000 Binary files a/src/assets/connect-assets/banner/background.png and /dev/null differ diff --git a/src/assets/connect-assets/banner/login.svg b/src/assets/connect-assets/banner/login.svg deleted file mode 100644 index 199d8b3..0000000 --- a/src/assets/connect-assets/banner/login.svg +++ /dev/null @@ -1 +0,0 @@ -key \ No newline at end of file diff --git a/src/assets/connect-assets/banner/together.svg b/src/assets/connect-assets/banner/together.svg deleted file mode 100644 index ac72ba7..0000000 --- a/src/assets/connect-assets/banner/together.svg +++ /dev/null @@ -1 +0,0 @@ -together \ No newline at end of file diff --git a/src/assets/connect-assets/cloud/abstract.png b/src/assets/connect-assets/cloud/abstract.png deleted file mode 100644 index 23a9a95..0000000 Binary files a/src/assets/connect-assets/cloud/abstract.png and /dev/null differ diff --git a/src/assets/connect-assets/cloud/background.png b/src/assets/connect-assets/cloud/background.png deleted file mode 100644 index a349571..0000000 Binary files a/src/assets/connect-assets/cloud/background.png and /dev/null differ diff --git a/src/assets/connect-assets/contact/1.png b/src/assets/connect-assets/contact/1.png deleted file mode 100644 index 6f07200..0000000 Binary files a/src/assets/connect-assets/contact/1.png and /dev/null differ diff --git a/src/assets/connect-assets/contact/2.png b/src/assets/connect-assets/contact/2.png deleted file mode 100644 index acb52d0..0000000 Binary files a/src/assets/connect-assets/contact/2.png and /dev/null differ diff --git a/src/assets/connect-assets/contact/3.png b/src/assets/connect-assets/contact/3.png deleted file mode 100644 index 80463a6..0000000 Binary files a/src/assets/connect-assets/contact/3.png and /dev/null differ diff --git a/src/assets/connect-assets/contact/background.png b/src/assets/connect-assets/contact/background.png deleted file mode 100644 index 8ed6785..0000000 Binary files a/src/assets/connect-assets/contact/background.png and /dev/null differ diff --git a/src/assets/connect-assets/get-started/1.svg b/src/assets/connect-assets/get-started/1.svg new file mode 100644 index 0000000..4bdc005 --- /dev/null +++ b/src/assets/connect-assets/get-started/1.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/assets/connect-assets/get-started/2.svg b/src/assets/connect-assets/get-started/2.svg new file mode 100644 index 0000000..3bc041d --- /dev/null +++ b/src/assets/connect-assets/get-started/2.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/connect-assets/get-started/icons.svg b/src/assets/connect-assets/get-started/icons.svg new file mode 100644 index 0000000..d8fa8a6 --- /dev/null +++ b/src/assets/connect-assets/get-started/icons.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/connect-assets/home/1.svg b/src/assets/connect-assets/home/1.svg deleted file mode 100644 index 0944684..0000000 --- a/src/assets/connect-assets/home/1.svg +++ /dev/null @@ -1 +0,0 @@ -icon 1 main \ No newline at end of file diff --git a/src/assets/connect-assets/home/2.svg b/src/assets/connect-assets/home/2.svg deleted file mode 100644 index a3cd911..0000000 --- a/src/assets/connect-assets/home/2.svg +++ /dev/null @@ -1 +0,0 @@ -icon 2 main \ No newline at end of file diff --git a/src/assets/connect-assets/home/3.svg b/src/assets/connect-assets/home/3.svg deleted file mode 100644 index 609a59f..0000000 --- a/src/assets/connect-assets/home/3.svg +++ /dev/null @@ -1 +0,0 @@ -icon 3 main \ No newline at end of file diff --git a/src/assets/connect-assets/home/banner.jpg b/src/assets/connect-assets/home/banner.jpg deleted file mode 100644 index feeba62..0000000 Binary files a/src/assets/connect-assets/home/banner.jpg and /dev/null differ diff --git a/src/assets/connect-assets/home/customize.svg b/src/assets/connect-assets/home/customize.svg deleted file mode 100644 index 1f609cc..0000000 --- a/src/assets/connect-assets/home/customize.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/connect-assets/home/dashboard.svg b/src/assets/connect-assets/home/dashboard.svg deleted file mode 100644 index 778c158..0000000 --- a/src/assets/connect-assets/home/dashboard.svg +++ /dev/null @@ -1 +0,0 @@ -main \ No newline at end of file diff --git a/src/assets/connect-assets/home/entities/dataset.svg b/src/assets/connect-assets/home/entities/dataset.svg deleted file mode 100644 index a3c5ffa..0000000 --- a/src/assets/connect-assets/home/entities/dataset.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/assets/connect-assets/home/entities/other.svg b/src/assets/connect-assets/home/entities/other.svg deleted file mode 100644 index 971cdf4..0000000 --- a/src/assets/connect-assets/home/entities/other.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/assets/connect-assets/home/entities/publication.svg b/src/assets/connect-assets/home/entities/publication.svg deleted file mode 100644 index ee15fdb..0000000 --- a/src/assets/connect-assets/home/entities/publication.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/assets/connect-assets/home/entities/software.svg b/src/assets/connect-assets/home/entities/software.svg deleted file mode 100644 index 4194c05..0000000 --- a/src/assets/connect-assets/home/entities/software.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/assets/connect-assets/home/gifs/deposit.gif b/src/assets/connect-assets/home/gifs/deposit.gif deleted file mode 100644 index 2b15881..0000000 Binary files a/src/assets/connect-assets/home/gifs/deposit.gif and /dev/null differ diff --git a/src/assets/connect-assets/home/gifs/graph-analysis.gif b/src/assets/connect-assets/home/gifs/graph-analysis.gif deleted file mode 100644 index 54a8511..0000000 Binary files a/src/assets/connect-assets/home/gifs/graph-analysis.gif and /dev/null differ diff --git a/src/assets/connect-assets/home/gifs/link.gif b/src/assets/connect-assets/home/gifs/link.gif deleted file mode 100644 index f73b4e3..0000000 Binary files a/src/assets/connect-assets/home/gifs/link.gif and /dev/null differ diff --git a/src/assets/connect-assets/home/gifs/overview.gif b/src/assets/connect-assets/home/gifs/overview.gif deleted file mode 100644 index 0dc15f1..0000000 Binary files a/src/assets/connect-assets/home/gifs/overview.gif and /dev/null differ diff --git a/src/assets/connect-assets/home/gifs/results.gif b/src/assets/connect-assets/home/gifs/results.gif deleted file mode 100644 index c211043..0000000 Binary files a/src/assets/connect-assets/home/gifs/results.gif and /dev/null differ diff --git a/src/assets/connect-assets/home/map.svg b/src/assets/connect-assets/home/map.svg deleted file mode 100644 index be6e08a..0000000 --- a/src/assets/connect-assets/home/map.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/connect-assets/home/open_science.svg b/src/assets/connect-assets/home/open_science.svg deleted file mode 100644 index 2eb934e..0000000 --- a/src/assets/connect-assets/home/open_science.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/connect-assets/home/training.svg b/src/assets/connect-assets/home/training.svg deleted file mode 100644 index d3347c3..0000000 --- a/src/assets/connect-assets/home/training.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/connect-assets/home/virtual.svg b/src/assets/connect-assets/home/virtual.svg deleted file mode 100644 index 20af1ec..0000000 --- a/src/assets/connect-assets/home/virtual.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/connect-assets/home/website.svg b/src/assets/connect-assets/home/website.svg deleted file mode 100644 index 14ca2a4..0000000 --- a/src/assets/connect-assets/home/website.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/connect-assets/home/wiki.svg b/src/assets/connect-assets/home/wiki.svg deleted file mode 100644 index 2540dea..0000000 --- a/src/assets/connect-assets/home/wiki.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/connect-assets/sketch_line_arrow.svg b/src/assets/connect-assets/sketch_line_arrow.svg deleted file mode 100644 index 1eadc99..0000000 --- a/src/assets/connect-assets/sketch_line_arrow.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/assets/connect-assets/sketch_line_arrow_large.svg b/src/assets/connect-assets/sketch_line_arrow_large.svg deleted file mode 100644 index 3cc39fa..0000000 --- a/src/assets/connect-assets/sketch_line_arrow_large.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/assets/home.jpg b/src/assets/home.jpg deleted file mode 100644 index 423a931..0000000 Binary files a/src/assets/home.jpg and /dev/null differ diff --git a/src/assets/logo-large-connect.png b/src/assets/logo-large-connect.png deleted file mode 100644 index e3d95b8..0000000 Binary files a/src/assets/logo-large-connect.png and /dev/null differ diff --git a/src/assets/logo-large-explore.png b/src/assets/logo-large-explore.png deleted file mode 100644 index d225e6f..0000000 Binary files a/src/assets/logo-large-explore.png and /dev/null differ diff --git a/src/assets/logo-small-connect.png b/src/assets/logo-small-connect.png deleted file mode 100644 index 08fd7cd..0000000 Binary files a/src/assets/logo-small-connect.png and /dev/null differ diff --git a/src/assets/logo-small-explore.png b/src/assets/logo-small-explore.png deleted file mode 100644 index 20a1603..0000000 Binary files a/src/assets/logo-small-explore.png and /dev/null differ diff --git a/src/assets/manager.svg b/src/assets/manager.svg deleted file mode 100644 index ac7fb12..0000000 --- a/src/assets/manager.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/researcher.svg b/src/assets/researcher.svg deleted file mode 100644 index 446a3a8..0000000 --- a/src/assets/researcher.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/search.jpg b/src/assets/search.jpg deleted file mode 100644 index 5f1de67..0000000 Binary files a/src/assets/search.jpg and /dev/null differ