forked from samh21/calculate.this
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bugdet.html
190 lines (162 loc) · 4.96 KB
/
bugdet.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
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
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="author" content="Samuel Torimiro">
<meta name="description" content="A utility calculator to calculate your bugdet details">
<meta name="keywords" content="Budget Calculator">
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z"
crossorigin="anonymous"
/>
<title>Budget Calculator</title>
<style>
body {
background: lightgray;
}
.main {
max-width: 480px !important;
}
.box {
width: 152px;
height: 100px;
margin: 10px;
}
#income {
background: rgb(21, 133, 21);
}
#expenses {
background: crimson;
}
p {
text-align: center;
font-weight: bolder;
}
input[type='number'] {
text-align: right;
width: 140px;
}
/* .data {
float: right;
} */
button, #generate-table, .print-table {
margin: 10px;
}
li {
margin: 6px;
display: flex;
justify-content: space-between;
}
.span-expense-text {
cursor: pointer;
width: 135px;
overflow-wrap: normal;
}
.span-expense-text:hover {
text-decoration: line-through;
}
/* #show-expense {
max-width: 100px !important;
} */
.right-align {
text-align: right !important;
}
.center-align {
text-align: center !important;
}
.total-text {
color: teal !important;
font-weight: bolder;
}
.model {
display: flex;
justify-content: center;
flex-wrap: wrap;
}
.model1 {
display: flex;
justify-content: space-evenly;
flex-wrap: wrap;
}
.li-expense {
display: flex;
flex-wrap: wrap;
}
#total-expense-container{
word-break: break-all;
}
</style>
</head>
<body>
<!-- navbar -->
<main-header></main-header>
<!--
Markup for your caculator app goes here. Please use Bootstrap 5 alpa.
-->
<br>
<div class="container main">
<h2 class="center-align">Bugdet Calculator+</h2>
<p style="color: rosybrown;" id="expense-tracker">"click on expenses to delete"</p>
<h6 class="text-secondary center-align" style="font-weight: bolder;">Amout Left To Spend: $ <span style="color: green;" id="bugdet-left">0</span><span id="result" style="color: black;"></span></h6>
<div class="model">
<div class="box" id="income">
<p style="color: wheat;">Income</p>
<p style="color: lime;">$ <span id="total-income-container" style="color: wheat;">0</span></p>
</div>
<div class="box" id="expenses">
<p style="color: wheat;">Expenses</p>
<p style="color: tomato;">$ <span id="total-expense-container" style="color: wheat;">0</span></p>
</div>
</div>
<br>
<div class="model1">
<div>
<input type="text" placeholder="Expense title" id="data-text" class="form-control">
</div>
<div>
<input type="number" placeholder="Amount" class="data form-control" id="data-number" onkeypress="if(this.value.length==12) return false;">
</div>
</div>
<button class="btn btn-danger container" id="add-expense">Add Expense</button>
<hr>
<div id="show-expense">
<ul class="ul-expense">
<li class="li-expense">
<span style="color: green; font-weight: bolder;">- Income:</span>
<input type="number" id="total-income-text" onkeypress="if(this.value.length==12) return false;" class="form-control">
</li>
</ul>
</div>
<p id="generate-table" class="btn btn-success container">Generate Table</p>
<hr>
<div id="show-table">
</div>
<p class="btn btn-secondary print-table container">Print Table</p>
<hr>
<p class="text-muted">© Bugdet calculator v1</p>
</div>
<!-- link to header.js (navbar). Do not remove -->
<script src="header.js"></script>
<!-- link to your app js file -->
<script src="./bugdet.js"></script>
<!-- bootstrap dependencies -->
<script
src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"
integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV"
crossorigin="anonymous"
></script>
</body>
</html>