diff --git a/app.py b/app.py index 0d1d5df..a5775e8 100644 --- a/app.py +++ b/app.py @@ -47,11 +47,11 @@ mimetypes.add_type('application/javascript', '.mjs') if os.environ.get('NP_HTML_POST_PROCESS', "NONE") == "MINIFY": print("Using 'Flask-Minify' as HTML minifying post-processor") - from flask_minify import Minify - Minify(app=app, html=True, js=True, cssless=True) + #from flask_minify import Minify + #Minify(app=app, html=True, js=True, cssless=True) def post_process_html(html_content: str) -> str: - return re.sub(r'\s+', ' ', html_content.replace('\n', '')) + return re.sub(r'\s+', ' ', html_content.replace('\n', ' ')) # This fucking library breaks so much shit it's unbelievable. # And it takes FOREVER to compile because "MuH rUsT iS sUpErIoR"... @@ -395,13 +395,16 @@ if __name__ == '__main__': reload_contributors_data(os.path.join(os.getcwd(), "data/contributors.yml")) reload_sitemap_entries(os.path.join(os.getcwd(), "data/sitemap.yml")) - #from waitress import serve - #serve(app, host='0.0.0.0', port=5000, threads=64) - - app.run( - host="0.0.0.0", - port=5000, - debug=True, - # debug=False, - load_dotenv=False - ) + if os.environ.get('NP_FLASK_WAITRESS', "0") == "1": + print("Serving app using waitress.") + from waitress import serve + serve(app, host='0.0.0.0', port=5000, threads=64) + else: + print("Serving app using default development server.") + app.run( + host="0.0.0.0", + port=5000, + debug=True, + # debug=False, + load_dotenv=False + ) diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..1062f1c --- /dev/null +++ b/readme.md @@ -0,0 +1,3 @@ +# Website - NibblePoker.lu +Public repository containing the source code for the *nibblepoker.lu* & *nibblepoker.com* websites. + diff --git a/requirements.txt b/requirements.txt index abe4b00..4bc4c7c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,14 @@ -Flask~=3.0.3 +Flask~=3.1.0 Jinja2 MarkupSafe -#minify-html Flask-Minify PyYAML~=6.0.2 beautifulsoup4 +# May be removed locked-dict -Werkzeug~=3.0.4 +Werkzeug~=3.1.3 #gunicorn waitress~=3.0.2 diff --git a/templates/pages/_content_index.jinja b/templates/pages/_content_index.jinja index 79657d7..32e6ace 100644 --- a/templates/pages/_content_index.jinja +++ b/templates/pages/_content_index.jinja @@ -2,6 +2,6 @@ {% block main_content %} {% block content_filters %}{% endblock %} -
+ {% block content_listing %}{% endblock %} {% endblock %} diff --git a/templates/pages/project_index.jinja b/templates/pages/project_index.jinja index 23113a4..d2cb261 100644 --- a/templates/pages/project_index.jinja +++ b/templates/pages/project_index.jinja @@ -15,7 +15,11 @@ {% block content_listing %} {% for project_id, project_data in get_projects().items() %} -
+ +
+ + +
+
+ + +