From e46a229f85df066eefb4cd60d285436730445c04 Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Wed, 9 Sep 2020 20:15:22 +0200 Subject: [PATCH] improve projects page --- server.py | 5 ++++- templates/default_content.html | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index ab0576d..3f219ed 100755 --- a/server.py +++ b/server.py @@ -200,6 +200,7 @@ def people(): @app.route("/content/") def content(): identifier = IDENTIFIER_PREFIX + flask.request.args.get("id") + container=False if identifier in app.config: # check for extra config # @@ -215,8 +216,10 @@ def content(): else: with open(fullpath) as f: markupText = markdown2.markdown(f.read()) + container = True - return flask.render_template("default_content.html", conf=app.config, markupText=markupText) + return flask.render_template("default_content.html", container=container, + conf=app.config, markupText=markupText) else: return (EMPTY_STRING, HTTP_NOT_FOUND) diff --git a/templates/default_content.html b/templates/default_content.html index d8249da..86acaf6 100644 --- a/templates/default_content.html +++ b/templates/default_content.html @@ -6,8 +6,10 @@ - {% include 'navbar.html' %} + {% if not container %} + {{ markupText | safe }} + {% else %}
@@ -16,7 +18,8 @@
- {% include 'footer.html' %} + {% endif %} + {% include 'footer.html' %}