mirror of
https://github.com/FAUSheppy/flask-json-dream-website
synced 2025-12-06 00:01:36 +01:00
implement project page
This commit is contained in:
14
server.py
14
server.py
@@ -205,10 +205,17 @@ def content():
|
||||
# check for extra config #
|
||||
extraConfigDir = app.config[identifier + CONFIG_POSTFIX]
|
||||
extraConfig = None
|
||||
markupText = None
|
||||
if extraConfigDir:
|
||||
extraConfig = readJsonDir(os.path.join(app.config["CONTENT_DIR"], extraConfigDir))
|
||||
fullpath = os.path.join(app.config["CONTENT_DIR"], extraConfigDir)
|
||||
if os.path.isdir(fullpath):
|
||||
extraConfig = readJsonDir(fullpath)
|
||||
markupText = flask.Markup(flask.render_template(app.config[identifier],
|
||||
extraConfig=extraConfig))
|
||||
else:
|
||||
with open(fullpath) as f:
|
||||
markupText = markdown2.markdown(f.read())
|
||||
|
||||
markupText = flask.Markup(flask.render_template(app.config[identifier], extraConfig=extraConfig))
|
||||
return flask.render_template("default_content.html", conf=app.config, markupText=markupText)
|
||||
else:
|
||||
return (EMPTY_STRING, HTTP_NOT_FOUND)
|
||||
@@ -398,7 +405,10 @@ def init():
|
||||
if type(subpages[identifier]) == dict:
|
||||
app.config[IDENTIFIER_PREFIX + identifier] = subpages[identifier]["template"]
|
||||
configKey = IDENTIFIER_PREFIX + identifier + CONFIG_POSTFIX
|
||||
if "config-dir" in subpages[identifier]:
|
||||
app.config[configKey] = subpages[identifier]["config-dir"]
|
||||
else:
|
||||
app.config[configKey] = subpages[identifier]["markdown"]
|
||||
else:
|
||||
app.config[IDENTIFIER_PREFIX + identifier] = subpages[identifier]
|
||||
app.config[IDENTIFIER_PREFIX + identifier + CONFIG_POSTFIX] = None
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
{% include 'progress_window.html' %}
|
||||
<div id="main-container" class="container" style="margin-top: 4vw;">
|
||||
<section class="mb-4">
|
||||
<h2 class="h1-responsive font-weight-bold text-center my-4">{{ conf['CONTACT_HEADLINE'] }}
|
||||
<h2 class="h1-responsive font-weight-bold my-4">{{ conf['CONTACT_HEADLINE'] }}
|
||||
</h2>
|
||||
<p class="text-center w-responsive mx-auto mb-5"> </p>
|
||||
<div class="row">
|
||||
@@ -64,15 +64,17 @@
|
||||
<div class="status"></div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="col-md-3 text-center">
|
||||
<div class="border p-3 col-md-3 text-center">
|
||||
<ul class="list-unstyled mb-0">
|
||||
<li><i class="fas fa-envelope mt-4 fa-2x"></i>
|
||||
<p>rejectmail@atlantishq.de</p>
|
||||
<p>Wir freuen uns auf ihre Nachricht!</p></br>
|
||||
{% if conf['CONTACT_EMAIL'] %}
|
||||
<p>Selbsverständlich können sie uns auch per Mail kontaktieren.</p></br>
|
||||
<a href="mailto:{{ conf['CONTACT_EMAIL'] }}">{{ conf['CONTACT_EMAIL'] }}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
{% include 'head.html' %}
|
||||
|
||||
</head>
|
||||
<body class="bg-special" {% if "FORCE_BG_COLOR" in conf %} style="background-color: {{ conf['FORCE_BG_COLOR'] }} !important;" {% endif %}>
|
||||
<body class="bg-special">
|
||||
|
||||
{% include 'navbar.html' %}
|
||||
<div class="container mt-5 mb-5 h-100">
|
||||
<div class="row impressum mt-5"></div>
|
||||
<div class="col-lg-12">
|
||||
{{ markupText }}
|
||||
{{ markupText | safe }}
|
||||
<div class="pb-3"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user