From c3bbd48601cdb4bec510db72bd2296724874f4f3 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 24 May 2020 10:31:24 -0500 Subject: Display About/FAQ --- bh20simplewebuploader/main.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'bh20simplewebuploader/main.py') diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py index a30d350..eb9a0f5 100644 --- a/bh20simplewebuploader/main.py +++ b/bh20simplewebuploader/main.py @@ -428,7 +428,19 @@ def blog_page(): @app.route('/about') def about_page(): - return render_template('about.html',menu='ABOUT') + buf = "" + in_body = False + begin_body = re.compile(r"",re.IGNORECASE) + end_body = re.compile(r"(|.*=\"postamble\")",re.IGNORECASE) + with open('doc/web/about.html') as f: + for line in f: + if end_body.match(line): + break + if in_body: + buf += line + elif begin_body.match(line): + in_body = True + return render_template('about.html',menu='ABOUT',embed=buf) ## Dynamic API functions starting here ## This is quick and dirty for now, just to get something out and demonstrate the queries -- cgit v1.2.3