better theme

This commit is contained in:
binary-husky
2024-01-21 19:41:18 +08:00
parent b55d573819
commit d818c38dfe
6 changed files with 32 additions and 66 deletions

View File

@@ -76,22 +76,8 @@ def adjust_theme():
chatbot_code_background_color_dark="*neutral_950",
)
js = ""
for jsf in [
os.path.join(theme_dir, "common.js"),
os.path.join(theme_dir, "mermaid.min.js"),
os.path.join(theme_dir, "mermaid_loader.js"),
]:
with open(jsf, "r", encoding="utf8") as f:
js += f"<script>{f.read()}</script>"
# 添加一个萌萌的看板娘
if ADD_WAIFU:
js += """
<script src="file=docs/waifu_plugin/jquery.min.js"></script>
<script src="file=docs/waifu_plugin/jquery-ui.min.js"></script>
<script src="file=docs/waifu_plugin/autoload.js"></script>
"""
from themes.common import get_common_html_javascript_code
js = get_common_html_javascript_code()
with open(os.path.join(theme_dir, "green.js"), "r", encoding="utf8") as f:
js += f"<script>{f.read()}</script>"