initial: novel-app snapshot

This commit is contained in:
omo
2026-08-17 17:11:30 +08:00
commit 1ae06209ac
34 changed files with 2821 additions and 0 deletions

33
routes/pages.py Normal file
View File

@@ -0,0 +1,33 @@
"""Page blueprint: HTML routes rendering Jinja2 templates."""
from flask import Blueprint, jsonify, render_template
bp = Blueprint("pages", __name__)
@bp.route("/healthz")
def page_healthz():
"""Liveness probe. 不查 DB — deploy.sh 用它判断进程是否活着."""
return jsonify({"status": "ok"})
@bp.route("/")
def page_index():
return render_template("index.html")
@bp.route("/deconstruct")
def page_deconstruct():
return render_template("deconstruct.html")
@bp.route("/novel/<int:novel_id>")
def page_novel_detail(novel_id):
return render_template("novel_detail.html", novel_id=novel_id)
@bp.route("/novel/<int:novel_id>/chapter/<int:chapter_id>")
def page_chapter_write(novel_id, chapter_id):
return render_template(
"chapter_write.html", novel_id=novel_id, chapter_id=chapter_id
)