-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
117 lines (107 loc) · 4.9 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
<!--Changes to make:
* fix rounding error
* make inputs change to 2 decimals
* widen spacing in tables
* make empties fill/calculate as 0s
* help text & error text
* make things look pretty?-->
<!-- Added GitHub issues to track things: https://github.com/amacleod/improved-octo-waddle/issues -->
<!DOCTYPE html>
<html lang="en">
<head>
<title>Emmett's Octo-waddle</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"
integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<div class="container">
<div class="page-header">
<h1 class="text-success">Emmett's Octo-Waddle</h1>
</div>
<div id="defining-vars" class="col-md-7">
<p>Class days per week (based on enrollment): <span id="class-days">----</span></p>
<p>Weeks per session: <input id="weeks-session" type="number" value="10" onchange="update();" /></p>
<p>Sessions to calculate: <input id="sessions" type="number" value="3" onchange="update();" /></p>
</div>
<div id="fees" class="col-md-6">
<h3>Student Enrollment</h3>
<table>
<tr>
<td></td>
<td>Two-day students</td>
<td>Three-day students</td>
</tr>
<tr>
<td>Regular rate </td>
<td><input id="headcount-twoday" type="number" class="col-md-6" value="3" onchange="update();" /></td>
<td><input id="headcount-threeday" type="number" class="col-md-6" value="3" onchange="update();" /></td>
</tr>
<tr>
<td>Discount rate </td>
<td><input id="headcount-discount-twoday" type="number" class="col-md-6" value="0" onchange="update();" /></td>
<td><input id="headcount-discount-threeday" type="number" class="col-md-6" value="3" onchange="update();" /></td>
</tr>
</table>
<h5>Total Students: <span id="total-students">----</span></h5>
<div id="student-count-indicator" class="progress">
<div id="count-bar-twoday" class="progress-bar progress-bar-primary" style="width: 100%">2-day</div>
<div id="count-bar-threeday" class="progress-bar progress-bar-success" style="width: 0%">3-day</div>
<div id="count-bar-discount-twoday" class="progress-bar progress-bar-warning" style="width: 0%">2-d disc</div>
<div id="count-bar-discount-threeday" class="progress-bar progress-bar-danger" style="width: 0%">3-d disc</div>
</div>
<h3>Fees (per session)</h3>
<table>
<tr>
<td></td>
<td></td>
<td>2-day</td>
<td>3-day</td>
</tr>
<tr>
<td></td>
<td>Regular</td>
<td>$<input id="base-rate" type="text" size="4" value="950" onchange="update();" /></td>
<td>$<span id="fee-threeday">----</span></td>
</tr>
<tr>
<td><input id="percent-discount" type="text" size="1" value="20" onchange="update();" />%</td>
<td>Discount</td>
<td>$<span id="fee-discount-twoday">----</span></td>
<td>$<span id="fee-discount-threeday">----</span></td>
</tr>
</table>
<h4 class="text-success">Total Fees: $<span id="total-fees">----</span></h4>
</div>
<div id="rent" class="col-md-6">
<h3>Rent</h3>
<p>daily rent: $<input id="daily-rent" type="text" size="4" value="50" onchange="update();" /></p>
<h4 class="text-danger">Total Rent: $<span id="total-rent">----</span></h4>
</div>
<div id="asst-salary" class="col-md-6">
<h3>Assistant's Salary</h3>
<h5>(Only calculated if total number of students is at least 8.)</h5>
<p>assistant's pay: $<input id="asst-hrly-pay" type="text" size="4" value="13" onchange="update();" />/hour</p>
<p>assistant's hours: <input id="asst-daily-hrs" type="text" size="4" value="6" onchange="update();" />/class day</p>
<h4 class="text-danger">Assistant's Salary: $<span id="asst-income">----</span></h4>
</div>
<div id="materials" class="col-md-6">
<h3>Materials Costs</h3>
<p> base materials cost: $<input id="materials-cost-fixed" type="text" size="4" value="0" onchange="update();" /></p>
<p>materials cost per student: $<input id="materials-cost-per" type="text" size="4" value="0" onchange="update();" /></p>
<h4 class="text-danger">Total Materials Cost: $<span id="materials-cost">----</span></h4>
</div>
<div id="annas-income" class="col-md-6">
<br /><br /><br /><br />
<h3 class="text-info">Anna's Income: $<span id="anna-income">----</span></h3>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.js"
integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="index.js"></script>
</body>
</html>