mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-06 05:08:28 +02:00
Added doc generator
- Added plugin doc generator - Added getting start plugin doc
This commit is contained in:
BIN
docs/plugins/html/assets/banner.png
Normal file
BIN
docs/plugins/html/assets/banner.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 194 KiB |
BIN
docs/plugins/html/assets/banner.psd
Normal file
BIN
docs/plugins/html/assets/banner.psd
Normal file
Binary file not shown.
BIN
docs/plugins/html/assets/logo.png
Normal file
BIN
docs/plugins/html/assets/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
BIN
docs/plugins/html/assets/logo_white.png
Normal file
BIN
docs/plugins/html/assets/logo_white.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
51
docs/plugins/html/assets/theme.js
Normal file
51
docs/plugins/html/assets/theme.js
Normal file
@@ -0,0 +1,51 @@
|
||||
/* Things to do before body loads */
|
||||
function restoreDarkMode(){
|
||||
if (localStorage.getItem("darkMode") === "enabled") {
|
||||
$("html").addClass("is-dark");
|
||||
$("html").removeClass("is-white");
|
||||
} else {
|
||||
$("html").removeClass("is-dark");
|
||||
$("html").addClass("is-white");
|
||||
}
|
||||
}
|
||||
restoreDarkMode();
|
||||
|
||||
function updateElementToTheme(isDarkTheme=false){
|
||||
if (!isDarkTheme){
|
||||
let whiteSrc = $("#sysicon").attr("white_src");
|
||||
$("#sysicon").attr("src", whiteSrc);
|
||||
$("#darkModeToggle").html(`<span class="ts-icon is-sun-icon"></span>`);
|
||||
|
||||
// Update the rendering text color in the garphs
|
||||
if (typeof(changeScaleTextColor) != "undefined"){
|
||||
changeScaleTextColor("black");
|
||||
}
|
||||
|
||||
}else{
|
||||
let darkSrc = $("#sysicon").attr("dark_src");
|
||||
$("#sysicon").attr("src", darkSrc);
|
||||
$("#darkModeToggle").html(`<span class="ts-icon is-moon-icon"></span>`);
|
||||
|
||||
// Update the rendering text color in the garphs
|
||||
if (typeof(changeScaleTextColor) != "undefined"){
|
||||
changeScaleTextColor("white");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Things to do after body loads */
|
||||
$(document).ready(function(){
|
||||
$("#darkModeToggle").on("click", function() {
|
||||
$("html").toggleClass("is-dark");
|
||||
$("html").toggleClass("is-white");
|
||||
if ($("html").hasClass("is-dark")) {
|
||||
localStorage.setItem("darkMode", "enabled");
|
||||
updateElementToTheme(true);
|
||||
} else {
|
||||
localStorage.setItem("darkMode", "disabled");
|
||||
updateElementToTheme(false);
|
||||
}
|
||||
});
|
||||
|
||||
updateElementToTheme(localStorage.getItem("darkMode") === "enabled");
|
||||
});
|
Reference in New Issue
Block a user