Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding anchor links to partner page #9411

Merged
merged 2 commits into from
Jul 18, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 33 additions & 18 deletions content/en/partners/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<main>
<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"><center><h5><b>Kubernetes Certified Service Providers</b></h5><br>Vetted service providers with deep experience helping enterprises successfully adopt Kubernetes.<br><br><br><button id="defaultIframe" class="button" onClick="updateSrc(this.id)">See KCSP Partners</button></center></div>
<div class="col-nav"><center><h5><b>Certified Kubernetes Distributions, Hosted Platforms, and Installers</b></h5>Software conformance ensures that every vendor’s version of Kubernetes supports the required APIs.<br><br><br><button id="firstIframe" class="button" onClick="updateSrc(this.id)">See Conformance Partners</button></a></center></div>
<div class="col-nav"><center><h5><b>Kubernetes Training Partners</b></h5><br>Vetted training providers who have deep experience in cloud native technology training.<br><br><br><br><button id="secondIframe" class="button" onClick="updateSrc(this.id)">See KTP Partners</button></center></div>
<div class="col-nav"><center><h5><b>Kubernetes Certified Service Providers</b></h5><br>Vetted service providers with deep experience helping enterprises successfully adopt Kubernetes.<br><br><br><button id="kcsp" class="button" onClick="updateSrc(this.id)">See KCSP Partners</button></center></div>
<div class="col-nav"><center><h5><b>Certified Kubernetes Distributions, Hosted Platforms, and Installers</b></h5>Software conformance ensures that every vendor’s version of Kubernetes supports the required APIs.<br><br><br><button id="conformance" class="button" onClick="updateSrc(this.id)">See Conformance Partners</button></a></center></div>
<div class="col-nav"><center><h5><b>Kubernetes Training Partners</b></h5><br>Vetted training providers who have deep experience in cloud native technology training.<br><br><br><br><button id="ktp" class="button" onClick="updateSrc(this.id)">See KTP Partners</button></center></div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script type="text/javascript">
Expand All @@ -22,34 +22,49 @@ <h5>Kubernetes works with partners to create a strong, vibrant codebase that sup
var secondLink = "https://landscape.cncf.io/grouping=landscape&landscape=kubernetes-training-partner&embed=true";

function updateSrc(buttonId) {
if (buttonId == "defaultIframe") {
if (buttonId == "kcsp") {
$("#landscape").attr("src",defaultLink);
window.location.hash = "#kcsp";
}
if (buttonId == "firstIframe") {
if (buttonId == "conformance") {
$("#landscape").attr("src",firstLink);
window.location.hash = "#conformance";
}
if (buttonId == "secondIframe") {
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>
</head>
<body>
<div id="frameHolder">
<iframe id="landscape" frameBorder="0" scrolling="no" style="width: 1px; min-width: 100%" src="https://landscape.cncf.io/grouping=landscape&landscape=kubernetes-certified-service-provider&embed=true"></iframe>
<iframe id="landscape" frameBorder="0" scrolling="no" style="width: 1px; min-width: 100%" src=""></iframe>
<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.6.0/iframeResizer.js"></script>
<script>
iFrameResize({
log:true,
messageCallback : function(messageData){ // Callback fn when message is received
if (messageData.message.type === 'showModal') {
document.querySelector('body').style.overflow = 'hidden';
}
if (messageData.message.type === 'hideModal') {
document.querySelector('body').style.overflow = 'auto';
}
},
}, '#landscape');
document.addEventListener('DOMContentLoaded', function() {
iFrameResize({
log:true,
messageCallback : function(messageData){ // Callback fn when message is received
if (messageData.message.type === 'showModal') {
document.querySelector('body').style.overflow = 'hidden';
}
if (messageData.message.type === 'hideModal') {
document.querySelector('body').style.overflow = 'auto';
}
},
}, '#landscape');
});
</script>
</div>
</body>
Expand Down