This repository was archived by the owner on Feb 12, 2026. It is now read-only.
forked from NiHoel/Anno1800Calculator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
303 lines (250 loc) · 17.4 KB
/
index.html
File metadata and controls
303 lines (250 loc) · 17.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="DuxVitae">
<title>Anno 1800 Calculator</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="./style.css" />
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Popper JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<!-- Latest compiled JavaScript -->
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script type="text/javascript" src="./bootstrap-notify.min.js"></script>
<!--<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.5.0/knockout-min.js"></script>-->
<!-- <script src="js/params.js"></script> -->
<script src="./dist/calculator.bundle.js"></script>
</head>
<body>
<noscript>This site requires JavaScript!</noscript>
<div id="loader" data-bind="visible: false"></div>
<div data-bind="template: 'view-mode-dialog'"></div>
<div id="help-dialog" class="modal fade" role="dialog" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 data-bind="text: $root.texts.help.name">Settings</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
<h5>Calculator Tutorial</h5>
<a class="mb-3" href="https://youtu.be/YxU-8YCzpec" target="_blank">
<img class="img-thumbnail img-responsive" src="./CalculatorScreenshot.png" />
</a>
<h5 class="mt-3">Statistics Extraction Tutorial</h5>
<a class="mb-3" href="https://youtu.be/k4WmgEIkp4s" target="_blank">
<img class="img-thumbnail img-responsive" src="./CalculatorExtractionScreenshot.png" />
</a>
<br />
<div class="mt-3" data-bind="html: $root.texts.helpContent.name"></div>
</div>
</div>
</div>
</div>
<div data-bind="template: 'settings-dialog'"></div>
<div data-bind="template: 'download-dialog'"></div>
<div data-bind="template: 'item-equipment-dialog'"></div>
<div data-bind="template: 'factory-choose-dialog'"></div>
<div data-bind="template: 'island-management-dialog'"></div>
<div data-bind="template: 'island-rename-dialog'"></div>
<div data-bind="template: 'trade-routes-management-dialog'"></div>
<div data-bind="template: 'population-level-config-dialog'"></div>
<div data-bind="template: 'residence-effect-dialog'"></div>
<div data-bind="template: 'factory-config-dialog'"></div>
<div data-bind="template: 'contract-management-dialog'"></div>
<!-- navbar -->
<div id="content" data-bind="visible: true" style="display:none">
<nav class="navbar navbar-expand-sm bg-dark inline-list-stretched">
<div class="btn-group">
<button type="button" class="btn">
<img data-toggle="modal" data-target="#residence-effect-dialog" class="icon-navbar" src="./icons/icon_marketplace_2d_light.png" data-bind="click: () => $root.island().prepareResidenceEffectView()" />
</button>
<button data-toggle="modal" data-target="#factory-choose-dialog" class="btn text-light">
<span class="fa fa-cogs"> </span>
</button>
<button type="button" class="btn">
<img data-toggle="modal" data-target="#item-equipment-dialog" class="icon-navbar" src="./icons/icon_add_goods_socket_white.png" />
</button>
<button type="button" class="btn" data-bind="enable: $root.dlcsMap.get('dlc7').checked(), visible: $root.island().contractManager">
<img data-toggle="modal" data-target="#contract-management-dialog" class="icon-navbar" src="./icons/icon_docklands_2d_white.png" />
</button>
</div>
<div class="input-group input-group-sm" data-bind="visible: $root.islands().length > 1" style="width: unset;">
<select name="islands" class="custom-select" id="islands" data-bind="value: $root.island, options: $root.islands, optionsText: i => i.sessionExtendedName()" style="max-width: 20rem"></select>
<div class="input-group-append">
<button type="button" class="btn">
<img data-toggle="modal" data-target="#island-management-dialog" class="icon-navbar" src="./icons/icon_map.png" />
</button>
<button type="button" class="btn">
<img data-toggle="modal" data-target="#trade-routes-management-dialog" class="icon-navbar" src="./icons/icon_shiptrade.png" />
</button>
</div>
</div>
<div class="float-right" style="padding-right: 17px;">
<div class="btn-group float-right">
<button data-bind="click: () => $root.darkMode.toggle()" class="btn text-light">
<span class="fa fa-adjust"> </span>
</button>
<button data-toggle="modal" data-target="#settings-dialog" class="btn text-light">
<span class="fa fa-cog"> </span>
</button>
<button data-toggle="modal" data-target="#help-dialog" class="btn text-light">
<span class="fa fa-question-circle-o"> </span>
</button>
<button id="download-selection-button" data-toggle="modal" data-target="#download-dialog" class="btn text-light">
<span class="fa fa-download"> </span>
</button>
</div>
</div>
</nav>
<!-- /navbar -->
<div class="animate-bottom">
<!-- population input field -->
<fieldset class="ui-fieldset" id="residents-view">
<legend data-bind="text:$root.texts.residents.name">Residents</legend>
<div class="inline-list-stretched">
<div class="ui-tier-input fleft">
<!-- <div class="ui-tier-icon">
<img src="/img/icons/gui_icon_map_0-17-10.png" alt="Old World" width="46" height="46">
</div> -->
<div data-bind="template: {name: 'population-tile', foreach: $root.template.populationLevels}">
</div>
</div>
<btn class="btn btn-light float-right align-middle" data-bind="click: () => $root.island().reset(), text: $root.texts.reset.name()">Reset</btn>
</div>
</fieldset>
<!-- /population input field -->
<!-- required workforce field -->
<div data-bind="visible: $root.island().workforceSectionVisible()">
<collapsible params="id: 'workforce', heading: $root.texts.workforce.name, collapsed: false, data: $data, fieldsetClass: 'ui-fieldset'">
<div class="inline-list-stretched" data-bind="with: $root.island()">
<div class="ui-tier-input fleft">
<div data-bind="foreach: $data.commuterPier.checked() ? $data.session.workforce : $data.workforce">
<div class="ui-tier-unit" data-bind="visible: $data.visible()">
<div class="ui-tier-unit-icon"><img class="icon-tile" data-bind="attr: { src: $data.icon ? $data.icon : null, alt: $data.name }"></div>
<!--<div class="ui-tier-unit-name" data-bind="text: name"></div>-->
<div class="ui-fchain-item-count">
<span data-bind="text: formatNumber($data.amount())"></span>
</div>
</div>
</div>
</div>
<div class="custom-control custom-checkbox float-right align-middle" data-bind="visible: $data.commuterPier.visible()">
<input id="commuterPier" class="custom-control-input" type="checkbox" data-bind="checked: $data.commuterPier.checked" />
<label class="custom-control-label" data-bind="text: $data.commuterPier.name" for="commuterPier">Commuter Pier</label>
</div>
</div>
</collapsible>
</div>
<!-- /required workforce field -->
<!-- public buildings -->
<div data-bind="visible: $root.island().publicBuildingsSectionVisible()">
<collapsible params="id: 'category-public-buildings', heading: $root.texts.publicBuildings.name, collapsed: false, data: $data, fieldsetClass: 'ui-fieldset'">
<div data-bind="foreach: $root.template.powerPlants.concat($root.template.publicServices)">
<!-- power plants and public services -->
<div class="ui-service-building-item" data-bind="visible: $data.instance().visible(), css: {'no-name': $root.settings.hideNames.checked()}">
<factory-header params="data: $data, button: true"></factory-header>
<!-- buildings input -->
<div class="ui-fchain-item-count">
<div href="#" data-toggle="tooltip" data-bind="attr: {'title' : $root.texts.requiredNumberOfBuildings.name}">
<div class="input-group input-group-sm mb-3 spinner">
<input class="form-control" type="number" value="0" step="1" min="0" data-bind="value: $data.instance().existingBuildings, attr: { id: $data.guid + '-existingBuildings-input'}" />
<div class="input-group-append">
<div data-bind="component: { name: 'number-input-increment', params: { obs: $data.instance().existingBuildings, id: $data.guid + '-existingBuildings-input' }}"></div>
<span class="input-group-text">x</span>
</div>
</div>
</div>
</div>
<div href="#" data-toggle="tooltip" data-bind="attr: {'title' : $root.texts.tonsPerMinute.name}">
<div class="ui-fchain-item-load"><span data-bind="text: formatNumber($data.instance().inputAmount())"></span><span> t/min</span></div>
</div>
</div>
</div>
<!-- /power plants -->
<!-- products without factories: mail and research papers -->
<div data-bind="foreach: $root.island().noFactoryProducts">
<div class="ui-service-building-item" data-bind="visible: $data.visible, css: {'no-name': $root.settings.hideNames.checked()}">
<factory-header params="data: $data, button: false"></factory-header>
<div style="margin-top: 1rem; display: flex; flex-flow: column; height: calc(100% - 3rem - 55px); justify-content: space-between;">
<div class="ui-fchain-item-count">
<span href="#" data-toggle="tooltip" data-bind="attr: {'title' : $root.texts.residents.name}">
<img class="icon-sm icon-light" src="./icons/icon_resource_population.png" />
<span data-bind="text: formatNumber(Math.round($data.residentsInput()))"></span>
</span>
</div>
<div href="#" data-toggle="tooltip" data-bind="attr: {'title' : $root.texts.tonsPerMinute.name}">
<div class="ui-fchain-item-load"><span data-bind="text: formatNumber($data.amount())"></span><span> t/min</span></div>
</div>
</div>
</div>
</div>
<!-- /products without factories: mail and research papers -->
<!-- public recipe buildings -->
<div data-bind="foreach: $root.island().recipeLists">
<div class="ui-service-building-item" data-bind="visible: $data.visible(), css: {'no-name': $root.settings.hideNames.checked()}">
<factory-header params="data: $data, button: false"></factory-header>
<div class="form-group">
<select class="custom-select-sm form-control" data-bind="value: $data.selectedRecipe, options: $data.unusedRecipes, optionsText: r => r.recipeName()"></select>
</div>
<div class="bottom-button">
<button data-bind="click: () => $data.create(), enable: $data.canCreate" class="btn btn-secondary btn-sm btn-light" style="width: 100%;">
<span class="fa fa-plus"></span>
</button>
</div>
</div>
</div>
<!-- /public recipe buildings -->
<!-- recipes -->
<div data-bind="foreach: $root.template.publicRecipeBuildings">
<div class="ui-service-building-item" data-bind="visible: $data.instance().visible() && $data.instance().existingBuildings() > 0, css: {'no-name': $root.settings.hideNames.checked()}">
<div class="ui-fchain-item-tr-button">
<div>
<button class="btn btn-light btn-sm" data-bind="click: () => {$root.selectedFactory($data.instance())}" data-toggle="modal" data-target="#factory-config-dialog">
<span class="fa fa-sliders"></span>
</button>
</div>
</div>
<div class="ui-fchain-item-name" data-bind="text: $data.recipeName(), visible: !$root.settings.hideNames.checked()"></div>
<div class="ui-fchain-item-icon mb-2"><img class="icon-tile" src="" data-bind="attr: { src: $data.icon, alt: $data.name }"></div>
<!-- buildings counter -->
<div class="ui-fchain-item-count">
<div href="#" data-toggle="tooltip" data-bind="attr: {'title' : $root.texts.requiredNumberOfBuildings.name}">
<div class="input-group input-group-sm mb-3 spinner">
<input class="form-control" type="number" value="0" step="1" min="0" data-bind="value: $data.instance().existingBuildings, attr: { id: $data.guid + '-existingBuildings-input'}" />
<div class="input-group-append">
<div data-bind="component: { name: 'number-input-increment', params: { obs: $data.instance().existingBuildings, id: $data.guid + '-existingBuildings-input' }}"></div>
<span class="input-group-text">x</span>
</div>
</div>
</div>
</div>
<div href="#" data-toggle="tooltip" data-bind="attr: {'title' : $root.texts.tonsPerMinute.name}">
<div class="ui-fchain-item-load"><span data-bind="text: formatNumber($data.instance().inputAmount())"></span><span> t/min</span></div>
</div>
</div>
</div>
<!-- /recipes -->
</collapsible>
</div>
<!-- /public buildings -->
<!-- required factories by category -->
<div data-bind="foreach: { data: $root.template.categories, as: 'category'}">
<collapsible params="id: 'category-' + guid, heading: name, collapsed: false, data: $data, fieldsetClass: 'ui-fieldset'">
<div data-bind="foreach: $data.products">
<div data-bind="foreach: $data.factories">
<div data-bind="template: 'factory-tile'"></div>
</div>
</div>
</collapsible>
</div>
<!-- /required factories by category -->
</div>
</div>
</body>
</html>