Pesasmart commited on
Commit
3cd48a8
Β·
verified Β·
1 Parent(s): e4c3866

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +37 -4
index.html CHANGED
@@ -1,5 +1,38 @@
1
 
2
- <h1>PesaSmart Works!</h1>
3
- <p>From Eldoret</p>
4
- <input id="e" placeholder="5000">
5
- <button onclick="alert('You typed '+document.getElementById('e').value)">Test Me</button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
2
+ <!DOCTYPE html>
3
+ <html>
4
+ <head>
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>PesaSmart</title>
7
+ </head>
8
+ <body style="background:#0f172a; color:white; font-family:Arial; text-align:center; padding:20px;">
9
+ <h1 style="color:#22c55e;">πŸ’° PesaSmart</h1>
10
+
11
+ <div style="background:white; color:black; padding:20px; border-radius:15px; max-width:380px; margin:auto;">
12
+ <h3>How much per week?</h3>
13
+ <input id="earn" type="number" placeholder="e.g. 5000" style="width:90%; padding:12px; font-size:18px; border:2px solid green; border-radius:10px;">
14
+ <br><br>
15
+ <button onclick="showPlan()" style="background:green; color:white; width:95%; padding:14px; border:none; border-radius:10px; font-size:18px; font-weight:bold;">Get My Plan</button>
16
+
17
+ <div id="answer" style="margin-top:20px; padding:15px; background:#dcfce7; border-radius:10px; display:none; color:#166534; font-weight:bold;"></div>
18
+ </div>
19
+
20
+ <script>
21
+ function showPlan(){
22
+ var input = document.getElementById('earn').value;
23
+ if(input == "" || input == 0){
24
+ alert("Weka pesa kwanza! Type amount");
25
+ return;
26
+ }
27
+ var e = Number(input);
28
+ var needs = e * 0.5;
29
+ var wants = e * 0.3;
30
+ var save = e * 0.2;
31
+
32
+ var box = document.getElementById('answer');
33
+ box.style.display = 'block';
34
+ box.innerHTML = "For KES " + e + ":<br><br>🍚 Needs: " + needs + "<br>πŸ“± Wants: " + wants + "<br>πŸ”’ Save: " + save + "<br><br>βœ… You can do it Areba!";
35
+ }
36
+ </script>
37
+ </body>
38
+ </html>