aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPjotr Prins2020-12-30 14:05:43 +0000
committerGitHub2020-12-30 14:05:43 +0000
commit3b091d27157dc0aaeff78413ee9e22ea0f10cffb (patch)
tree952953136aca2720ce37e6f9097c3279096f9468
parentdf0421757e464f07b5e96b5444f1926784e7400f (diff)
parent200b8194e8d22c944a80625b6101389b687e5832 (diff)
downloadbh20-seq-resource-3b091d27157dc0aaeff78413ee9e22ea0f10cffb.tar.gz
bh20-seq-resource-3b091d27157dc0aaeff78413ee9e22ea0f10cffb.tar.lz
bh20-seq-resource-3b091d27157dc0aaeff78413ee9e22ea0f10cffb.zip
Merge pull request #120 from BonfaceKilz/feature/add-arxiv-articles
Feature/Add Arxiv feed
-rw-r--r--bh20simplewebuploader/main.py1
-rw-r--r--bh20simplewebuploader/static/main.css2
-rw-r--r--bh20simplewebuploader/templates/home.html22
3 files changed, 23 insertions, 2 deletions
diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py
index de3ba3f..b620946 100644
--- a/bh20simplewebuploader/main.py
+++ b/bh20simplewebuploader/main.py
@@ -277,6 +277,7 @@ def send_home():
tweets=get_feed_items("bh20-tweet-score:"),
commits=get_feed_items("bh20-commit-score:"),
pubmed_articles=get_feed_items("bh20-pubmed-score:"),
+ arxiv_articles=get_feed_items("bh20-arxiv-score:"),
load_map=True)
diff --git a/bh20simplewebuploader/static/main.css b/bh20simplewebuploader/static/main.css
index b6c900c..fbc721e 100644
--- a/bh20simplewebuploader/static/main.css
+++ b/bh20simplewebuploader/static/main.css
@@ -523,6 +523,7 @@ div.status {
#feed ul {
list-style-type: none;
+ width: 30em;
}
#feed ul li {
@@ -567,6 +568,7 @@ input[name="feed-tabs"] ~ .tab {
}
#tab-pubmed-articles:checked ~ .tab.content-pubmed-articles,
+#tab-arxiv-articles:checked ~ .tab.content-arxiv-articles,
#tab-tweets:checked ~ .tab.content-tweets,
#tab-commits:checked ~ .tab.content-commits {
display: block;
diff --git a/bh20simplewebuploader/templates/home.html b/bh20simplewebuploader/templates/home.html
index 7d5d89f..a880f81 100644
--- a/bh20simplewebuploader/templates/home.html
+++ b/bh20simplewebuploader/templates/home.html
@@ -29,12 +29,30 @@
</div>
<div id="feed">
- <input name="feed-tabs" type="radio" id="tab-pubmed-articles" checked/>
- <label for="tab-pubmed-articles">Pubmed Articles</label>
+ <input name="feed-tabs" type="radio" id="tab-arxiv-articles" checked/>
+ <label for="tab-arxiv-articles">Arxiv</label>
+ <input name="feed-tabs" type="radio" id="tab-pubmed-articles"/>
+ <label for="tab-pubmed-articles">Pubmed</label>
<input name="feed-tabs" type="radio" id="tab-tweets"/>
<label for="tab-tweets">Tweets</label>
<input name="feed-tabs" type="radio" id="tab-commits"/>
<label for="tab-commits">Commits</label>
+ <ul class="tab content-arxiv-articles">
+ {% if arxiv_articles %}
+ {% for article in arxiv_articles|sort(reverse=true, attribute="score")%}
+ <li>
+ <p><a href="{{article['url']}}">{{ article['title'] }}</a></p>
+ <p><b>Authors:</b> {{ article['authors'] }}</p>
+ <p><b>Abstract:</b> {{ article['abstract']}}...</p>
+ <p><b>Submitted:</b> {{ article['submission']}}</p>
+ </li>
+ {% endfor %}
+ {% else %}
+
+ There are no articles to display :(
+
+ {% endif %}
+ </ul>
<ul class="tab content-pubmed-articles">
{% if pubmed_articles %}
{% for article in pubmed_articles|sort(reverse=true, attribute="score")%}