aboutsummaryrefslogtreecommitdiff
path: root/bh20simplewebuploader
diff options
context:
space:
mode:
Diffstat (limited to 'bh20simplewebuploader')
-rw-r--r--bh20simplewebuploader/main.py9
-rw-r--r--bh20simplewebuploader/templates/home.html42
2 files changed, 46 insertions, 5 deletions
diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py
index b70f49a..de3ba3f 100644
--- a/bh20simplewebuploader/main.py
+++ b/bh20simplewebuploader/main.py
@@ -272,9 +272,12 @@ def send_home():
"""
Send the front page.
"""
- return render_template('home.html', menu='HOME',
- tweets=get_feed_items("bh20-tweet-score:"),
- load_map=True)
+ return render_template(
+ 'home.html', menu='HOME',
+ tweets=get_feed_items("bh20-tweet-score:"),
+ commits=get_feed_items("bh20-commit-score:"),
+ pubmed_articles=get_feed_items("bh20-pubmed-score:"),
+ load_map=True)
@app.route('/upload')
diff --git a/bh20simplewebuploader/templates/home.html b/bh20simplewebuploader/templates/home.html
index b1e52be..7d5d89f 100644
--- a/bh20simplewebuploader/templates/home.html
+++ b/bh20simplewebuploader/templates/home.html
@@ -36,9 +36,24 @@
<input name="feed-tabs" type="radio" id="tab-commits"/>
<label for="tab-commits">Commits</label>
<ul class="tab content-pubmed-articles">
- Pubmed content
+ {% if pubmed_articles %}
+ {% for article in pubmed_articles|sort(reverse=true, attribute="score")%}
+ <li>
+ <p><a href="https://pubmed.ncbi.nlm.nih.gov/{{article['docsum-pmid']}}"><b>Summary:</b> {{ article['summary'] }}</a></p>
+ <p><b>Full Authors:</b> {{ article['full-authors'] }}</p>
+ <p><b>Short Authors:</b> {{ article['short-authors'] }}</p>
+ <p><b>Citation:</b> {{ article['citation'] }}</p>
+ <p><b>Short Journal Citation:</b> {{ article['short-journal-citation'] }}</p>
+ </li>
+ {% endfor %}
+ {% else %}
+
+ There are no articles to display :(
+
+ {% endif %}
</ul>
<ul class="tab content-tweets">
+ {% if tweets %}
{% for tweet in tweets|sort(reverse=true, attribute="score")%}
<li>
<p class="tweet">
@@ -50,9 +65,32 @@
</small>
</li>
{% endfor %}
+
+ {% else %}
+
+ There are no tweets to display :(
+
+ {% endif %}
</ul>
<ul class="tab content-commits">
- Commits
+ {% if commits %}
+ {% for commit in commits|sort(reverse=true, attribute="score")%}
+ <li>
+ <p class="commit">
+ <a href="{{commit.url}}" target="_blank">
+ {{ commit.hash.split(":")[-1][:7] }}:{{ commit.content}}
+ </a>
+
+ </p>
+ <small class="timeposted">
+ <a href="{{ commit['repository-url']}}" target="_blank">{{ commit.author }}/{{ commit.repository }}</a>
+ on {{ commit.timeposted}}
+ </small>
+ </li>
+ {% endfor %}
+ {% else %}
+ There are no commits to be displayed.
+ {% endif %}
</ul>
</div>
</section>