Add deep dive function to get more into each single stock.
This commit is contained in:
@@ -71,6 +71,28 @@
|
||||
.sentiment-bullish { color: #28a745; font-weight: 600; }
|
||||
.sentiment-bearish { color: #dc3545; font-weight: 600; }
|
||||
.sentiment-neutral { color: #6c757d; }
|
||||
|
||||
.post-card {
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 8px;
|
||||
padding: 1.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
.post-card h3 {
|
||||
margin-top: 0;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
.post-card h3 a {
|
||||
color: #0056b3;
|
||||
text-decoration: none;
|
||||
}
|
||||
.post-card h3 a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.post-meta {
|
||||
font-size: 0.9rem;
|
||||
color: #666;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
29
templates/deep_dive.html
Normal file
29
templates/deep_dive.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Deep Dive: {{ symbol }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Deep Dive Analysis for: <strong>{{ symbol }}</strong></h1>
|
||||
<p>Showing posts that mention {{ symbol }}, sorted by most recent.</p>
|
||||
|
||||
{% for post in posts %}
|
||||
<div class="post-card">
|
||||
<h3><a href="{{ post.post_url }}" target="_blank">{{ post.title }}</a></h3>
|
||||
<div class="post-meta">
|
||||
<span>r/{{ post.subreddit_name }}</span> |
|
||||
<span>{{ post.comment_count }} comments analyzed</span> |
|
||||
<span>Avg. Sentiment:
|
||||
{% if post.avg_comment_sentiment > 0.1 %}
|
||||
<span class="sentiment-bullish">{{ "%.2f"|format(post.avg_comment_sentiment) }}</span>
|
||||
{% elif post.avg_comment_sentiment < -0.1 %}
|
||||
<span class="sentiment-bearish">{{ "%.2f"|format(post.avg_comment_sentiment) }}</span>
|
||||
{% else %}
|
||||
<span class="sentiment-neutral">{{ "%.2f"|format(post.avg_comment_sentiment) }}</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>No analyzed posts found for this ticker. Run the 'rstat' scraper to gather data.</p>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
@@ -16,7 +16,7 @@
|
||||
<tbody>
|
||||
{% for ticker in tickers %}
|
||||
<tr>
|
||||
<td><strong>{{ ticker.symbol }}</strong></td>
|
||||
<td><strong><a href="/deep-dive/{{ ticker.symbol }}">{{ ticker.symbol }}</a></strong></td>
|
||||
<td>{{ ticker.mention_count }}</td>
|
||||
<td>{{ ticker.market_cap | format_mc }}</td>
|
||||
<td>
|
||||
|
@@ -16,7 +16,7 @@
|
||||
<tbody>
|
||||
{% for ticker in tickers %}
|
||||
<tr>
|
||||
<td><strong>{{ ticker.symbol }}</strong></td>
|
||||
<td><strong><a href="/deep-dive/{{ ticker.symbol }}">{{ ticker.symbol }}</a></strong></td>
|
||||
<td>{{ ticker.mention_count }}</td>
|
||||
<td>{{ ticker.market_cap | format_mc }}</td>
|
||||
<td>
|
||||
|
Reference in New Issue
Block a user