mirror of
https://github.com/FAUSheppy/flask-json-dream-website
synced 2025-12-06 08:11:35 +01:00
implement thanks page
This commit is contained in:
30
content.example/thanks.html
Normal file
30
content.example/thanks.html
Normal 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>
|
||||
@@ -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"
|
||||
|
||||
12
server.py
12
server.py
@@ -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))
|
||||
|
||||
@@ -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' %}
|
||||
|
||||
Reference in New Issue
Block a user