-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·474 lines (411 loc) · 19.2 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
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Income & Expenses tracker</title>
<link rel="stylesheet" href="assets/css/style.css">
<link rel="stylesheet" href="assets/css/fontawesome.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/glightbox/dist/css/glightbox.min.css" />
<script src="https://cdn.jsdelivr.net/gh/mcstudios/glightbox/dist/js/glightbox.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet"/>
<script src="https://unpkg.com/read-excel-file@4.x/bundle/read-excel-file.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.3/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script type="text/javascript" src="https://unpkg.com/xlsx@0.15.1/dist/xlsx.full.min.js"></script>
</head>
<body>
<!-- //////////////////////////////////////r/////////////////////////////////////////////r
START SECTIOr 1 - THß NAVBAR SECTION
/////////////////////////////////////////////////////////////////////////////////////////////-->
<nav class="navbar navbar-expand-lg navbar-dark menu shadow fixed-top">
<div class="container">
<a class="navbar-brand" href="#">
<img src="images/logo.png" alt="logo images"><br>
<h4 style="font-family:monospace">Expenses & Income Tracker</h4>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link active" aria-current="page" href="index.html">Home</a></li>
<li class="nav-item"><a class="nav-link" href="#contact" style="color: aliceblue;">Expense & Income Tracker</a>
</li>
</ul>
<button type="button" class="rounded-pill btn-rounded">
0789427778
<span>
<i class="fas fa-phone-alt"></i>
</span>
</button>
</div>
</div>
</nav>
<!-- /////////////////////////////////////////////////////////////////////////////////////////////////
START SECTION 2 - THE INTRO SECTION
/////////////////////////////////////////////////////////////////////////////////////////////////////-->
<section id="home" class="intro-section">
<div class="container">
<div class="row align-items-center text-white">
<!-- START THE CONTENT FOR THE INTRO -->
<div class="col-md-6 intros text-start">
<h1 class="display-2">
<span class="display-2--intro">Hey!, I'm Mchithwa Siziphiwe </span>
<span class="display-2--description lh-base">
Please test my Income & Expenses tracker for me,
I hope you'll enjoy scrolling, toggling and
viewing my system as it has good fill and good UI.
</span>
</h1>
<button type="button" class="rounded-pill btn-rounded">Open Tracker
<span><i class="fas fa-arrow-right"></i></span>
<a class="nav-link" href="#contact"></a>
</button>
</div>
<!-- START THE CONTENT FOR THE VIDEO -->
<div class="col-md-6 intros text-end">
<div class="video-box">
<img src="images/arts/intro-section-illustration.png" alt="video illutration" class="img-fluid">
<a href="#" class="glightbox position-absolute top-50 start-50 translate-middle">
<span>
<i class="fas fa-play-circle"></i>
</span>
<span class="border-animation border-animation--border-1"></span>
<span class="border-animation border-animation--border-2"></span>
</a>
</div>
</div>
</div>
</div>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="#ffffff" fill-opacity="1" d="M0,160L48,176C96,192,192,224,288,208C384,192,480,128,576,133.3C672,139,768,213,864,202.7C960,192,1056,96,1152,74.7C1248,53,1344,107,1392,133.3L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>
</section>
<!-- /////////////////////////////////////////////////////////////////////////////////////////////////////////
START SECTION - GET STARTED WITH TRACKING SYSTEM
/////////////////////////////////////////////////////////////////////////////////////////////////////////-->
<section id="contact" class="get-started">
<div class="container">
<div class="row text-center">
<h1 class="display-3 fw-bold text-capitalize">Get started</h1>
<div class="heading-line"></div>
<p class="lh-lg">
Please Input your information to the fields below to make analysis.
</p>
</div>
<!-- START THE CTA CONTENT -->
<div class="row text-white">
<div class="col-12 col-lg-6 gradient shadow p-3">
<div class="cta-info w-100">
<h4 class="display-4 fw-bold">100% Satisfaction Guaranteed</h4>
<p class="lh-lg">
Your analytical charts will appear here! <\n>
find your results in graphical representation
</p>
</div>
</div>
<div class="col-12 col-lg-6 bg-white shadow p-3">
<div class="form w-100 pb-2">
<h4 class="display-3--title mb-5">Customer Info</h4>
<form action="#" class="row">
<div class="col-lg-6 col-md mb-3">
<h4><label style="color:rgb(195, 21, 195) ;">First Name</label></h4>
<input type="text" placeholder="First Name" id="inputFirstName" class="shadow form-control form-control-lg">
</div>
<div class="col-lg-6 col-md mb-3">
<h4><label style="color:rgb(195, 21, 195) ;">Surname</label></h4>
<input type="text" placeholder="Last Name" id="inputLastName" class="shadow form-control form-control-lg">
</div>
<div class="col-lg-12 mb-3">
<h4><label style="color:rgb(195, 21, 195) ;">Date Of Birth</label></h4>
<input type="date" id="dob" placeholder="date of birth" class="shadow form-control form-control-lg" required="true">
</div>
<div class="col-lg-12 mb-3">
<h4><label style="color:rgb(195, 21, 195) ;">Upload File (.xlsx ONLY)</label></h4>
<input type="file" name="filerea" placeholder="spreadsheet here" id="excel_file" rows="8" class="shadow form-control form-control-lg" accept=".xlsx" onclick="readFile()">
</div>
<div class="text-center d-grid mt-1">
<button type="button" class="btn btn-primary rounded-pill pt-3 pb-3" onclick="chartt()">
View Analytics
<i class="fas fa-paper-plane"></i>
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
<section id="home" class="intro-section">
<div class="container">
<div class="row align-items-center text-white">
<!-- UPLOADED SPREADSHEET WILL APPEAR HERE IN A FORM OF TABLE -->
<div class="container">
<div class="card">
<div class="card-header" style="color:rgb(107, 18, 201)"><b>RESULTS INFORMATION WILL APPEAR HERE</b></div>
<div class="card-body">
<fieldset style="border-color:rgba(124, 3, 124, 0.612); border-radius: 5px; border-style:solid; border-width:1px">
<h5 style="color:rgba(124, 3, 124,0.612) ;padding-left: 5px;">Customer Information</h5>
<h6 style="color:rgba(124, 3, 124,0.612) ; padding-left: 5px;">First name : </h6>
<label id="lblName" style="color:rgba(124, 3, 124,0.612) ; padding-left: 5px;">N\A</label>
<h6 style="color:rgba(124, 3, 124,0.612) ; padding-left: 5px;">Last name :</h6>
<label id="lbllastname" style="color:rgba(124, 3, 124,0.612) ; padding-left: 5px;">N\A</label>
<h6 style="color:rgba(124, 3, 124,0.612) ; padding-left: 5px;">Date Of Birth : </h6> <label id="lblDob" style="color:rgba(124, 3, 124,0.612) ; padding-left: 5px;">N\A</label>
</fieldset>
<div id="excel_data" class="mt-5"></div>
<canvas id="myChart" width="250" height="200"></canvas>>
</div>
</div>
</div>
</div>
</div>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="#ffffff" fill-opacity="1" d="M0,160L48,176C96,192,192,224,288,208C384,192,480,128,576,133.3C672,139,768,213,864,202.7C960,192,1056,96,1152,74.7C1248,53,1344,107,1392,133.3L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>
</section>
<!-- //////////////////////////////////////////////////////////////////////////////////////////
LAST SECTION - THE FOOTER
///////////////////////////////////////////////////////////////////////////////////////////////-->
<footer class="footer">
<div class="container">
<div class="row">
<!-- CONTENT FOR THE MOBILE NUMBER -->
<div class="col-md-4 col-lg-4 contact-box pt-1 d-md-block d-lg-flex d-flex">
<div class="contact-box__icon">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-phone-call" viewBox="0 0 24 24" stroke-width="1" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<path d="M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5l1.5 -2.5l5 2v4a2 2 0 0 1 -2 2a16 16 0 0 1 -15 -15a2 2 0 0 1 2 -2" />
<path d="M15 7a2 2 0 0 1 2 2" />
<path d="M15 3a6 6 0 0 1 6 6" />
</svg>
</div>
<div class="contact-box__info">
<a href="#" class="contact-box__info--title">0789427778</a>
<p class="contact-box__info--subtitle"> Mon-Sunday 9am-20:00pm</p>
</div>
</div>
<!-- CONTENT FOR EMAIL ADDRESS -->
<div class="col-md-4 col-lg-4 contact-box pt-1 d-md-block d-lg-flex d-flex">
<div class="contact-box__icon">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-mail-opened" viewBox="0 0 24 24" stroke-width="1" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<polyline points="3 9 12 15 21 9 12 3 3 9" />
<path d="M21 9v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10" />
<line x1="3" y1="19" x2="9" y2="13" />
<line x1="15" y1="13" x2="21" y2="19" />
</svg>
</div>
<div class="contact-box__info">
<a href="mailto:sizipiwemcitwa@gmail.com" class="contact-box__info--title">sizipiwemcitwa@gmail.com</a>
<p class="contact-box__info--subtitle">Email Me</p>
</div>
</div>
<!-- CONTENT FOR MY LOCATION -->
<div class="col-md-4 col-lg-4 contact-box pt-1 d-md-block d-lg-flex d-flex">
<div class="contact-box__icon">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-map-2" viewBox="0 0 24 24" stroke-width="1" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<line x1="18" y1="6" x2="18" y2="6.01" />
<path d="M18 13l-3.5 -5a4 4 0 1 1 7 0l-3.5 5" />
<polyline points="10.5 4.75 9 4 3 7 3 20 9 17 15 20 21 17 21 15" />
<line x1="9" y1="4" x2="9" y2="17" />
<line x1="15" y1="15" x2="15" y2="20" />
</svg>
</div>
<div class="contact-box__info">
<a href="#" class="contact-box__info--title">Eastern Cape, ZA </a>
<p class="contact-box__info--subtitle">Slovo Park, Zone 14 ,Mtata 5099</p>
</div>
</div>
</div>
</div>
<!-- START THE SOCIAL MEDIA CONTENT -->
<div class="footer-sm" style="background-color: #212121;">
<div class="container">
<div class="row py-4 text-center text-white">
<div class="col-lg-5 col-md-6 mb-4 mb-md-0">
connect with Me on social media
</div>
<div class="col-lg-7 col-md-6">
<a href="https://m.facebook.com/weelezar.mchithwa/"><i class="fab fa-facebook"></i></a>
<a href="#"><i class="fab fa-twitter" onclick="onTweeter()"></i></a>
<a href="https://github.com/SiziphiweMchithwa"><i class="fab fa-github"></i></a>
<a href="https://za.linkedin.com/in/siziphiwe-mchithwa-18b1a51b2?original_referer=https%3A%2F%2Fwww.google.com%2F"><i class="fab fa-linkedin"></i></a>
<a href=""><i class="fab fa-instagram" onclick="onInsta()"></i></a>
</div>
</div>
</div>
</div>
<!-- START THE CONTENT FOR THE DEVELOPER INFO -->
<div class="container mt-5">
<div class="row text-white justify-content-center mt-3 pb-3">
<div class="col-12 col-sm-6 col-lg-6 mx-auto">
<h5 class="text-capitalize fw-bold">About Me</h5>
<hr class="bg-white d-inline-block mb-4" style="width: 60px; height: 2px;">
<p class="lh-lg">
I am Mchithwa Siziphiwe, Software Developer, Web designer and programmer.
</p>
</div>
</div>
</div>
<!-- START THE COPYRIGHT INFO -->
<div class="footer-bottom pt-5 pb-5">
<div class="container">
<div class="row text-center text-white">
<div class="col-12">
<div class="footer-bottom__copyright">
© Copyright 2023 EPF Tech Hub | Created by <a href="#" target="_blank">Mchithwa Siziphiwe</a><br><br>
Distributed by <a href="#" target="_blank">Mchithwa Siziphiwe</a>
</div>
</div>
</div>
</div>
</div>
</footer>
<!-- BACK TO TOP BUTTON -->
<a href="#" class="shadow btn-primary rounded-circle back-to-top">
<i class="fas fa-chevron-up"></i>
</a>
<script src="assets/vendors/js/glightbox.min.js"></script>
<script type="text/javascript">
const lightbox = GLightbox({
'touchNavigation': true,
'href': '#',
'type': 'video',
'source': 'youtube', //vimeo, youtube or local
'width': 900,
'autoPlayVideos': 'true',
});
</script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script type="text/javascript">
function readFile(){
var reader = new FileReader();
var file = document.getElementById('excel_file').files[0];
}
function InputsValidation(){
try{
var fname, lname;
fname=document.getElementById('inputFirstName').value;
lname=document.getElementById('inputLastName').value;
dobd = document.getElementById('dob').value;
fil = document.getElementById('excel_file').value;
var dd1 = Date.now().toString();
if (fname ==""){
alert("First name of the customer is required");
}else if (lname==""){
alert("Last name of the customer is required");
}else if(dobd <= dd1){
alert("Child of that age cannot have expenses, please enter the correct date of birth")
}else if (fil == ""){
alert("Please upload your spreadsheet to make analysis");
}
else{
}
}catch(rr){
alert("Something went wrong please check your inputs are correct \n " + rr.message);
}
}
function readFile(){
const excel_file = document.getElementById('excel_file');
excel_file.addEventListener('change', (event) => {
if(!['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-excel'].includes(event.target.files[0].type))
{
document.getElementById('excel_data').innerHTML = '<div class="alert alert-danger">Only .xlsx or .xls file format are allowed</div>';
excel_file.value = '';
return false;
}
var reader = new FileReader();
reader.readAsArrayBuffer(event.target.files[0]);
reader.onload = function(event){
var data = new Uint8Array(reader.result);
var work_book = XLSX.read(data, {type:'array'});
var sheet_name = work_book.SheetNames;
var sheet_data = XLSX.utils.sheet_to_json(work_book.Sheets[sheet_name[0]], {header:1});
if(sheet_data.length > 0)
{
var table_output = '<table class="table table-striped table-bordered">';
for(var row = 0; row < sheet_data.length; row++)
{
table_output += '<tr>';
for(var cell = 0; cell < sheet_data[row].length; cell++)
{
if(row == 0)
{
table_output += '<th>'+sheet_data[row][cell]+'</th>';
}
else
{
table_output += '<td>'+sheet_data[row][cell]+'</td>';
}
}
table_output += '</tr>';
}
table_output += '</table>';
document.getElementById('excel_data').innerHTML = table_output;
}
excel_file.value = '';
}
});
}
function onTweeter(){
alert("Siziphiwe is not available on Tweeter");
}
function onInsta(){
alert("Siziphiwe is not available on Instagram");
}
function chartt(){
const ctx = document.getElementById('myChart');
new Chart(ctx, {
type: 'bar',
data: {
labels: ["jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],
datasets: [{
label:'Income',
data: [19770,29926,21500,29023,24486,29245,28474,25398,333953,30650,20149,30613],
borderWidth: 1,
label:'Expenses and Income',
data:[3438,25382,26737,18685,22691,13706,10402,12039,3411,26110,9971,2082],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(255, 159, 64, 0.2)',
'rgba(255, 205, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(201, 203, 207, 0.2)'
],
borderWidth:1
}]
},
options: {
scales: {
y: {
beginAtZero: true
}
}
}
});
new Chart(ctx, {
type: 'bar',
data: {
labels: ["jaassn","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],
datasets: [{
label:'Expenses',
data:[3438,25382,26737,18685,22691,13706,10402,12039,3411,26110,9971,2082],
borderWidth:1,
}]
},
options: {
scales: {
y: {
beginAtZero: true
}
}
}
});
}
</script>
<script src="https://cdn.jsdelivr.net/npm/chart.js">
</script>
</body>
</html>