-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
95 lines (85 loc) · 4.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
<html>
<head>
<title>MySplit</title>
<link href="https://fonts.googleapis.com/css?family=Nunito:400,600,700" rel="stylesheet">
<link rel="stylesheet" href="style.css" />
</head>
<body>
<!-- The core Firebase JS SDK is always required and cd must be listed first -->
<script src="https://www.gstatic.com/firebasejs/6.3.0/firebase-app.js"></script>
<!-- TODO: Add SDKs for Firebase products that you want to use
https://firebase.google.com/docs/web/setup#config-web-app -->
<!-- Add Firebase products that you want to use -->
<script src="https://www.gstatic.com/firebasejs/6.3.0/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/6.3.0/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/6.3.0/firebase-database.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<script>
// Your web app's Firebase configuration
import {
firebaseConfigObg
} from './firebase-credentials';
var firebaseConfig = firebaseConfigObg;
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
</script>
<script src="js/index.js"></script>
<script src="js/data.js"></script>
<script src="js/expense.js"></script>
<script src="js/show_payments.js"></script>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<ul>
<li><a class="navbar-brand" href="#">MySplit</a></li>
<li>
<p id="user_para"></p>
</li>
<li style="float:right" id="login_button"><a href="index.html">Login</a></li>
<li style="float:right" id="register_button"><a href="register.html">Register</a></li>
<li style="float:right"><button type="button" class="logout" id="logout" onclick="logout()">Logout</button></li>
</ul>
</div>
</div>
</nav>
<div id="login_div" class="main-div">
<h3 style="text-align: center">Login</h3>
<input type="email" placeholder="Email..." id="email" />
<input type="password" placeholder="Password..." id="password" />
<button onclick="login();">Login to Account</button>
</div>
<div id="user_div" class="loggedin-div">
<h3>Welcome User</h3>
<div class="payments" id="payments">
<div class="show_payments" id="show_payments" style="flex-basis:50%; background-color: black">
<center>Transactions</center>
<div>
<button onclick="borrowers()">People who owe you money</button>
<div id="borrowers" onload="borrowers();"></div>
</div>
<div>
<button onclick="lenders()">People you need to pay</button>
<div id="lenders" onload="lenders();"></div>
</div>
</div>
<div class="make_payments" id="make_payments" style="flex-basis:50%; background-color: black">
<div class="expense" id="expense">
<div style="text-align: center">Add expense</div>
<input type="text" placeholder="Amount to be splitted..." id="amt">
<input type="text" placeholder="How many people you want to add?..." id="people">
<button onclick="add_people()" style="background: #9da2b0">Add people</button>
<div id="people_div"></div>
<button type="button" onclick="add_expense();">Add expense</button>
</div>
<div class="payment" id="payment">
<div style="text-align: center">Make payment</div>
<input placeholder="Add email" id="settle_email">
<input type="text" placeholder="Amount to be paid..." id="settle_amt">
<button onclick="clear_expense();">Settle Up</button>
</div>
</div>
</div>
</div>
</body>
</html>