/
createBudget.html
79 lines (65 loc) 路 5.24 KB
/
createBudget.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
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link rel="stylesheet" href="./assets/css/animate.css">
<link rel="stylesheet" href="./assets/css/app.css">
<link rel="stylesheet" href="All%20Site%20Styles.css">
<script type="text/javascript" src="transactionList.js"></script>
<title>myPiggybank</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark">
<button class="navbar-toggler pull-left" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand p" href="./"><img src="./assets/logo_white.png" style="width:1.5em;height:auto" /> MyPiggybank</a>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="./login.html">Logout</a>
</li>
</ul>
</div>
</nav><br />
<body>
<div class="container">
<div data-brackets-id="3935" class="whiteBackground">
<div style="text-align: center;">
<h1>Your Budget</h1>
<img src="chart.png" style="width: 80%; max-width: 500px; height: auto;"/>
<form>
<div style="display: inline-block"><input class="inputBox" type="number" id="income" value="500"></div>
<div style="display: inline-block"><span style="display: block" class='btn btn-outline-dark' onclick='updateBudget()'>Update Monthly Income</span></div>
</form>
<p> </p>
</div>
<div class="inwrapper"><table width="100%"><tbody><tr><td width='50%'><h2 style="display: float;"><i class="fas fa-square" style="color:#1C4587;"></i> Bills</h2></td><td width='20%'><h3 class="textRight">60%</h3></td><td width='30%'><h3 class="textRight">Budget: 拢<span id='1'>300</span></h3></td></tr></tbody></table></div>
<div class="inwrapper"><table width="100%"><tbody><tr><td width='50%'><h2 style="display: float;"><i class="fas fa-square" style="color:#1155CC;"></i> Transportation</h2></td><td width='20%'><h3 class="textRight">8%</h3><td width='30%'><h3 class="textRight">Budget: 拢<span id='2'>40</span></h3></td></tr></tbody></table></div>
<div class="inwrapper"><table width="100%"><tbody><tr><td width='50%'><h2 style="display: float;"><i class="fas fa-square" style="color:#3C78D8;"></i> Entertainment</h2></td><td width='20%'><h3 class="textRight">18%</h3><td width='30%'><h3 class="textRight">Budget: 拢<span id='3'>90</span></h3></td></tr></tbody></table></div>
<div class="inwrapper"><table width="100%"><tbody><tr><td width='50%'><h2 style="display: float;"><i class="fas fa-square" style="color:#6D9EEB;"></i> Food</h2></td><td width='20%'><h3 class="textRight">4%</h3></td><td width='30%'><h3 class="textRight">Budget: 拢<span id='4'>20</span></h3></td></tr></tbody></table></div>
<div class="inwrapper"><table width="100%"><tbody><tr><td width='50%'><h2 style="display: float;"><i class="fas fa-square" style="color:#A4C2F4;"></i> Miscellaneous</h2></td><td width='20%'><h3 class="textRight">10%</h3><td width='30%'><h3 class="textRight">Budget: 拢<span id='5'>50</span></h3></td></tr></tbody></table></div>
</div>
</div>
<script>
function updateBudget() {
var income = document.getElementById('income').value;
document.getElementById('1').innerHTML = .60 * income;
document.getElementById('2').innerHTML = .08 * income;
document.getElementById('3').innerHTML = .18 * income;
document.getElementById('4').innerHTML = .04 * income;
document.getElementById('5').innerHTML = .10 * income;
}
</script>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="quote%20randomizer.js"></script>
</body>