34 lines
840 B
Python
34 lines
840 B
Python
"""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
|
|
)
|