Files
lair.moe/blueprints/root/__init__.py
T

29 lines
521 B
Python
Raw Normal View History

2026-01-17 18:55:25 +03:00
from htmlmin import minify
from flask import Blueprint, render_template, request, jsonify
bp = Blueprint(
"root",
__name__,
template_folder="templates",
static_folder="static"
)
def render_tmpl(filename: str) -> str:
return minify(
render_template(filename),
remove_empty_space=True
)
@bp.route("/")
def index():
2026-04-03 00:34:08 +03:00
return render_tmpl('index.pug')
2026-01-17 18:55:25 +03:00
@bp.route("/host")
def host():
2026-03-31 16:09:57 +03:00
return render_tmpl('host.pug')
2026-01-17 18:55:25 +03:00
@bp.route("/us")
def us():
2026-03-31 16:09:57 +03:00
return render_tmpl('us.pug')