-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add content for certified technology provider
- Loading branch information
1 parent
55fd7c2
commit 94f08a6
Showing
10 changed files
with
287 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
type: services/single | ||
position: "Services" | ||
aliases: /certification | ||
title: "Open Data Hub API Certified Technology Provider" | ||
|
||
rows: | ||
- title: "<u>How to be certified?</u>" | ||
description: > | ||
1. Send a request to us to be certified. Do include the following details: | ||
a. Endpoint URL and technical description of your output API. | ||
b. Contact point for community updates, like the Data Consumer Contract. | ||
2. The Open Data Hub team develops a Data Collector. | ||
3. The Open Data Hub team verifies the compatibility and that the data gets collected in out Testing Environment. | ||
4. The Open Data Hub team sends a certificate of compatibility and adds your organization to the Certified Technology Provider register on OpenDataHub.com. | ||
partial: text-contact.html | ||
contact_email: "[email protected]" | ||
|
||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/themes/odh-fbe/layouts/partials/slideshow-generic.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{{/* | ||
SPDX-FileCopyrightText: NOI Techpark <digital@noi.bz.it> | ||
|
||
SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/}} | ||
|
||
<section class="logo-slideshow"> | ||
<div class="container"> | ||
<script defer src="/js/slideshow-generic.js"></script> | ||
|
||
<div class="d-none" id="slideshow-item"> | ||
{{ range .siteCommunity.items }} | ||
<div class="single-provider"> | ||
<div class="name">{{ .name }}</div> | ||
<div class="img">{{ .img }}</div> | ||
<div class="link">{{ .link }}</div> | ||
</div> | ||
{{ end }} | ||
</div> | ||
|
||
<div class="col-12 text-center"> | ||
<h3>{{ .siteHome.title | markdownify }}</h3> | ||
</div> | ||
|
||
<div id="slideshow-container" class="my-3"></div> | ||
|
||
<div class="col-12 text-center"> | ||
<a href="{{ .siteHome.btn_link }}" class="btn btn-primary">{{ .siteHome.btn_label | markdownify }}</a> | ||
</div> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{{/* | ||
SPDX-FileCopyrightText: NOI Techpark <digital@noi.bz.it> | ||
|
||
SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/}} | ||
|
||
{{"<!-- Double Column Text - Imgs -->" | safeHTML }} | ||
<section> | ||
<div class="container"> | ||
<div class="col-12"> | ||
<h2>{{ .title | markdownify }}</h2> | ||
<p>{{ .description | markdownify }}</p> | ||
</div> | ||
</div> | ||
</section> | ||
<section> | ||
<div class="container"> | ||
<div class="row"> | ||
{{ partial "contact-mailto.html" . }} | ||
</div> | ||
</div> | ||
</section> | ||
{{"<!-- /Double Column Text - Icon -->" | safeHTML }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
// SPDX-FileCopyrightText: NOI Techpark <[email protected]> | ||
// | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
function genericSlideshow() { | ||
|
||
function dqs(query) { | ||
return document.querySelector(query); | ||
} | ||
|
||
function eqs(element, query) { | ||
return element.querySelector(query); | ||
} | ||
|
||
function dce(tagName) { | ||
return document.createElement(tagName) | ||
} | ||
|
||
function shuffleArr(arr) { | ||
for (let i = arr.length - 1; i > 0; i--) { | ||
const j = Math.floor(Math.random() * (i + 1)); | ||
const temp = arr[i]; | ||
arr[i] = arr[j]; | ||
arr[j] = temp; | ||
} | ||
} | ||
|
||
function removeDuplicates(arr) { | ||
let names = []; | ||
arr = arr.filter((e) => { | ||
const isDuplicate = names.includes(e.name); | ||
if (!isDuplicate) { | ||
names.push(e.name); | ||
return true; | ||
} | ||
return false; | ||
}) | ||
return arr; | ||
} | ||
|
||
function getLogos(data) { | ||
let logos = []; | ||
|
||
for (let i = 0; i < data.children.length; i++) { | ||
const e = data.children[i]; | ||
const singleProvider = {}; | ||
singleProvider.name = eqs(e, ".name").innerHTML; | ||
singleProvider.img = eqs(e, ".img").innerHTML; | ||
singleProvider.link = eqs(e, ".link").innerHTML; | ||
logos.push(singleProvider); | ||
} | ||
|
||
logos = removeDuplicates(logos); | ||
return logos | ||
} | ||
|
||
function populateContainer(container, logos, logosNum, minLogosNum) { | ||
|
||
shuffleArr(logos); | ||
const slidesNum = logos.length / logosNum; | ||
|
||
for (let i = 0; i < slidesNum; i++) { | ||
|
||
const slide = dce("div"); | ||
slide.classList.add("slide", "px-2"); | ||
|
||
const row = dce("div"); | ||
row.classList.add("row"); | ||
|
||
slide.appendChild(row); | ||
|
||
for (let j = 0; j < logosNum; j++) { | ||
|
||
if (logos.length === 0) break | ||
|
||
const {name, img, link} = logos.pop(); | ||
|
||
const div = dce("div"); | ||
div.classList.add("col-4", "col-lg-3"); | ||
|
||
const anchor = dce("a"); | ||
anchor.href = link; | ||
anchor.target = "_blank" | ||
|
||
const image = dce("img"); | ||
image.classList.add("img-responsive") | ||
image.src = img; | ||
image.alt = name; | ||
|
||
anchor.appendChild(image); | ||
div.appendChild(anchor); | ||
row.appendChild(div); | ||
} | ||
|
||
container.appendChild(slide); | ||
if (logos.length < minLogosNum) break | ||
|
||
} | ||
|
||
return container; | ||
} | ||
|
||
const data = dqs("#slideshow-item"); | ||
const arr = getLogos(data); | ||
const logLen = arr.length; | ||
const slidesContainer = dqs("#slideshow-container"); | ||
|
||
const logosNum = 12; | ||
const minLogosNum = 1; | ||
populateContainer(slidesContainer, arr, logosNum, minLogosNum); | ||
|
||
const intervalSpeed = 7000; | ||
const transformSpeed = 1500; | ||
|
||
let firstChild; | ||
let secondChild; | ||
let intervalID; | ||
|
||
function shiftRight() { | ||
firstChild = dqs("#slideshow-container>:nth-child(1)") | ||
secondChild = dqs("#slideshow-container>:nth-child(2)") | ||
|
||
firstChild.classList.add("shift-left-once") | ||
secondChild.classList.add("shift-left-once") | ||
|
||
setTimeout(() => { | ||
slidesContainer.removeChild(firstChild) | ||
firstChild.classList.remove("shift-left-once") | ||
secondChild.classList.remove("shift-left-once") | ||
slidesContainer.appendChild(firstChild) | ||
}, transformSpeed); | ||
} | ||
|
||
function automaticShift() { | ||
setTimeout(() => { | ||
shiftRight(); | ||
intervalID = setInterval(shiftRight, intervalSpeed); | ||
}, intervalSpeed); | ||
} | ||
|
||
if (logLen > 12) { | ||
automaticShift(); | ||
} | ||
} | ||
|
||
genericSlideshow(); |