diff --git a/services/__pycache__/torn_api.cpython-311.pyc b/services/__pycache__/torn_api.cpython-311.pyc index 29c497b..37a6746 100644 Binary files a/services/__pycache__/torn_api.cpython-311.pyc and b/services/__pycache__/torn_api.cpython-311.pyc differ diff --git a/services/torn_api.py b/services/torn_api.py index e38fd8c..5e85db1 100644 --- a/services/torn_api.py +++ b/services/torn_api.py @@ -55,6 +55,7 @@ async def fetch_and_save_faction(faction_id: int, file_path: Path) -> bool: "id": pid, "name": info.get("name", "Unknown"), "level": info.get("level", 0), + "status": info.get("status", {}).get("state", "Unknown"), "estimate": est } faction_data.append(member) diff --git a/static/styles.css b/static/styles.css index edf5e25..abd8908 100644 --- a/static/styles.css +++ b/static/styles.css @@ -4,43 +4,77 @@ body { color: #f0f0f0; margin: 0; padding: 0; + min-height: 100vh; } .container { - max-width: 800px; + width: 95%; + max-width: 1300px; margin: 2rem auto; - padding: 2rem; +} + +/* Top Bar with Title + Interval Box */ +.top-bar { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 2rem; +} + +.interval-box { + background-color: #3a3a4d; + padding: 0.75rem 1rem; + border-radius: 10px; + display: flex; + flex-direction: column; + gap: 0.4rem; +} + +.interval-box label { + font-size: 0.9rem; + color: #ffcc66; +} + +.interval-box input { + padding: 0.5rem; + border-radius: 6px; + border: none; +} + +/* Horizontal Faction Row */ +.faction-row { + display: flex; + flex-direction: row !important; + justify-content: space-between; + gap: 2rem; +} + +/* Each Faction Card */ +.faction-card { + flex: 1; background-color: #2c2c3e; + padding: 1.5rem; border-radius: 12px; box-shadow: 0 0 20px rgba(0,0,0,0.5); + display: flex; + flex-direction: column; + gap: 1rem; + width: 100%; + max-width: 600px; } -h1 { - text-align: center; - color: #ffcc00; -} - -.faction-section { - background-color: #3a3a4d; - margin: 1.5rem 0; - padding: 1rem 1.5rem; - border-radius: 8px; -} - -.faction-section h2 { +.faction-card h2 { color: #66ccff; } input[type="number"] { - padding: 0.5rem; - margin-right: 0.5rem; + padding: 0.7rem; border-radius: 6px; border: none; - width: 150px; } button { - padding: 0.5rem 1rem; + padding: 0.7rem 1rem; border-radius: 6px; border: none; background-color: #66ccff; diff --git a/templates/dashboard.html b/templates/dashboard.html index b254326..78f0f70 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -6,23 +6,38 @@
-