<ng-template #_logos let-logo="logo" let-class="class">
  <div *ngIf="logo" [class]="'uk-flex uk-flex-middle uk-flex-center uk-padding-remove-horizontal '+class">
    <div class="">
      <img src="assets/ExploreLogos/{{logo}}" alt="{{logo}} logo" loading="lazy" width="112px" height="44px">
    </div>
  </div>
</ng-template>

<div>
  <div class="uk-section uk-padding-remove-bottom uk-overflow-hidden">
    <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-width-3-5@m uk-margin-large-bottom">
          <h1 class="uk-h2 uk-width-1-2@m" uk-scrollspy-class>
            Discover open linked research<span class="uk-text-primary">.</span>
          </h1>
					<numbers #numbersComponent [defaultInit]="false" (results)="numbers = $event"></numbers>
          <div [class.uk-invisible]="disableSelect" class="uk-margin-medium-top uk-width-3-4@xl">
						<advanced-search-input #advanced (searchEmitter)="goTo(true)">
							<entities-selection [simpleView]="true" currentEntity="all" [selectedEntity]="selectedEntity"
																	(selectionChange)="entityChanged($event);advanced.focusNext(input, $event)" (disableSelectEmitter)="disableSelectChange($event)"
																	[onChangeNavigate]="false" class="uk-width-2-5"></entities-selection>
							<div class="uk-width-expand" input #input placeholder="Scholary works" [searchable]="true" [hint]="'Search in OpenAIRE'" [(value)]="keyword"></div>
						</advanced-search-input>
						<div *ngIf="selectedEntity === 'result' && input.focused" (click)="$event.stopPropagation();advanced.focusNext(input, $event)" class="uk-dropdown uk-display-block uk-margin-small-top uk-width-auto">
							<div class="uk-padding-small">
								<quick-selections [resultTypes]="resultTypes" [quickFilter]="resultsQuickFilter"></quick-selections>
							</div>
						</div>
          </div>
					<div class="uk-padding-small uk-margin-small-top">
						<div class="uk-text-meta">
							Try browsing by:
						</div>
						<div class="link-actions uk-flex uk-flex-column uk-flex-top uk-margin-small-top">
							<a class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text uk-margin-small-bottom"
								routerLinkActive="router-link-active" routerLink="/sdgs">
								<span class="uk-flex uk-flex-middle">
									<img src="assets/common-assets/sdg/sdg-dot-img.svg" alt="SDGs logo" loading="lazy">
									<span class="uk-margin-small-left">Sustainable Development Goals (SDG<span class="uk-text-lowercase">s</span>)</span>
								</span>
							</a>
							<a class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text"
								routerLinkActive="router-link-active" routerLink="/fields-of-science">
								<span class="uk-flex uk-flex-middle">
									<img src="assets/common-assets/fos/fos-icon.svg" alt="FOS logo" loading="lazy">
									<span class="uk-margin-small-left">Fields of Science (FoS)</span>
								</span>
							</a>
						</div>
					</div>
        </div>
        <div class="uk-visible@m uk-width-expand" uk-scrollspy-class>
					<div class="uk-position-relative">
						<img src="assets/explore-assets/home/explore.jpg" uk-parallax="y: 500">
            <img class="uk-position-bottom-left" src="assets/explore-assets/home/mask.svg">
          </div>
        </div>
      </div>
    </div>
  </div>
	<div class="uk-section uk-section-large uk-padding-remove-top">
		<div class="uk-container uk-container-large uk-width-2-3">
			<div uk-slider="autoplay: false; autoplay-interval: 2500" class="">
				<div class="uk-position-relative">
					<div class="uk-slider-container">
						<ul class="uk-slider-items" uk-height-match="target: > li > div > div > .logo1; row: false;">
							<ng-container *ngFor="let type of getKeys(logos)">
								<li *ngFor="let range of createRange(logos[type].length) let j=index"
										class="uk-width-1-1 home-logo">
									<h1 class="uk-text-center uk-margin-large-bottom uk-text-primary uk-h4">
											<span *ngIf="type=='publication' && numbersComponent.showPublications && numbers?.publicationsSize">
												<span
														class="uk-text-bold">{{numbers.publicationsSize.number|number}}{{numbers.publicationsSize.size}}
													{{openaireEntities.PUBLICATIONS}}</span><span> deduplicated</span>
											</span>
										<span
												*ngIf="type=='dataset' && numbersComponent.showDatasets && (numbers?.datasetsLinkedSize || numbers?.datasetsSize)">
												<span *ngIf="numbers?.datasetsLinkedSize">
															<span
																	class="uk-text-bold">{{numbers.datasetsLinkedSize.number|number}}{{numbers.datasetsLinkedSize.size}}
																datasets</span> interlinked with publications</span>
												<span *ngIf="numbers?.datasetsSize && !numbers?.datasetsLinkedSize"
															class="uk-text-bold">{{numbers.datasetsSize.number|number}}{{numbers.datasetsSize.size}}
															{{openaireEntities.DATASETS}}</span>
											</span>
										<span
												*ngIf="type=='software' && numbersComponent.showSoftware && (numbers?.softwareSize || numbers?.softwareLinkedSize)">
												<span *ngIf="numbers?.softwareLinkedSize">
													<span
															class="uk-text-bol ">{{numbers.softwareLinkedSize.number|number}}{{numbers.softwareLinkedSize.size}}
															{{openaireEntities.SOFTWARE}}</span>  interlinked with publications</span>
												<span *ngIf="numbers?.softwareSize && !numbers?.softwareLinkedSize"
															class="uk-text-bold">{{numbers.softwareSize.number|number}}{{numbers.softwareSize.size}}
													{{openaireEntities.SOFTWARE}}</span>
											</span>
										<span *ngIf="type=='persistent'">
												<span>Persistent identifiers and registries</span>
											</span>
										<span *ngIf="type=='funder' && numbersComponent.showProjects && numbers?.fundersSize && numbers?.projectsSize">
												<span
														class="uk-text-bold">{{numbers.fundersSize.number|number}}{{numbers.fundersSize.size}}
													funders</span><span> and</span>
												<span
														class="uk-text-bold"> {{numbers.projectsSize.number|number}}{{numbers.projectsSize.size}}
													funded grants</span>
											</span>

									</h1>
									<div
											class="uk-grid-small  uk-child-width-1-6 uk-text-center grid uk-flex uk-flex-center"
											uk-grid uk-height-match="target: > div > .logo2; row: false;">
										<div
												*ngFor="let logo of logos[type][j].slice(0,ceil(logos[type][j].length/2)); let i=index">
											<ng-container
													*ngTemplateOutlet="_logos; context: { logo: logo, class: 'logo1 '}"></ng-container>
											<ng-container
													*ngTemplateOutlet="_logos; context: { logo: logos[type][j][ceil(logos[type][j].length/2)+i], class: 'uk-margin-top logo2 '}"></ng-container>
										</div>
									</div>
								</li>
							</ng-container>
						</ul>
					</div>

					<a class="uk-position-center-left-out" uk-slider-item="previous"><span uk-icon="icon: chevron-left; ratio: 2"></span></a>
					<a class="uk-position-center-right-out" uk-slider-item="next"><span uk-icon="icon: chevron-right; ratio: 2"></span></a>

				</div>
			</div>
		</div>
	</div>

	<ng-template #scrolling_text let-position_class="position_class">
    <div #scrolling_element [class]="position_class" uk-parallax="target: #js-sticky-parallax-images-all; start: 15%; end: 100% + 100vh - 200vh; opacity: 0,1 20%,1 99%,0">
      <h3 class="uk-h2">
        <span class="uk-text-primary">Deposit</span> your research<span class="uk-text-primary">.</span>
      </h3>
      <p class="uk-text-large uk-width-3-4@m">
				Whether it’s publications, data or software,
				select an <a href="" target="_blank">OpenAIRE compatible repository</a> and
				share using community standards. Alternatively
				use Zenodo,  a catch-all repository hosted by CERN. 
				All results will be indexed, discoverable and accessible 
				via EXPLORE.
			</p>
			<div class="uk-margin-medium-top">
				<a class="uk-button uk-button-primary uk-text-uppercase" routerLink="/participate/deposit/learn-how">Start Deposit</a>
			</div>
    </div>
    <div #scrolling_element [class]="position_class" uk-parallax="target: #js-sticky-parallax-images-all; start: 200vh; end: 100% + 100vh - 300vh; opacity: 0,1 20%" style="padding-top: 4vh;">
      <h3 class="uk-h2">
        <span class="uk-text-primary">Link</span> your work<span class="uk-text-primary">.</span>
      </h3>
      <p class="uk-text-large uk-width-3-4@m">
				Connect all your research. If you can't find your research
				results in OpenAIRE, don't worry! Use our Link service,
				that reaches out to many external sources via APIs, and
				claim them to your Grant or ORCID. Use the service to provide
				meaningful links between publications-datasets-software.
			</p>
			<div class="uk-margin-medium-top">
				<a class="uk-button uk-button-primary uk-text-uppercase" routerLink="/participate/claim">Start Linking</a>
			</div>
    </div>
  </ng-template>

	<div class="uk-section uk-section-secondary">
    <div class="uk-container uk-container-large">
      <div class="uk-width-1-1">
        <h2 class="uk-h1 uk-margin-large-top">Share your research<span class="uk-text-primary">.</span></h2>
      </div>
      <div id="js-sticky-parallax-images-all" style="min-height: 400vh">
        <div class="uk-visible@m uk-height-viewport explore-dark-logo-background uk-sticky" uk-sticky="bottom: #js-sticky-parallax-images-all; target-offset: true">
          <div class="uk-grid" uk-grid style="height: 100vh;">
            <div class="uk-width-expand uk-first-column uk-position-relative uk-height-1-1">
              <div class="explore-dark-logo-background">
                <div uk-parallax="target: #js-sticky-parallax-images-all;">
									<img class="uk-position-center uk-position-z-index" src="assets/explore-assets/home/tablet.png" alt="ipad" loading="lazy"
										style="width: 100%;">
									<img class="uk-position-center" src="assets/explore-assets/home/1.png" alt="ipad" loading="lazy"
										uk-parallax="target: #js-sticky-parallax-images-all; start: 100vh; end: 100% + 100vh - 160vh; opacity: 1,1 99%,0; easing:0"
										style="width: 100%;">
									<img class="uk-position-center" src="assets/explore-assets/home/2.png" alt="ipad" loading="lazy"
										uk-parallax="target: #js-sticky-parallax-images-all; start: 150vh; end: 100% + 100vh - 210vh; opacity: 0,1 20%,1 99%,0; easing:0"
										style="width: 100%;">
									<img class="uk-position-center" src="assets/explore-assets/home/3.png" alt="ipad" loading="lazy"
										uk-parallax="target: #js-sticky-parallax-images-all; start: 200vh; end: 100% + 100vh - 260vh; opacity: 0,1 20%,1 99%,0; easing:0"
										style="width: 100%;">
									<img class="uk-position-center" src="assets/explore-assets/home/4.png" alt="ipad" loading="lazy"
										uk-parallax="target: #js-sticky-parallax-images-all; start: 250vh; end: 100% + 100vh - 310vh; opacity: 0,1 20%,1; easing:0"
											style="width: 100%;">
                </div>
              </div>
            </div>
            <div class="uk-inline uk-width-expand uk-height-1-1 uk-margin-large-left">
              <div>
                <div uk-parallax="target: #js-sticky-parallax-images-all; y: 55vh, 40vh;">
                  <ng-container *ngTemplateOutlet="scrolling_text; context: {position_class: 'uk-position-center-left'}"></ng-container>
                </div>
              </div>
            </div>
          </div>
        </div>

        <div class="uk-hidden@m uk-height-viewport explore-dark-logo-background" uk-sticky="bottom: #js-sticky-parallax-images-all">
          <div class="uk-flex uk-flex-column">
            <div class="explore-dark-logo-background uk-inline uk-width-1-1" style="height: 40vh;">
							<img class="uk-position-center uk-position-z-index" src="assets/explore-assets/home/tablet.png" alt="ipad" loading="lazy"
                   uk-parallax="target: #js-sticky-parallax-images-all;" style="width: 70%;">
							<img class="uk-position-center" src="assets/explore-assets/home/1.png" alt="ipad" loading="lazy"
                   uk-parallax="target: #js-sticky-parallax-images-all; start: 100vh; end: 100% + 100vh - 160vh; opacity: 1,1 99%,0; easing:0"
                   style="width: 70%;">
							<img class="uk-position-center" src="assets/explore-assets/home/2.png" alt="ipad" loading="lazy"
                   uk-parallax="target: #js-sticky-parallax-images-all; start: 150vh; end: 100% + 100vh - 210vh; opacity: 0,1 20%,1 99%,0; easing:0"
                   style="width: 70%;">
							<img class="uk-position-center" src="assets/explore-assets/home/3.png" alt="ipad" loading="lazy"
                   uk-parallax="target: #js-sticky-parallax-images-all; start: 200vh; end: 100% + 100vh - 260vh; opacity: 0,1 20%,1 99%,0; easing:0"
                   style="width: 70%;">
							<img class="uk-position-center" src="assets/explore-assets/home/4.png" alt="ipad" loading="lazy"
                   uk-parallax="target: #js-sticky-parallax-images-all; start: 250vh; end: 100% + 100vh - 310vh; opacity: 0,1 20%,1; easing:0"
                   style="width: 70%;">
            </div>
            <div class="uk-inline uk-width-expand">
              <ng-container *ngTemplateOutlet="scrolling_text; context: {position_class: 'uk-position-top-center'}"></ng-container>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

	<!-- Not yet! -->
	<!-- <div class="uk-section">
		<div class="uk-container uk-container-large">
			<h2 class="uk-h1 uk-text-center">
				New sources in OpenAIRE<span class="uk-text-primary">.</span>
			</h2>
			<div class="cards-on-slider">
				TODO: Repositories content 
			</div>
		</div>
	</div> -->

	<div class="uk-background-muted">
		<div class="uk-position-relative">
			<div class="uk-section uk-section-large">
				<div class="uk-container">
					<div class="uk-grid uk-child-width-1-2@m" uk-grid>
						<div>
							<div style="max-width: 550px;">
								<h2>Linked Open Research.</h2>
								<div class="">
									EXPLORE is built on the <a href="https://graph.openaire.eu/" target="_blank" class="graph">OpenAIRE Research Graph</a>, one of the largest 
									open scholarly record collections worldwide. Conceived as a public and
									transparent good, populated out of data sources trusted by scientists, the
									OpenAIRE Research Graph brings discovery, monitoring, and assessment of science
									back in the hands of the scientific community.
								</div>
							</div>
						</div>
						<div></div>
						<img class="uk-visible@m uk-height-1-1 uk-position-top-right" src="assets/explore-assets/home/graph.svg" alt="ipad" loading="lazy">
					</div>
				</div>
			</div>
		</div>
		<div class="uk-section uk-padding-remove-top">
			<div class="uk-container">
				<div class="uk-width-1-2@m uk-margin-auto uk-margin-small-top uk-text-center" style="max-width: 600px;">
					<div>
						Within a constantly emerging scholarly communication environment, the OpenAIRE Research Graph is a moving target, continuously integrating new sources, new types or research objects, and embedding access measures. We therefore welcome the community to work with us to improve all its aspects: its <span class="uk-text-bold">coverage</span> (geographic and thematic), <span class="uk-text-bold">quality</span> (disambiguation and semantics) and <span class="uk-text-bold">access</span> (APIs).
					</div>
					<div class="uk-margin-top">
						Find information about the OpenAIRE Research Graph, how to test it and contribute to improving it.
					</div>
					<div class="uk-margin-top">
						<a href="https://www.openaire.eu/blogs/the-openaire-research-graph" target="_blank" class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
							Learn more. Contribute
						</a>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div class="uk-section uk-section-large">
		<div class="uk-container uk-container-large">
			<h2 class="uk-h5 uk-margin-remove uk-text-primary">
				Did you know that
			</h2>
			<h2 class="uk-heading-large uk-margin-large-bottom uk-margin-remove-top">
				you may
			</h2>
			<div class="uk-container">
				<div class="uk-grid uk-child-width-1-2@l uk-child-width-1-1 uk-grid-large" uk-grid uk-height-match=".link-title">
					<div>
						<div class="uk-padding-small uk-padding-remove-horizontal custom-link">
							<a href="https://provide.openaire.eu/home" target="_blank" class="uk-button uk-button-text uk-text-left uk-text-large">
								<span class="link-title">have your repository, Journal or CRIS system indexed in EXPLORE and take advantage of services for enriching metadata and counting usage?</span>
							</a>
						</div>
					</div>
					<div>
						<div class="uk-padding-small uk-padding-remove-horizontal custom-link">
							<a href="https://canada.explore.openaire.eu/" target="_blank" class="uk-button uk-button-text uk-text-left uk-text-large">
								<span class="link-title">use EXPLORE as an application platform as a service (aPaaS) and set up a national portal for Open Science, such as Canada.EXPLORE?</span>
							</a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div #contact class="uk-section">
		<div class="uk-container uk-container-large uk-margin-large-bottom uk-text-center">
			<h3 class="uk-h2 uk-margin-remove">
				Need more information?
			</h3>
			<h4 class="uk-h4 uk-margin-small-top uk-margin-medium-bottom">
				Get in touch and let us help you<span class="uk-text-primary">.</span>
			</h4>
			<a class="uk-button uk-button-primary uk-text-uppercase uk-margin-top uk-margin-medium-bottom"
				routerLink="/contact-us">Contact us</a>
		</div>
	</div>
</div>
