diff --git a/content.example/thanks.html b/content.example/thanks.html new file mode 100644 index 0000000..948924d --- /dev/null +++ b/content.example/thanks.html @@ -0,0 +1,30 @@ + + + + + + + + {% include 'head.html' %} + + + + + {% include 'navbar.html' %} +
+

{{ conf['THANKS_TITLE'] }}

+

+ {{ conf['THANKS_STRONG_TEXT'] }} + {{ conf['THANKS_TEXT'] }} +

+
+

+ Still having trouble? Contact us +

+

+ Return to Homepage +

+
+ + + diff --git a/example_config.py b/example_config.py index f932234..993e0de 100644 --- a/example_config.py +++ b/example_config.py @@ -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" diff --git a/server.py b/server.py index 64132a9..3e3a2db 100755 --- a/server.py +++ b/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)) diff --git a/templates/contact.html b/templates/contact.html index d98d2d7..14652e7 100644 --- a/templates/contact.html +++ b/templates/contact.html @@ -4,7 +4,6 @@ - {% include 'head.html' %}