Files
reddit_stock_analyzer/templates/dashboard_view.html

82 lines
3.2 KiB
HTML

{% extends "dashboard_base.html" %}
{% block title %}{{ title }}{% endblock %}
{% block content %}
<div class="image-container">
<header>
<div class="title-block">
<h1>Reddit Ticker Mentions</h1>
<h2>{{ subtitle }}</h2>
</div>
<div class="header-action">
<div class="date">{{ date_string }}</div>
<!-- Only show the icon if we are NOT already in image mode -->
{% if not is_image_mode %}
<a href="{{ base_url }}?view={{ view_type }}&image=true" class="icon-link" title="View as Shareable Image">
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path>
<circle cx="12" cy="13" r="4"></circle>
</svg>
</a>
{% endif %}
</div>
</header>
<table>
<thead>
<tr>
<th class="rank">Rank</th>
<th class="ticker">Ticker</th>
<th class="mentions">Mentions</th>
<th class="sentiment">Sentiment</th>
<th class="financials">Mkt Cap</th>
<th class="financials">Close Price</th>
</tr>
</thead>
<tbody>
{% for ticker in tickers %}
<tr>
<td class="rank">{{ loop.index }}</td>
<td class="ticker">
<strong>
{% if is_image_mode %}
{{ ticker.symbol }}
{% else %}
<a href="/deep-dive/{{ ticker.symbol }}">{{ ticker.symbol }}</a>
{% endif %}
</strong>
</td>
<td class="mentions">{{ ticker.total_mentions }}</td>
<td class="sentiment">
{% 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>
<td class="financials">{{ ticker.market_cap | format_mc }}</td>
<td class="financials">
{% if ticker.closing_price %}
${{ "%.2f"|format(ticker.closing_price) }}
{% else %}
N/A
{% endif %}
</td>
</tr>
{% else %}
<tr>
<td colspan="6" style="text-align: center; padding: 2rem;">No ticker data found for this period.</td>
</tr>
{% endfor %}
</tbody>
</table>
<footer>
<div class="brand-name">RSTAT</div>
<div class="brand-subtitle">Reddit Stock Analysis Tool</div>
</footer>
</div>
{% endblock %}