Formatted webpage with correct faction member calls
This commit is contained in:
Binary file not shown.
@@ -55,6 +55,7 @@ async def fetch_and_save_faction(faction_id: int, file_path: Path) -> bool:
|
|||||||
"id": pid,
|
"id": pid,
|
||||||
"name": info.get("name", "Unknown"),
|
"name": info.get("name", "Unknown"),
|
||||||
"level": info.get("level", 0),
|
"level": info.get("level", 0),
|
||||||
|
"status": info.get("status", {}).get("state", "Unknown"),
|
||||||
"estimate": est
|
"estimate": est
|
||||||
}
|
}
|
||||||
faction_data.append(member)
|
faction_data.append(member)
|
||||||
|
|||||||
@@ -4,43 +4,77 @@ body {
|
|||||||
color: #f0f0f0;
|
color: #f0f0f0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 800px;
|
width: 95%;
|
||||||
|
max-width: 1300px;
|
||||||
margin: 2rem auto;
|
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;
|
background-color: #2c2c3e;
|
||||||
|
padding: 1.5rem;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
box-shadow: 0 0 20px rgba(0,0,0,0.5);
|
box-shadow: 0 0 20px rgba(0,0,0,0.5);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1rem;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 600px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
.faction-card h2 {
|
||||||
text-align: center;
|
|
||||||
color: #ffcc00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.faction-section {
|
|
||||||
background-color: #3a3a4d;
|
|
||||||
margin: 1.5rem 0;
|
|
||||||
padding: 1rem 1.5rem;
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.faction-section h2 {
|
|
||||||
color: #66ccff;
|
color: #66ccff;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="number"] {
|
input[type="number"] {
|
||||||
padding: 0.5rem;
|
padding: 0.7rem;
|
||||||
margin-right: 0.5rem;
|
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
border: none;
|
border: none;
|
||||||
width: 150px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
padding: 0.5rem 1rem;
|
padding: 0.7rem 1rem;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
border: none;
|
border: none;
|
||||||
background-color: #66ccff;
|
background-color: #66ccff;
|
||||||
|
|||||||
@@ -6,23 +6,38 @@
|
|||||||
<link rel="stylesheet" href="/static/styles.css">
|
<link rel="stylesheet" href="/static/styles.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<div class="top-bar">
|
||||||
<h1>War Dashboard</h1>
|
<h1>War Dashboard</h1>
|
||||||
|
|
||||||
<div class="faction-section">
|
<div class="interval-box">
|
||||||
<h2>Enemy Faction</h2>
|
<label for="refreshInterval">Refresh Interval (sec)</label>
|
||||||
<input type="number" id="enemyId" placeholder="Enemy Faction ID">
|
<input type="number" id="refreshInterval" placeholder="e.g., 30">
|
||||||
<input type="number" id="refreshInterval" placeholder="Refresh Interval (sec)">
|
|
||||||
<button onclick="updateEnemy()">Refresh Enemy</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="faction-section">
|
|
||||||
<h2>Friendly Faction</h2>
|
|
||||||
<input type="number" id="friendlyId" placeholder="Friendly Faction ID">
|
|
||||||
<button onclick="updateFriendly()">Refresh Friendly</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/dashboard.js"></script>
|
<div class="faction-row">
|
||||||
|
|
||||||
|
<!-- Enemy -->
|
||||||
|
<div class="faction-card">
|
||||||
|
<h2>Enemy Faction</h2>
|
||||||
|
<input type="number" id="enemyId" placeholder="Enemy Faction ID">
|
||||||
|
<button onclick="updateEnemy()">Start Enemy Refresh</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Friendly -->
|
||||||
|
<div class="faction-card">
|
||||||
|
<h2>Friendly Faction</h2>
|
||||||
|
<input type="number" id="friendlyId" placeholder="Friendly Faction ID">
|
||||||
|
<button onclick="updateFriendly()">Start Friendly Refresh</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="/static/dashboard.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user