mirror of
https://github.com/FAUSheppy/flask-json-dream-website
synced 2025-12-06 08:11:35 +01:00
improve projects page
This commit is contained in:
@@ -200,6 +200,7 @@ def people():
|
|||||||
@app.route("/content/")
|
@app.route("/content/")
|
||||||
def content():
|
def content():
|
||||||
identifier = IDENTIFIER_PREFIX + flask.request.args.get("id")
|
identifier = IDENTIFIER_PREFIX + flask.request.args.get("id")
|
||||||
|
container=False
|
||||||
if identifier in app.config:
|
if identifier in app.config:
|
||||||
|
|
||||||
# check for extra config #
|
# check for extra config #
|
||||||
@@ -215,8 +216,10 @@ def content():
|
|||||||
else:
|
else:
|
||||||
with open(fullpath) as f:
|
with open(fullpath) as f:
|
||||||
markupText = markdown2.markdown(f.read())
|
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:
|
else:
|
||||||
return (EMPTY_STRING, HTTP_NOT_FOUND)
|
return (EMPTY_STRING, HTTP_NOT_FOUND)
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,10 @@
|
|||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-special">
|
<body class="bg-special">
|
||||||
|
|
||||||
{% include 'navbar.html' %}
|
{% include 'navbar.html' %}
|
||||||
|
{% if not container %}
|
||||||
|
{{ markupText | safe }}
|
||||||
|
{% else %}
|
||||||
<div class="container mt-5 mb-5 h-100">
|
<div class="container mt-5 mb-5 h-100">
|
||||||
<div class="row impressum mt-5"></div>
|
<div class="row impressum mt-5"></div>
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
@@ -16,7 +18,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% include 'footer.html' %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% include 'footer.html' %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user