From e776f09b0f62ead4f1b1e0dd8cc4be17a4b2801b Mon Sep 17 00:00:00 2001 From: Sweetbread Date: Thu, 4 Dec 2025 20:21:09 +0300 Subject: [PATCH] Remove whitespaces before sending --- app.py | 9 +++++---- requirements.txt | 2 +- static/style/main.scss | 4 ++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app.py b/app.py index 098dc3e..274c7d0 100644 --- a/app.py +++ b/app.py @@ -1,5 +1,6 @@ from os import system as console from configparser import ConfigParser +from htmlmin import minify from flask import ( Flask, g, @@ -63,16 +64,16 @@ if app.debug: @app.route("/") def index(): - return render_template('index.html') + return minify(render_template('index.html'), remove_empty_space=True) @app.route("/host") def host(): - return render_template('host.html') + return minify(render_template('host.html'), remove_empty_space=True) @app.route("/us") def us(): - return render_template('us.html') + return minify(render_template('us.html'), remove_empty_space=True) @app.route("/risdeveau") def risdeveau(): - return render_template('personal/risdeveau.html') + return minify(render_template('personal/risdeveau.html'), remove_empty_space=True) diff --git a/requirements.txt b/requirements.txt index d31b030..9bf8758 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ Flask==3.1.1 gunicorn - +htmlmin2 diff --git a/static/style/main.scss b/static/style/main.scss index 5228a3a..a01eca0 100644 --- a/static/style/main.scss +++ b/static/style/main.scss @@ -95,6 +95,10 @@ header { background-color: $mantle; padding: .5rem; font-size: larger; + + .header-links * + * { + padding-left: 1ch; + } } footer {