import { CityWithLocation } from "../repository/city";
import { Building } from '../repository/buildings';
import _ from "lodash";
+import { topbar } from "./topbar";
function progressBar(current, max): string {
const percent = Math.ceil((current/max) * 100);
<td>${city[building.slug]}</td>
<td>
<form hx-post="/build">
- <input type="number" size="6" name="amount" hx-post="/cost/construction" hx-trigger="change" hx-target="#${building.slug}-cost">
+ <input type="number" size="6" name="amount" hx-post="/cost/construction" hx-trigger="keyup" hx-target="#${building.slug}-cost">
<input type="hidden" name="building_type" value="${building.slug}">
<button type="submit">Build</button>
</form>
</table>
</div>
`;
-
- return html + queues;
+ return html + queues + topbar(city);
}
\ No newline at end of file