You've already forked AstralRinth
forked from didirus/AstralRinth
API Page
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,3 +1,5 @@
|
||||
//TODO Reduce repeated code
|
||||
|
||||
let currentlySelected = document.getElementById("description-bar");
|
||||
let currentlySelectedDiv = document.getElementById("description");
|
||||
|
||||
@@ -15,4 +17,40 @@ function toggleSection(element) {
|
||||
currentlySelectedDiv.classList.add("mod-show");
|
||||
}
|
||||
|
||||
hljs.initHighlightingOnLoad();
|
||||
let currentlyBuildSelected = document.getElementById("gradle-code-bar");
|
||||
let currentlyBuildSelectedDiv = document.getElementById("gradle-code");
|
||||
|
||||
function toggleBuildSection(element) {
|
||||
currentlyBuildSelected.classList.remove("mod-bar-active");
|
||||
currentlyBuildSelected = element;
|
||||
currentlyBuildSelected.classList.add("mod-bar-active");
|
||||
|
||||
currentlyBuildSelectedDiv.classList.remove("mod-show");
|
||||
currentlyBuildSelectedDiv.classList.add("mod-hide");
|
||||
|
||||
currentlyBuildSelectedDiv = document.getElementById(element.id.replace("-bar", ""));
|
||||
|
||||
currentlyBuildSelectedDiv.classList.remove("mod-hide");
|
||||
currentlyBuildSelectedDiv.classList.add("mod-show");
|
||||
}
|
||||
|
||||
let currentlyApiSelected = document.getElementById("curl-code-bar");
|
||||
let currentlyApiSelectedDiv = document.getElementById("curl-code");
|
||||
|
||||
function toggleApiSection(element) {
|
||||
currentlyApiSelected.classList.remove("mod-bar-active");
|
||||
currentlyApiSelected = element;
|
||||
currentlyApiSelected.classList.add("mod-bar-active");
|
||||
|
||||
currentlyApiSelectedDiv.classList.remove("mod-show");
|
||||
currentlyApiSelectedDiv.classList.add("mod-hide");
|
||||
|
||||
currentlyApiSelectedDiv = document.getElementById(element.id.replace("-bar", ""));
|
||||
|
||||
currentlyApiSelectedDiv.classList.remove("mod-hide");
|
||||
currentlyApiSelectedDiv.classList.add("mod-show");
|
||||
}
|
||||
|
||||
for (let block of document.getElementsByClassName("api-code-block")) {
|
||||
hljs.highlightBlock(block);
|
||||
}
|
||||
Reference in New Issue
Block a user