Skip to content

Commit

Permalink
feat: Improve UI
Browse files Browse the repository at this point in the history
- Buttons and icons
- Order of pages
- Spacing
  • Loading branch information
YDX-2147483647 committed Mar 28, 2024
1 parent 9b3b876 commit 598b723
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
8 changes: 7 additions & 1 deletion docs/bot.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ hide:
- footer
---

# 机器人
# :material-robot: 机器人

<style>
.md-typeset h1 {
margin-bottom: 0;
}
</style>

<div id="bot-root"></div>
17 changes: 16 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,19 @@ hide:

如有相关问题或合作意向,可以通过微信公众号“37号花园”后台留言联系。

配套使用 AI 对话机器人:[scholarcompass.org](https://scholarcompass.org/) (帮助匹配合适院校&快速获取文档信息)
<style>
.md-typeset .md-button {
text-align: center;
}

.md-typeset .get-started {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(13em, 1fr));
gap: 0.5em;
}
</style>

<div markdown='span' class='get-started'>
[:fontawesome-solid-school: 访问院校列表](./university/index.md){ .md-button .md-button--primary }
[:material-robot: 与AI机器人对话](./bot.md){ .md-button }
</div>
7 changes: 6 additions & 1 deletion hooks/generate_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@ def main() -> None:

print(f"- 专业\n{tab}- major/*.md", file=f)

print("- *.md", file=f)
print("- [机器人](bot.md)", file=f)
print("- [关于](about.md)", file=f)

with mkdocs_gen_files.open("university/index.md", "w") as f:
print("# :fontawesome-solid-school: 院校", end="\n\n", file=f)

print("目前包含", end="", file=f)
print(
"、".join(f"{len(catalog[loc])}所[{loc}院校](#{loc})" for loc in locations),
Expand All @@ -70,6 +73,8 @@ def main() -> None:
print(f"- [{u.stem}]({path})", file=f)

with mkdocs_gen_files.open("major/index.md", "w") as f:
print("# :material-school: 专业", end="\n\n", file=f)

n = len(list((docs_dir / "major").glob("*.md")))
print(f"目前包含{n}个专业文档信息。", file=f)

Expand Down

0 comments on commit 598b723

Please sign in to comment.