aboutsummaryrefslogtreecommitdiff
path: root/calculette_aoo/index.html
blob: e4e015a671a00f40e90630d528addcba3791a5b3 (plain)
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
<!DOCTYPE html>
<html>
<head>
<title>AOO PC Builder</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" type="text/css" href="/theme/font-awesome/css/fontawesome.css">
<link rel="stylesheet" type="text/css" href="/theme/font-awesome/css/brands.css">
<link rel="stylesheet" type="text/css" href="/theme/font-awesome/css/solid.css">


<style>
* {
  box-sizing: border-box;
}

/* Style the body */
body {
  font-family: Arial;
  margin: 0;
}

/* Header/logo Title */
.header {
  padding: 50px;
  text-align: center;
  color: white;
  background-color: #333;
}

/* Column container */
.row {  
  display: grid;
  grid-auto-flow: column;
}

.side {
  flex: 30%;
  padding: 20px;
}

/* Main column */
.main {
  flex: 70%;
  background-color: white;
  padding: 20px;
}

input[type='text'] { font-size: 24px; }

fieldset {
  display: table;
}
fieldset div {
  display: table-row;
}

fieldset label {
 display: table-cell;
 padding-right: 20px;
 vertical-align: middle;
}

textarea {
    width: 100%;
    height: 300px;
}

table tr td input { width: 2em; text-align: center}
table tr td input.wellplaced { background-color: lightgreen;}
table tr td input.misplaced { background-color: gold;}

th, td {
  border: 1px solid rgb(160 160 160);
  padding: 8px 10px;
}

th[scope='col'] {
  background-color: #505050;
  color: #fff;
}

th[scope='row'] {
        background-color: #d6ecd4;
}

td { text-align: center; }

  tr:nth-of-type(even) {
        background-color: #eee;
  }

table {
  border-collapse: collapse;
  border: 2px solid rgb(140 140 140);
  letter-spacing: 1px;
}


/* Responsive layout - when the screen is less than 700px wide, make the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 700px) {
  .row, .navbar {   
    flex-direction: column;
  }
}
</style>
</head>
<body>

<!-- Header -->
<div class="header">
  <h1>AOO PC Builder</h1>
</div>

<!-- The flexible grid (content) -->
<div class="main">
  <div>
    <noscript>Sorry, you need to enable JavaScript to see this page.</noscript>
      <script id="lib" type="text/javascript" defer="defer" src="js/aoo.js"></script>
    <script>
      var script = document.getElementById('lib');
      script.addEventListener('load', function() {
        lib.run();
      });
    </script>
  </div>
  <form id="form" >
  <div class="row">
    <fieldset>
      <div>
        <label for="a">A</label>
        <input type="number" id="a" name="a" value="2"/>
      </div>
      <div>
        <label for="m">M</label>
        <input type="number" id="m" name="m" value="5"/>
      </div>
      <div>
        <label for="fm">FM</label>
        <input type="number" id="fm" name="fm" value="9"/>
      </div>
      <div>
        <label for="rm">RM</label>
        <input type="number" id="rm" name="rm" value="7"/>
      </div>
      <div>
        <label for="pm">PM</label>
        <input type="number" id="pm" name="pm" value="40"/>
      </div>
    </fieldset> 
    <fieldset>
      <div>
        <label for="a">Upgrade A</label>
        <input type="number" id="a_bonus" name="a" value="0"/>
      </div>
      <div>
        <label for="m">Upgrade M</label>
        <input type="number" id="m_bonus" name="m" value="0"/>
      </div>
      <div>
        <label for="fm">Upgrade FM</label>
        <input type="number" id="fm_bonus" name="fm" value="0"/>
      </div>
      <div>
        <label for="rm">Upgrade RM</label>
        <input type="number" id="rm_bonus" name="rm" value="0"/>
      </div>
      <div>
        <label for="pm">Upgrade PM</label>
        <input type="number" id="pm_bonus" name="pm" value="0"/>
      </div>
    </fieldset> 
  </div>
  <div class="row">
    <fieldset>
      <div>
        <label for="xp">XP à dépenser</label>
        <input type="number" id="xp" name="xp" value="1000"/>
      </div>
      <div>
        <label for="tours">Tour de combats</label>
        <input type="number" id="tours" name="tours" value="5"/>
      </div>
      <div>
        <label for="cost">Couts du sort</label>
        <input type="number" id="cost" name="cost" value="8"/>
      </div>
      <div>
        <label for="dammage">Dégats du sort</label>
        <input type="number" id="dammage" name="dammage" value="6"/>
      </div>
      <div>
        <label for="fm_oponent">FM de l’adversaire</label>
        <input type="number" id="fm_oponent" name="fm_oponent" value="10"/>
      </div>
    </fieldset> 
  </div>
  <input id="send" type="submit" value="Charger"/>
  </form>
  <h2>Résultats</h2>
  <textarea id="result" >
  </textarea>
  <h2>Tables</h2>
  <div id="tables_div" class="row"/>
</div>
</body>
</html>