aboutsummaryrefslogtreecommitdiff
path: root/bh20simplewebuploader/templates/home.html
diff options
context:
space:
mode:
authorBonfaceKilz2020-11-10 03:42:12 +0300
committerBonfaceKilz2020-11-10 03:42:12 +0300
commit2e2e2280f59b783759b7b70d410fb7a5c59206d5 (patch)
tree5ba26a9e8c9be51b11a9b4dd7c9cca727676ec58 /bh20simplewebuploader/templates/home.html
parent59b4c0ff845686ce2e58e0c2df126f1bae514ab1 (diff)
downloadbh20-seq-resource-2e2e2280f59b783759b7b70d410fb7a5c59206d5.tar.gz
bh20-seq-resource-2e2e2280f59b783759b7b70d410fb7a5c59206d5.tar.lz
bh20-seq-resource-2e2e2280f59b783759b7b70d410fb7a5c59206d5.zip
Add tweet feed
* bh20simplewebuploader/main.py (send_home): Fetch tweets from Redis. * bh20simplewebuploader/static/main.css: Add styles for tweets * bh20simplewebuploader/templates/home.html: Add tweet section in frontpage.
Diffstat (limited to 'bh20simplewebuploader/templates/home.html')
-rw-r--r--bh20simplewebuploader/templates/home.html27
1 files changed, 23 insertions, 4 deletions
diff --git a/bh20simplewebuploader/templates/home.html b/bh20simplewebuploader/templates/home.html
index 77d2fb6..516fb33 100644
--- a/bh20simplewebuploader/templates/home.html
+++ b/bh20simplewebuploader/templates/home.html
@@ -22,9 +22,27 @@
or <a href="/apidoc">REST API</a>. For more
information see the <a href="/about">FAQ!</a>.
</p>
- <section id="map_view" class="map">
- <div id="mapid"></div>
- </section>
+
+ <section class="flex-container">
+ <div id="map_view" class="map">
+ <div id="mapid"></div>
+ </div>
+ <div id="twitter-feed">
+ <ul>
+ {% for tweet in tweets|sort(reverse=true, attribute="timeposted")%}
+ <li>
+ <p class="tweet">
+ {{ tweet.tweet|urlize(40, target="_blank") }} <br/>
+ by {{ tweet.author }}
+ </p>
+ <small class="timeposted">
+ {{ tweet.timeposted }}
+ </small>
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+ </section>
<a href="https://projectredcap.org/"><img class="img-right" src="static/image/REDCap.png" /></a>
<p>
@@ -76,7 +94,8 @@
use, see the <a href="/blog">BLOG</a>.
</p>
</div>
- </section>
+ </section>
+
{% include 'footer.html' %}