1 import { Account } from "../repository/accounts";
2 import { CityWithLocation } from "../repository/city";
3 import * as _ from 'lodash';
4 import { topbar } from "./topbar";
6 export function renderKingomOverview(city: CityWithLocation, account: Account): string {
8 <div hx-trigger="every 600s" hx-get="/poll/overview">
9 <h2 data-augmented-ui="tl-clip bl-clip none">Kingdom Overview</h2>
13 <td>${account.username}</td>
15 <td>${city.population.toLocaleString()}/${_.max([city.farms * 70, city.population])}</td>
19 <td>${city.totalSpace.toLocaleString()} (${Math.ceil(city.usedSpace/city.totalSpace * 100)}% used)</td>
21 <td>${city.soldiers.toLocaleString()}</td>
25 <td>${city.location_x},${city.location_y}</td>
27 <td>${city.attackers.toLocaleString()}</td>
31 <td>${city.gold.toLocaleString()}</td>
33 <td>${city.defenders.toLocaleString()}</td>
37 <td>${city.ore.toLocaleString()}</td>
38 <th>Special Attackers</th>
39 <td>${city.sp_attackers.toLocaleString()}</td>
43 <td>${city.logs.toLocaleString()}</td>
44 <th>Special Defenders</th>
45 <td>${city.sp_defenders.toLocaleString()}</td>
49 <td>${city.bushels.toLocaleString()}</td>