29 lines
522 B
Python
29 lines
522 B
Python
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():
|
|
return render_tmpl('index.html')
|
|
|
|
@bp.route("/host")
|
|
def host():
|
|
return render_tmpl('host.pug')
|
|
|
|
@bp.route("/us")
|
|
def us():
|
|
return render_tmpl('us.pug')
|