mirror of
https://github.com/minio/docs.git
synced 2025-07-31 18:04:52 +03:00
Docs Multiplatform Slice
This commit is contained in:
@ -36,4 +36,50 @@ window.addEventListener("DOMContentLoaded", (event) => {
|
||||
target === 'sidebar' ? $('body').removeClass('nav-active') : $('body').removeClass('sidebar-active');
|
||||
$('body').toggleClass(target + '-active');
|
||||
});
|
||||
|
||||
renderPersonas();
|
||||
|
||||
|
||||
});
|
||||
|
||||
function renderPersonas() {
|
||||
// This inserts the personas into the left-hand nav
|
||||
|
||||
let operationPersona = document.createElement("span");
|
||||
operationPersona.innerHTML = "Operations";
|
||||
operationPersona.id = "operationsPersona";
|
||||
operationPersona.className = "persona";
|
||||
|
||||
let administrationPersona = document.createElement("span");
|
||||
administrationPersona.innerHTML = "Administration";
|
||||
administrationPersona.id = "administrationPersona";
|
||||
administrationPersona.className = "persona";
|
||||
|
||||
let developerPersona = document.createElement("span");
|
||||
developerPersona.innerHTML = "Developers";
|
||||
developerPersona.id = "developerPersona";
|
||||
developerPersona.className = "persona";
|
||||
|
||||
let referencePersona = document.createElement("span");
|
||||
referencePersona.innerHTML = "Reference";
|
||||
referencePersona.id = "referencePersona";
|
||||
referencePersona.className = "persona";
|
||||
|
||||
list = document.getElementsByClassName("toctree-l1");
|
||||
|
||||
for (i=0; i<list.length; i++) {
|
||||
let page_title = list[i].childNodes[0].innerHTML;
|
||||
if (page_title === "Install and Deploy MinIO" || page_title === "Install the MinIO Operator") {
|
||||
list[i].insertAdjacentElement('beforebegin',operationPersona);
|
||||
}
|
||||
else if (page_title === "MinIO Console") {
|
||||
list[i].insertAdjacentElement('beforebegin',administrationPersona);
|
||||
}
|
||||
else if (page_title === "Software Development Kits (SDK)") {
|
||||
list[i].insertAdjacentElement('beforebegin',developerPersona);
|
||||
}
|
||||
else if (page_title === "MinIO Client") {
|
||||
list[i].insertAdjacentElement('beforebegin',referencePersona);
|
||||
}
|
||||
}
|
||||
}
|
@ -91,15 +91,25 @@ aside.sidebar {
|
||||
.docs {
|
||||
margin-right: -0.65rem;
|
||||
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0.5rem 0 0.5rem 0;
|
||||
font-size: .90rem;
|
||||
|
||||
& > span.persona {
|
||||
font-weight: bold;
|
||||
border-bottom-style: solid;
|
||||
border-width: 2px;
|
||||
display: block;
|
||||
padding-bottom: 1rem;
|
||||
|
||||
}
|
||||
|
||||
& > li {
|
||||
|
||||
margin: 0.5rem 0 0.5rem 0;
|
||||
margin: 0.5rem 0 0.5rem 0.5rem;
|
||||
|
||||
& > a {
|
||||
&, & > code {
|
||||
|
Reference in New Issue
Block a user