diff --git a/templates/dashboard_base.html b/templates/dashboard_base.html index 6d925b2..8a8f162 100644 --- a/templates/dashboard_base.html +++ b/templates/dashboard_base.html @@ -346,6 +346,70 @@ footer a:hover { color: #ffffff; /* Make it brighter on hover */ } + + /* This block only applies to screens 768px wide or smaller */ + @media (max-width: 768px) { + body { padding: 0.5rem; } + .navbar { + flex-direction: column; /* Stack navbar items vertically */ + align-items: stretch; /* Make items take full width */ + padding: 1rem; + } + .view-switcher { + margin-left: 0; + justify-content: center; /* Center the Daily/Weekly toggle */ + } + .dropdown-menu { + width: 100%; /* Make dropdown menu full width */ + } + .image-container { + width: 95%; /* Make content card fluid */ + padding: 1.5rem; + } + header { + flex-direction: column; + gap: 0.5rem; + } + .header-action { + width: 100%; + justify-content: space-between; + } + + /* --- The "Stacking Table" Magic --- */ + table, thead, tbody, th, td, tr { + display: block; /* Make table elements behave like divs */ + } + thead { + display: none; /* Hide the original table headers */ + } + tr { + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 8px; + margin-bottom: 1rem; + } + td { + border: none; + border-bottom: 1px solid rgba(255, 255, 255, 0.05); + position: relative; + padding-left: 50%; /* Create space for the label */ + text-align: right; /* Align values to the right */ + } + td:last-child { + border-bottom: none; + } + /* Add the label back in using a pseudo-element */ + td::before { + content: attr(data-label); /* Use the data-label attribute as content */ + position: absolute; + left: 1rem; + width: 45%; + padding-right: 1rem; + font-weight: 700; + text-align: left; + color: #718096; + } + td.ticker, td.rank { text-align: right; } /* Override default text-align for these */ + } diff --git a/templates/dashboard_view.html b/templates/dashboard_view.html index c604e78..420fe45 100644 --- a/templates/dashboard_view.html +++ b/templates/dashboard_view.html @@ -39,35 +39,34 @@ {% for ticker in tickers %} - {{ loop.index }} - + {{ loop.index }} + {% if is_image_mode %} - {{ ticker.symbol }} + {{ ticker.symbol }} {% else %} - {{ ticker.symbol }} + {{ ticker.symbol }} {% endif %} - {{ ticker.total_mentions }} - + {{ ticker.total_mentions }} + {% if ticker.bullish_mentions > ticker.bearish_mentions %} - Bullish - {% elif ticker.bearish_mentions > ticker.bullish_mentions %} - Bearish + Bullish + {% elif ticker.bearish_mentions > ticker.bearish_mentions %} + Bearish {% else %} - Neutral + Neutral {% endif %} - {{ ticker.market_cap | format_mc }} - + {{ ticker.market_cap | format_mc }} + {% if ticker.closing_price %} - - ${{ "%.2f"|format(ticker.closing_price) }} - + + ${{ "%.2f"|format(ticker.closing_price) }} + {% else %} - N/A + N/A {% endif %}