summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authoraltaf-creator <dev@altafcreator.com>2026-07-31 20:57:25 +0800
committeraltaf-creator <dev@altafcreator.com>2026-07-31 20:57:25 +0800
commitd163092b5c159ddd1813550d1f9bab72adbdf80a (patch)
treed30657c2aa127a57ff58a267a502aa0e3f7378c6 /main.py
parentf1966a70cd5bdcb606c579d5146e26acfc1028fc (diff)
index and blog is now ssr
Diffstat (limited to 'main.py')
-rw-r--r--main.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/main.py b/main.py
index 23f201f..78074cc 100644
--- a/main.py
+++ b/main.py
@@ -138,4 +138,18 @@ def event_page_redirect(event_name: str):
)
+@app.get("/")
+def index_page():
+ status, html = pages.render_index()
+
+ return fastapi.responses.Response(content=html, media_type="text/html", status_code=status)
+
+
+@app.get("/blog/")
+def bloglist_page():
+ status, html = pages.render_blog_list()
+
+ return fastapi.responses.Response(content=html, media_type="text/html", status_code=status)
+
+
app.mount("/", fastapi.staticfiles.StaticFiles(directory="./www/", html=True), name="static")