镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-06 14:36:48 +00:00
apply to other themes
这个提交包含在:
@@ -67,8 +67,14 @@ def adjust_theme():
|
|||||||
button_cancel_text_color_dark="white",
|
button_cancel_text_color_dark="white",
|
||||||
)
|
)
|
||||||
|
|
||||||
with open(os.path.join(theme_dir, "common.js"), "r", encoding="utf8") as f:
|
js = ""
|
||||||
js = f"<script>{f.read()}</script>"
|
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:
|
if ADD_WAIFU:
|
||||||
|
|||||||
@@ -31,8 +31,15 @@ def adjust_theme():
|
|||||||
THEME = THEME.lstrip("huggingface-")
|
THEME = THEME.lstrip("huggingface-")
|
||||||
set_theme = set_theme.from_hub(THEME.lower())
|
set_theme = set_theme.from_hub(THEME.lower())
|
||||||
|
|
||||||
with open(os.path.join(theme_dir, "common.js"), "r", encoding="utf8") as f:
|
js = ""
|
||||||
js = f"<script>{f.read()}</script>"
|
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:
|
if ADD_WAIFU:
|
||||||
|
|||||||
@@ -76,8 +76,14 @@ def adjust_theme():
|
|||||||
chatbot_code_background_color_dark="*neutral_950",
|
chatbot_code_background_color_dark="*neutral_950",
|
||||||
)
|
)
|
||||||
|
|
||||||
with open(os.path.join(theme_dir, "common.js"), "r", encoding="utf8") as f:
|
js = ""
|
||||||
js = f"<script>{f.read()}</script>"
|
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:
|
if ADD_WAIFU:
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户