implement thanks page

This commit is contained in:
Yannik Schmidt
2020-09-01 02:22:12 +02:00
parent 919772c7e3
commit 0a753093e0
4 changed files with 46 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{% include 'head.html' %}
</head>
<body>
{% include 'navbar.html' %}
<div class="jumbotron text-center">
<h1 class="display-3">{{ conf['THANKS_TITLE'] }}</h1>
<p class="lead">
<strong>{{ conf['THANKS_STRONG_TEXT'] }}</strong>
{{ conf['THANKS_TEXT'] }}
</p>
<hr>
<p>
Still having trouble? <a href="/contact">Contact us</a>
</p>
<p class="lead">
<a class="btn btn-primary btn-sm" href="/" role="button">Return to Homepage</a>
</p>
</div>
</body>
</html>

View File

@@ -47,3 +47,7 @@ TARGET_SMTP=None
TARGET_EMAIL=None
TARGET_SMTP_USER=None
TARGET_SMTP_AUTH=None
THANKS_TITLE = "Thank you for something!"
THANKS_STRONG_TEXT = "Strong Text"
TANKS_TEXT = "Normal Text"

View File

@@ -176,6 +176,18 @@ def impressum():
impressumFull = flask.render_template_string(f.read(), conf=app.config, text=impressumText)
return flask.render_template("stub.html", content=impressumFull)
@app.route("/thanks")
def thanks():
'''Page to be displayed after successfully submitting a contact form'''
thanksTemplatePath = os.path.join(app.config["CONTENT_DIR"], "thanks.html")
thanksTemplate = None
with open(thanksTemplatePath) as f:
thanksTemplate = flask.Markup(flask.render_template_string(f.read(), conf=app.config))
return flask.render_template("stub.html", content=thanksTemplate)
@app.route("/people")
def people():
peopleDict = readJsonDir(os.path.join(app.config["CONTENT_DIR"], PEOPLE_DIR))

View File

@@ -4,7 +4,6 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Leauge of Legends Coaching">
<!-- Bootstrap core CSS -->
{% include 'head.html' %}