Add cncf-landscape shortcode

and adjust /partners/ to use it.
This commit is contained in:
Tim Bannister
2020-08-17 09:10:45 +01:00
parent 7b2d09adca
commit fb127402c6
2 changed files with 67 additions and 49 deletions
+4 -49
View File
@@ -7,7 +7,6 @@ cid: partners
---
<section id="users">
<main class="main-section">
<h5>Kubernetes works with partners to create a strong, vibrant codebase that supports a spectrum of complementary platforms.</h5>
<div class="col-container">
<div class="col-nav">
@@ -17,7 +16,7 @@ cid: partners
</h5>
<br>Vetted service providers with deep experience helping enterprises successfully adopt Kubernetes.
<br><br><br>
<button class="button" id="kcsp" onclick="updateSrc(this.id)">See KCSP Partners</button>
<button class="button landscape-trigger landscape-default" data-landscape-types="kubernetes-certified-service-provider" id="kcsp">See KCSP Partners</button>
<br><br>Interested in becoming a
<a href="https://www.cncf.io/certification/kcsp/">KCSP</a>?
</center>
@@ -28,7 +27,7 @@ cid: partners
<b>Certified Kubernetes Distributions, Hosted Platforms, and Installers</b>
</h5>Software conformance ensures that every vendors version of Kubernetes supports the required APIs.
<br><br><br>
<button class="button" id="conformance" onclick="updateSrc(this.id)">See Conformance Partners</button>
<button class="button landscape-trigger" data-landscape-types="certified-kubernetes-distribution,certified-kubernetes-hosted,certified-kubernetes-installer" id="conformance">See Conformance Partners</button>
<br><br>Interested in becoming
<a href="https://www.cncf.io/certification/software-conformance/">Kubernetes Certified</a>?
</center>
@@ -40,57 +39,13 @@ cid: partners
</h5>
<br>Vetted training providers who have deep experience in cloud native technology training.
<br><br><br>
<button class="button" id="ktp" onclick="updateSrc(this.id)">See KTP Partners</button>
<button class="button landscape-trigger" data-landscape-types="kubernetes-training-partner" id="ktp">See KTP Partners</button>
<br><br>Interested in becoming a
<a href="https://www.cncf.io/certification/training/">KTP</a>?
</center>
</div>
</div>
<script crossorigin="anonymous" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script type="text/javascript">
var defaultLink = "https://landscape.cncf.io/category=kubernetes-certified-service-provider&format=card-mode&grouping=category&embed=yes";
var firstLink = "https://landscape.cncf.io/category=certified-kubernetes-distribution,certified-kubernetes-hosted,certified-kubernetes-installer&format=card-mode&grouping=category&embed=yes";
var secondLink = "https://landscape.cncf.io/category=kubernetes-training-partner&format=card-mode&grouping=category&embed=yes";
function updateSrc(buttonId) {
if (buttonId == "kcsp") {
$("#landscape").attr("src", defaultLink);
window.location.hash = "#kcsp";
}
if (buttonId == "conformance") {
$("#landscape").attr("src", firstLink);
window.location.hash = "#conformance";
}
if (buttonId == "ktp") {
$("#landscape").attr("src", secondLink);
window.location.hash = "#ktp";
}
}
// Automatically load the correct iframe based on the URL fragment
document.addEventListener("DOMContentLoaded", function () {
var showContent = "kcsp";
if (window.location.hash) {
console.log("hash is:", window
.location
.hash
.substring(1));
showContent = window
.location
.hash
.substring(1);
}
updateSrc(showContent);
});
</script>
<body>
<div id="frameHolder">
<iframe frameborder="0" id="landscape" scrolling="no" src="" style="width: 1px; min-width: 100%" title="CNCF Landscape"></iframe>
<script src="https://landscape.cncf.io/iframeResizer.js"></script>
</div>
</body>
</main>
{{< cncf-landscape helpers=true >}}
</section>
<style>