-
Notifications
You must be signed in to change notification settings - Fork 2
/
details.html
192 lines (180 loc) · 8.04 KB
/
details.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CoLabs - Quality Workshops for All</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="style.css" rel="stylesheet">
<link href="index_style.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/2727ad4eb7.js" crossorigin="anonymous"></script>
</head>
<body>
<!-- Deatils Form -->
<div class="container-sm p-4 bg-light border border-2 border-secondary rounded-xl shadow"
style="margin-top: 100px; margin-bottom: 50px;">
<div class="row text-center m-4">
<div class="col-sm">
<h4>Name</h4>
<input type="text" name="" id="" placeholder="Full Name"
class="namee m-4 p-3 fs-5 bg-light border border-secondary border-2 rounded-pill">
</div>
<div class="col-sm">
<h4>Institution</h4>
<input type="text" name="" id="" placeholder="Present Institution"
class="college m-4 p-3 fs-5 bg-light border border-secondary border-2 rounded-pill">
</div>
<div class="col-sm">
<h4>Education Level</h4>
<input type="text" name="" id="" placeholder="Education Level"
class="edutype m-4 p-3 fs-5 bg-light border border-secondary border-2 rounded-pill">
</div>
</div>
<div class="row text-center m-4 justify-content-center">
<div class="col-sm">
<h4>Email</h4>
<input type="text" name="" id="" placeholder="E-mail"
class="email m-4 p-3 fs-5 bg-light border border-secondary border-2 rounded-pill">
</div>
<div class="col-sm">
<h4>Address</h4>
<textarea name="" id="" placeholder="Address"
class="address m-4 p-3 fs-5 bg-light border border-secondary border-2 rounded-xl"></textarea>
</div>
<div class="col-sm">
<h4>Phone Number</h4>
<input type="text" name="" id="" placeholder="Phone Number"
class="phone m-4 p-3 fs-5 bg-light border border-secondary border-2 rounded-pill">
</div>
</div>
<div class="row m-4">
<div class="col"></div>
<button class="btn btn-themePrimary p-3 col-4 fs-4 shadow rounded-pill"
id="sub">Submit</button>
<div class="col"></div>
</div>
<div class="row m-4" id="final" style="display: none;">
<div class="col-sm text-end p-3">
<h4> Tip Amount</h4>
<h2 id="totalTip" class="text-success">
</h3>
</div>
<div class="col-sm p-3">
<h4> Total Bill</h4>
<h2 id="totalBill" class="text-success">
</h3>
</div>
</div>
</div>
<!-- Deatils Form -->
<!-- start footer -->
<div class="container-fuid my-5" style="margin: 0 !important;">
<!-- Footer -->
<footer class="text-center text-lg-start text-dark" style="background-color: #ECEFF1">
<!-- Section: Social media -->
<section class="d-flex justify-content-between p-4 text-white"
style=" background-color: var(--themePrimary)">
<!-- Left -->
<div class="me-5">
<span>Get connected with us on social networks:</span>
</div>
<!-- Left -->
<!-- Right -->
<div>
<a href="" class="text-white me-4">
<i class="fab fa-facebook-f"></i>
</a>
<a href="" class="text-white me-4">
<i class="fab fa-twitter"></i>
</a>
<a href="" class="text-white me-4">
<i class="fab fa-google"></i>
</a>
<a href="" class="text-white me-4">
<i class="fab fa-instagram"></i>
</a>
<a href="" class="text-white me-4">
<i class="fab fa-linkedin"></i>
</a>
<a href="" class="text-white me-4">
<i class="fab fa-github"></i>
</a>
</div>
<!-- Right -->
</section>
<!-- Section: Social media -->
<!-- Copyright -->
<div class="text-center p-1">
© 2022 Copyright:
WittyCliques
</div>
<!-- Copyright -->
</footer>
<!-- Footer -->
</div>
<!-- end footer -->
</body>
<script type="module">
// Import the functions you need from the SDKs you need
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.7.0/firebase-app.js";
import { getAnalytics } from "https://www.gstatic.com/firebasejs/9.7.0/firebase-analytics.js";
import { getAuth, GoogleAuthProvider, signInWithRedirect, getRedirectResult, signInWithPopup } from "https://www.gstatic.com/firebasejs/9.7.0/firebase-auth.js";
import { getDatabase, ref, set, child, get } from "https://www.gstatic.com/firebasejs/9.7.0/firebase-database.js";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
apiKey: "AIzaSyAYfJLPdsZEJZBG4fe_iiC0zUt1rVmq3VU",
authDomain: "wiitycliques.firebaseapp.com",
databaseURL: "https://wiitycliques-default-rtdb.asia-southeast1.firebasedatabase.app",
projectId: "wiitycliques",
storageBucket: "wiitycliques.appspot.com",
messagingSenderId: "728732831863",
appId: "1:728732831863:web:dc65be187ff45aaf683672",
measurementId: "G-2ZCS2MP69G"
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);
const auth = getAuth(app);
const provider = new GoogleAuthProvider(app);
const db = getDatabase(app)
const dbRef = ref(db)
// data adding
document.getElementById("sub").addEventListener('click', function writeUserData() {
let namee= document.querySelector(".namee").value
let college= document.querySelector(".college").value
let edutype= document.querySelector(".edutype").value
let email= document.querySelector(".email").value
let address= document.querySelector(".address").value
let phone= document.querySelector(".phone").value
localStorage.setItem("name",namee)
localStorage.setItem("college",college)
localStorage.setItem("edutype",edutype)
localStorage.setItem("email",email)
localStorage.setItem("address",address)
localStorage.setItem("phone",phone)
localStorage.setItem("name",namee)
// let name= document.querySelector(".name").value
if(namee == ""||college == ""||edutype == ""||email == ""||address == ""||phone == ""){
alert("pura bhar")
}else{
set(ref(db, 'users/' + localStorage.getItem('uid')), {
name: namee,
college: college,
edutype:edutype,
email: email,
address: address,
phone:phone
// profile_picture: imageUrl
});
location.replace("main.html")
}
})
</script>
</html>