mirror of
https://github.com/NotXia/unibo-ai-notes.git
synced 2025-12-15 02:52:22 +01:00
Update web viewer
This commit is contained in:
6
.github/prepare_web_viewer.py
vendored
6
.github/prepare_web_viewer.py
vendored
@ -34,12 +34,12 @@ if __name__ == "__main__":
|
||||
course_content = notes_metadata[year][semester][course]["content"]
|
||||
|
||||
if (len(course_content) == 1) and (course_content[0]["name"] is None):
|
||||
table_of_content += f"<h2><a href='{os.path.join(args.gh_raw_pdf_url, course_content[0]['url'])}'>{course_name}</a></h2>\n"
|
||||
table_of_content += f"<h3><a href='{os.path.join(args.gh_raw_pdf_url, course_content[0]['url'])}'>{course_name}</a></h3>\n"
|
||||
else:
|
||||
table_of_content += f"<h2>{course_name}</h2>\n"
|
||||
table_of_content += f"<h3>{course_name}</h3>\n"
|
||||
table_of_content += "<ul>\n"
|
||||
for content in course_content:
|
||||
table_of_content += f"<li><h3><a href='{os.path.join(args.gh_raw_pdf_url, content['url'])}'>{content['name']}</a></h3></li>\n"
|
||||
table_of_content += f"<li><h4><a href='{os.path.join(args.gh_raw_pdf_url, content['url'])}'>{content['name']}</a></h4></li>\n"
|
||||
table_of_content += "</ul>\n"
|
||||
|
||||
with open(os.path.join(args.out_path, "index.html"), "w") as f:
|
||||
|
||||
5
.github/web-viewer/index.html
vendored
5
.github/web-viewer/index.html
vendored
@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<title>M.Sc. AI notes</title>
|
||||
|
||||
<style>
|
||||
* {
|
||||
@ -27,7 +27,8 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Table of contents</h1>
|
||||
<h1>Unibo Master's degree in AI - Notes</h1>
|
||||
<h2>Table of contents</h2>
|
||||
<!-- begin-toc -->
|
||||
<!-- end-toc -->
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user