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 +- bh20simplewebuploader/templates/about.html | 4 +- bh20simplewebuploader/templates/form.html | 2 +- bh20simplewebuploader/templates/org-header.html | 293 ++++++++++++++++++++++++ 4 files changed, 309 insertions(+), 4 deletions(-) create mode 100644 bh20simplewebuploader/templates/org-header.html (limited to 'bh20simplewebuploader') 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 diff --git a/bh20simplewebuploader/templates/about.html b/bh20simplewebuploader/templates/about.html index 286a211..07b6951 100644 --- a/bh20simplewebuploader/templates/about.html +++ b/bh20simplewebuploader/templates/about.html @@ -1,11 +1,11 @@ - {% include 'header.html' %} + {% include 'org-header.html' %} {% include 'banner.html' %} {% include 'menu.html' %} - WIP + {{ embed|safe }} {% include 'footer.html' %} diff --git a/bh20simplewebuploader/templates/form.html b/bh20simplewebuploader/templates/form.html index b1bbad2..3a1b03b 100644 --- a/bh20simplewebuploader/templates/form.html +++ b/bh20simplewebuploader/templates/form.html @@ -12,7 +12,7 @@ Upload your SARS-CoV-2 sequence (FASTA or FASTQ formats) with metadata (JSONLD) to the public sequence resource. The upload will trigger a recompute with all available sequences into a Pangenome available for - download! + download!

Your uploaded sequence will automatically be processed diff --git a/bh20simplewebuploader/templates/org-header.html b/bh20simplewebuploader/templates/org-header.html new file mode 100644 index 0000000..915bcb7 --- /dev/null +++ b/bh20simplewebuploader/templates/org-header.html @@ -0,0 +1,293 @@ + + + + + Web uploader for Public SARS-CoV-2 Sequence Resource + + + + + + + + + -- cgit v1.2.3