Big improvements on image view.
This commit is contained in:
@@ -3,85 +3,59 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Reddit Mentions</title>
|
||||
<title>r/{{ subreddit_name }} Ticker Mentions</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 2rem;
|
||||
font-family: 'Inter', sans-serif;
|
||||
background: #1a1a1a;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
}
|
||||
.image-container {
|
||||
width: 650px; /* Increased width to accommodate new column */
|
||||
background: linear-gradient(145deg, #4d302d, #1f2128);
|
||||
color: #ffffff;
|
||||
border-radius: 16px;
|
||||
padding: 2.5rem;
|
||||
box-shadow: 0 10px B30px rgba(0,0,0,0.5);
|
||||
text-align: center;
|
||||
}
|
||||
header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
body { margin: 0; padding: 2rem; font-family: 'Inter', sans-serif; background: #1a1a1a; display: flex; justify-content: center; align-items: center; min-height: 100vh; }
|
||||
.image-container { width: 750px; background: linear-gradient(145deg, #2d3748, #1a202c); color: #ffffff; border-radius: 16px; padding: 2.5rem; box-shadow: 0 10px 30px rgba(0,0,0,0.5); text-align: center; }
|
||||
header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; }
|
||||
.title-block { text-align: left; }
|
||||
.title-block h1 { font-size: 2.5rem; font-weight: 800; margin: 0; line-height: 1; }
|
||||
.title-block h2 { font-size: 1.25rem; font-weight: 600; margin: 0.5rem 0 0; color: #b0b0b0; }
|
||||
.date { font-size: 1.1rem; font-weight: 600; color: #c0c0c0; letter-spacing: 0.02em; }
|
||||
.title-block h2 { font-size: 1.25rem; font-weight: 600; margin: 0.5rem 0 0; color: #a0aec0; }
|
||||
.date { font-size: 1.1rem; font-weight: 600; color: #a0aec0; letter-spacing: 0.02em; }
|
||||
table { width: 100%; border-collapse: collapse; text-align: left; }
|
||||
th, td { padding: 1rem 0.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
|
||||
th { font-weight: 700; text-transform: uppercase; font-size: 0.8rem; color: #a0a0a0; }
|
||||
th { font-weight: 700; text-transform: uppercase; font-size: 0.75rem; color: #718096; letter-spacing: 0.05em; }
|
||||
td { font-size: 1.1rem; font-weight: 600; }
|
||||
tr:last-child td { border-bottom: none; }
|
||||
td.rank { font-weight: 700; color: #d0d0d0; width: 8%; }
|
||||
td.ticker { width: 30%; }
|
||||
td.mentions { text-align: center; width: 18%; }
|
||||
td.sentiment { text-align: center; width: 26%; } /* New width */
|
||||
|
||||
/* Sentiment Colors */
|
||||
.sentiment-bullish { color: #28a745; font-weight: 700; }
|
||||
.sentiment-bearish { color: #dc3545; font-weight: 700; }
|
||||
.sentiment-neutral { color: #9e9e9e; font-weight: 600; }
|
||||
|
||||
/* Row colors */
|
||||
tr:nth-child(1) td.ticker { color: #d8b4fe; } tr:nth-child(6) td.ticker { color: #fca5a5; }
|
||||
tr:nth-child(2) td.ticker { color: #a3e635; } tr:nth-child(7) td.ticker { color: #fdba74; }
|
||||
tr:nth-child(3) td.ticker { color: #67e8f9; } tr:nth-child(8) td.ticker { color: #6ee7b7; }
|
||||
tr:nth-child(4) td.ticker { color: #fde047; } tr:nth-child(9) td.ticker { color: #93c5fd; }
|
||||
tr:nth-child(5) td.ticker { color: #fcd34d; } tr:nth-child(10) td.ticker { color: #d1d5db; }
|
||||
|
||||
td.rank { font-weight: 700; color: #cbd5e0; width: 5%; }
|
||||
td.ticker { width: 15%; }
|
||||
td.financials { text-align: right; width: 20%; }
|
||||
td.mentions { text-align: center; width: 15%; }
|
||||
td.sentiment { text-align: center; width: 20%; }
|
||||
th.mentions, th.sentiment {
|
||||
text-align: center;
|
||||
}
|
||||
th.financials {
|
||||
text-align: right;
|
||||
}
|
||||
.sentiment-bullish { color: #48bb78; font-weight: 700; }
|
||||
.sentiment-bearish { color: #f56565; font-weight: 700; }
|
||||
.sentiment-neutral { color: #a0aec0; font-weight: 600; }
|
||||
footer { margin-top: 2.5rem; }
|
||||
.brand-name { font-size: 1.75rem; font-weight: 800; letter-spacing: -1px; }
|
||||
.brand-subtitle { font-size: 1rem; color: #b0b0b0; }
|
||||
.brand-subtitle { font-size: 1rem; color: #a0aec0; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="image-container">
|
||||
<header>
|
||||
<div class="title-block">
|
||||
<h1>Reddit Mentions</h1>
|
||||
<h2>All Subreddits - Top 10</h2>
|
||||
<h1>Ticker Mentions Daily</h1>
|
||||
<h2>All Subreddits</h2>
|
||||
</div>
|
||||
<div class="date">{{ current_date }}</div>
|
||||
</header>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rank">Rank</th>
|
||||
<th class="ticker">Ticker</th>
|
||||
<th class="mentions">Posts</th>
|
||||
<th class="mentions">Comments</th>
|
||||
<!-- UPDATED: Added Sentiment column header -->
|
||||
<th class="mentions">Mentions</th>
|
||||
<th class="financials">Mkt Cap</th>
|
||||
<th class="financials">Close Price</th>
|
||||
<th class="sentiment">Sentiment</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -90,9 +64,15 @@
|
||||
<tr>
|
||||
<td class="rank">{{ loop.index }}</td>
|
||||
<td class="ticker">{{ ticker.symbol }}</td>
|
||||
<td class="mentions">{{ ticker.post_mentions }}</td>
|
||||
<td class="mentions">{{ ticker.comment_mentions }}</td>
|
||||
<!-- UPDATED: Added Sentiment data cell -->
|
||||
<td class="mentions">{{ ticker.total_mentions }}</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>
|
||||
<td class="sentiment">
|
||||
{% if ticker.bullish_mentions > ticker.bearish_mentions %}
|
||||
<span class="sentiment-bullish">Bullish</span>
|
||||
@@ -106,7 +86,6 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<footer>
|
||||
<div class="brand-name">r/rstat</div>
|
||||
<div class="brand-subtitle">visit us for more</div>
|
||||
|
Reference in New Issue
Block a user