Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
default versioning logic for warning banner from latest to stable
Browse files Browse the repository at this point in the history
  • Loading branch information
reginapizza committed Feb 5, 2021
1 parent 1235d93 commit 405812e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions docs/assets/versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@ setTimeout(function() {
}, 0);

// VERSION WARNINGS
window.addEventListener("DOMContentLoaded", function() {
if ((window['READTHEDOCS_DATA']).version !== "latest") {
document.querySelector("div[data-md-component=announce]").innerHTML = "<div id='announce-msg'>You are viewing the docs for a previous version of Argo CD, <a href='https://argocd-notifications.readthedocs.io/en/latest/'>click here to go to the latest version.</a></div>"
window.addEventListener("DOMContentLoaded", function() {
if ((window['READTHEDOCS_DATA']).version === "latest") {
document.querySelector("div[data-md-component=announce]").innerHTML = "<div id='announce-msg'>You are viewing the docs for an unreleased version of Argo CD, <a href='https://argocd-notifications.readthedocs.io/en/stable/'>click here to go to the latest stable version.</a></div>"
}
else if ((window['READTHEDOCS_DATA']).version !== "stable") {
document.querySelector("div[data-md-component=announce]").innerHTML = "<div id='announce-msg'>You are viewing the docs for a previous version of Argo CD, <a href='https://argocd-notifications.readthedocs.io/en/stable/'>click here to go to the latest stable version.</a></div>"
}

// if ((window['READTHEDOCS_DATA']).version === "latest") {
// document.querySelector("div[data-md-component=announce]").innerHTML = "<div id='announce-msg'>Yay you're on the latest version of docs!</div>"
// }
});

0 comments on commit 405812e

Please sign in to comment.