mirror of
https://gitlab.com/vyla-entertainment/documentation.git
synced 2026-11-16 23:47:22 -05:00
UI updated
This commit is contained in:
@@ -81,7 +81,7 @@ function buildThemeControls() {
|
||||
seg.innerHTML = modes.map(function (m) {
|
||||
return '<button type="button" data-mode="' + m + '" aria-label="' + m + '">' + icon(m) + "</button>";
|
||||
}).join("");
|
||||
links.appendChild(seg);
|
||||
(document.querySelector("#sidebar .side-links") || links).appendChild(seg);
|
||||
[menu, seg].forEach(function (el) {
|
||||
el.addEventListener("click", function (e) {
|
||||
var b = e.target.closest("button");
|
||||
@@ -185,7 +185,9 @@ function buildMobileBar() {
|
||||
var newSidebar = doc.querySelector("#sidebar");
|
||||
if (newSidebar) {
|
||||
var groups = newSidebar.querySelectorAll(".group");
|
||||
var sideHead = sidebar.querySelector(".side-head");
|
||||
sidebar.innerHTML = "";
|
||||
if (sideHead) sidebar.appendChild(sideHead);
|
||||
if (mobileTabs) sidebar.appendChild(mobileTabs);
|
||||
groups.forEach(function (group) {
|
||||
sidebar.appendChild(group.cloneNode(true));
|
||||
@@ -202,6 +204,18 @@ function buildMobileBar() {
|
||||
});
|
||||
});
|
||||
}
|
||||
var head = document.createElement("div");
|
||||
head.className = "side-head";
|
||||
var brand = document.querySelector("#navbar .brand");
|
||||
if (brand && sidebar) {
|
||||
var b = brand.cloneNode(true);
|
||||
b.querySelector("img").removeAttribute("id");
|
||||
var sideLinks = document.createElement("div");
|
||||
sideLinks.className = "side-links";
|
||||
head.appendChild(b);
|
||||
head.appendChild(sideLinks);
|
||||
sidebar.insertBefore(head, sidebar.firstChild);
|
||||
}
|
||||
}
|
||||
|
||||
function addEyebrow() {
|
||||
|
||||
Reference in New Issue
Block a user