-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
131 lines (120 loc) · 3.97 KB
/
index.html
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
<!DOCTYPE html>
<html lang-"en">
<head>
<meta charset="UTF-8">
<title>Point Buy Calculator</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- <link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css"> -->
<link rel="stylesheet" href="style.css">
<link rel="icon" type="image/png" href="images/favicon.png">
<script src="lib/knockout-3.4.2.js" defer></script>
<script src="config.js" defer></script>
<script src="calculator.js" defer></script>
</head>
<body>
<div class="container">
<div class="row">
<h1><a href="https://github.com/Flashynuff/point_buy_calculator">Point Buy Calculator</a></h1>
</div>
<div id="scores">
<div class="row">
<h3 class="six columns">Points Remaining: <span data-bind="text: pointPool"></span></h3>
</div>
<table class="u-full-width">
<thead>
<tr>
<th >Ability</th>
<th >Score</th>
<th >Point Cost</th>
<th >Modifier</th>
<th ><button class="button-primary" data-bind="click: resetAbilities()">Reset All Scores</button></th>
</tr>
</thead>
<tbody data-bind="foreach: abilityRows">
<tr>
<td data-bind="text: name"></td>
<td>
<div class="score one-half column">
<p class="value" data-bind="text: score"></p>
</div>
<div class="value-buttons one-half column">
<button class="value-button increase" data-bind="click: increase, enable: score() < $root.maxScore()">+</button>
<button class="value-button decrease" data-bind="click: decrease, enable: score() > $root.minScore()">-</button>
</div>
</td>
<td class="value" data-bind="text: totalCost"></td>
<td class="value" data-bind="text: modifier"></td>
<td><button data-bind="click: reset()">Reset Score</button></td>
</tr>
</tbody>
</table>
</div>
<div id="settings">
<div class="row">
<h2 class="u-full-width">Settings</h2>
</div>
<div class="row">
<div id ="preset" class="one-half column">
<h4>
Select Preset:
</h4>
<select name="presets" id="presets" data-bind="options: configs,
optionsText: function(item) { return item.name; },
value: config
">
</select>
</div>
<div class="one-half column">
<button class="reset button-primary" data-bind="click: resetSettings()">Reset Settings</button>
</div>
</div>
<div class="row">
<div class="three columns">
<h5>Base Score</h5>
<input type="number" data-bind="value: baseScore">
</div>
<div class="three columns">
<h5>Point Total</h5>
<input type="number" data-bind="value: pointTotal">
</div>
<div class="three columns">
<h5>Max Score</h5>
<input type="number" data-bind="value: maxScore">
</div>
<div class="three columns">
<h5>Min Score</h5>
<input type="number" data-bind="value: minScore">
</div>
</div>
</div>
<div >
<div>
<div class="row">
<h2>Point Costs</h2>
</div>
<div class="row">
<div class="one-third column">
<button disabled=""class="add-point-cost center" data-bind="click: addPointScore">Add Point Cost</button>
</div>
<div class="one-third column">
<button disabled="" class="add-point-cost center">Remove Point Cost</button>
</div>
<div class="one-third column">
<button class="reset button-primary center" data-bind="click: resetPointCosts()">Reset Point Costs</button>
</div>
</div>
<div id="point-costs" data-bind="foreach: pointCosts">
<div class="point-cost">
<div class="point-cost-div score" data-bind="text: score"></div>
<div class="point-cost-div"><input type="number" data-bind="value: cost"></div>
<div class="u-cf"></div>
</div>
</div>
</div>
</div>
<div class="row">
<button class="button-primary" data-bind="click: resetAll()">Reset All</button>
</div>
</div>
</body>
</html>