Added web dashboard.
This commit is contained in:
35
templates/subreddit.html
Normal file
35
templates/subreddit.html
Normal file
@@ -0,0 +1,35 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}r/{{ subreddit_name }} Dashboard{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Top 10 Tickers in r/{{ subreddit_name }}</h1>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Ticker</th>
|
||||
<th>Mentions</th>
|
||||
<th>Market Cap</th>
|
||||
<th>Sentiment</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for ticker in tickers %}
|
||||
<tr>
|
||||
<td><strong>{{ ticker.symbol }}</strong></td>
|
||||
<td>{{ ticker.mention_count }}</td>
|
||||
<td>{{ ticker.market_cap | format_mc }}</td>
|
||||
<td>
|
||||
{% if ticker.bullish_mentions > ticker.bearish_mentions %}
|
||||
<span class="sentiment-bullish">Bullish</span>
|
||||
{% elif ticker.bearish_mentions > ticker.bullish_mentions %}
|
||||
<span class="sentiment-bearish">Bearish</span>
|
||||
{% else %}
|
||||
<span class="sentiment-neutral">Neutral</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user