aboutsummaryrefslogtreecommitdiff
path: root/bh20simplewebuploader/main.py
diff options
context:
space:
mode:
authorPjotr Prins2020-07-18 09:28:03 +0100
committerPjotr Prins2020-07-18 09:28:36 +0100
commitfe8129b37d8b6787920a21f9961316747b62fb30 (patch)
treecad53f7dcbfedd419b9a91254b5d887531fcbf86 /bh20simplewebuploader/main.py
parent6e6afb4b6be3f2f2c1b8b56d85d8c2089f709d26 (diff)
downloadbh20-seq-resource-fe8129b37d8b6787920a21f9961316747b62fb30.tar.gz
bh20-seq-resource-fe8129b37d8b6787920a21f9961316747b62fb30.tar.lz
bh20-seq-resource-fe8129b37d8b6787920a21f9961316747b62fb30.zip
Updating stylesheets and about page after receiving feedback.
Diffstat (limited to 'bh20simplewebuploader/main.py')
-rw-r--r--bh20simplewebuploader/main.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py
index 206f884..2c360e1 100644
--- a/bh20simplewebuploader/main.py
+++ b/bh20simplewebuploader/main.py
@@ -459,7 +459,11 @@ def edit_button(url,text="Edit text!"):
return '<p class="editbutton"><a href="'+url+'">'+text+'<img src="static/image/edit.png"></a></p>'
def get_html_body(fn,source="https://github.com/arvados/bh20-seq-resource/tree/master/doc"):
- buf = edit_button(source)
+ """
+ This function gets the HTML generated from org-mode exports, strips
+ headers and footers and surrounds it with a blog section.
+ """
+ buf = '<section class="blog">'+edit_button(source)
in_body = False
begin_body = re.compile(r"<body>",re.IGNORECASE)
end_body = re.compile(r"(</body>|.*=\"postamble\")",re.IGNORECASE)
@@ -471,7 +475,7 @@ def get_html_body(fn,source="https://github.com/arvados/bh20-seq-resource/tree/m
buf += line
elif begin_body.match(line):
in_body = True
- buf += edit_button(source)
+ buf += edit_button(source)+'</section>'
return buf
@app.route('/download')