前板第一次提交

This commit is contained in:
2024-03-29 16:11:04 +08:00
parent cdd76cc211
commit 7217463e55
1299 changed files with 385855 additions and 0 deletions

18
lvgl_v8_front/lvgl/docs/_static/js/custom.js vendored Executable file
View File

@@ -0,0 +1,18 @@
/* API collapsing */
document.addEventListener('DOMContentLoaded', (event) => {
document.querySelectorAll("dl.cpp").forEach(cppListing => {
const dt = cppListing.querySelector("dt");
let shouldBeExpanded = false;
if(dt.id == document.location.hash.substring(1))
shouldBeExpanded = true;
cppListing.classList.add(shouldBeExpanded ? "expanded" : "unexpanded");
const button = document.createElement("span");
button.classList.add("lv-api-expansion-button");
button.addEventListener("click", () => {
cppListing.classList.toggle("unexpanded");
cppListing.classList.toggle("expanded");
});
dt.insertBefore(button, dt.firstChild);
});
})