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-03-31 16:09:57 +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')
|