diff options
author | Pjotr Prins | 2020-05-27 07:36:27 -0500 |
---|---|---|
committer | Pjotr Prins | 2020-05-27 07:36:27 -0500 |
commit | e5f0990f97b8316ea618f0831b6858dde92afaed (patch) | |
tree | c4e5292e0e9fc78a3c1c275b3429b5c34bff5fbe /bh20simplewebuploader | |
parent | 20da90784ad30b51549407dd4f390254c415ee6b (diff) | |
download | bh20-seq-resource-e5f0990f97b8316ea618f0831b6858dde92afaed.tar.gz bh20-seq-resource-e5f0990f97b8316ea618f0831b6858dde92afaed.tar.lz bh20-seq-resource-e5f0990f97b8316ea618f0831b6858dde92afaed.zip |
Wiring up blog entries
Diffstat (limited to 'bh20simplewebuploader')
-rw-r--r-- | bh20simplewebuploader/main.py | 9 | ||||
-rw-r--r-- | bh20simplewebuploader/templates/blog.html | 14 |
2 files changed, 18 insertions, 5 deletions
diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py index f7e45fb..4f14d10 100644 --- a/bh20simplewebuploader/main.py +++ b/bh20simplewebuploader/main.py @@ -441,9 +441,14 @@ def download_page(): def demo_page(): return render_template('demo.html',menu='DEMO') -@app.route('/blog') +@app.route('/blog',methods=['GET']) def blog_page(): - return render_template('blog.html',menu='BLOG') + blog_content = request.args.get('id') # e.g. using-covid-19-pubseq-part3 + buf = None; + if blog_content: + buf = get_html_body('doc/blog/'+blog_content+'.html') + return render_template('blog.html',menu='BLOG',embed=buf) + @app.route('/about') def about_page(): diff --git a/bh20simplewebuploader/templates/blog.html b/bh20simplewebuploader/templates/blog.html index 835e019..3069dd3 100644 --- a/bh20simplewebuploader/templates/blog.html +++ b/bh20simplewebuploader/templates/blog.html @@ -5,9 +5,17 @@ {% include 'banner.html' %} {% include 'menu.html' %} - <h1>BLOG Entries</h1> + {% if embed %} + {{ embed|safe }} + <hr> - <i>Note that this is work in progress (WIP)</i> + <p> + Other blog entries: + </p> + + {% else %} + <h2>BLOG Entries:</h2> + {% endif %} <section class="blog-entries"> <div class="blog-table"> @@ -31,7 +39,7 @@ </div> <div class="blog-table-row"> <div class="blog-table-cell"> - <a href="https://github.com/arvados/bh20-seq-resource/blob/master/doc/blog/using-covid-19-pubseq-part3.org">Submitting a sequence</a> + <a href="/blog?id=using-covid-19-pubseq-part3">Submitting a sequence</a> </div> <div class="blog-table-cell"> We submit a sequence to the database |