From 358d874db3e7a33fecf50c66952764c7a32ab924 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Tue, 23 Nov 2021 06:50:27 +0000 Subject: [PATCH] css --- flaskpages/__init__.py | 5 ++++- flaskpages/pages.py | 4 +++- flaskpages/templates/layout.html | 5 +++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/flaskpages/__init__.py b/flaskpages/__init__.py index 7a7ebe2..281535f 100644 --- a/flaskpages/__init__.py +++ b/flaskpages/__init__.py @@ -33,7 +33,10 @@ def create_app(test_config=None): app.logger.debug(app.config) app.register_blueprint(pages.create_bp(app), url_prefix = app.config["URL_PREFIX"], static_folder='static') - + @app.route('/pygments.css') + def pygments_css(): + return pygments_style_defs('tango'), 200, {'Content-Type': 'text/css'} + app.add_url_rule("/", endpoint="index") return app \ No newline at end of file diff --git a/flaskpages/pages.py b/flaskpages/pages.py index 3e96640..d744d63 100644 --- a/flaskpages/pages.py +++ b/flaskpages/pages.py @@ -53,4 +53,6 @@ def create_bp(app): return send_from_directory(app.config['FLATPAGES_ROOT'],path) else: return send_from_directory('static',path) - return page_blueprint \ No newline at end of file + return page_blueprint + + \ No newline at end of file diff --git a/flaskpages/templates/layout.html b/flaskpages/templates/layout.html index e2ecacf..4741898 100644 --- a/flaskpages/templates/layout.html +++ b/flaskpages/templates/layout.html @@ -1,7 +1,8 @@ {# -*-jinja2-*- #} - - + + +