-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact-us.html
192 lines (165 loc) · 5.33 KB
/
contact-us.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 http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Us</title>
<link rel="stylesheet" href="css/bootstrap.css">
<script src="js/bootstrap.js"></script>
<style>
body{
background-color: #dedddd;
}
.navbar{
background-color: #dedddd;
}
.nav-link{
font-size: 1.5vw;
}
.nav-link.active{
margin-right: 2.5vw;
margin-left: 2.5vw;
text-align: center;
color: black;
}
.nav-link.active:hover{
color: rgb(94, 90, 90);
border-bottom: 2px solid black;
}
.navbar-brand{
padding-right: 5vw;
}
#inputs{
width: 30%;
margin-right: 1%;
}
.mainclass{
margin-left: 30vw;
background-color: #dedddd;
padding-left: 6.5vw;
margin-top: 10vh;
width: 40vw;
height: 80vh;
}
body{
background-color: #dedddd;
}
.inputs{
width: 80%;
height: 6vh;
margin-bottom: 2vh;
margin-top: 1vh;
border: 1px solid #1b1b1b;
border-radius: 0.5vw;
}
#button{
margin-top: 2vh;
margin-left: 8vw;
height: 6.5vh;
width: 10vw;
border-radius: 1vh;
font-size: 2.6vh;
background-color: #ffffff;
border: 1px solid;
}
img{
width: 8vw;
margin-left: 3vw;
}
.social{
margin-left: 25vw;
margin-top: 5vh;
}
h3{
text-align: center;
font-size: 3vw;
margin-left: 30vw;
margin-right: 25.5vw;
border-bottom: 1px solid;
}
h2{
border-bottom: 1px solid;
margin-right: 20%;
margin-bottom: 5vh;
}
#contactus{
border-bottom: 2px solid black;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg">
<div class="container-fluid">
<a class="navbar-brand" href="#"><img src="img/logo.png" alt="" srcset=""></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="home.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="about-us.html">About us</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="contact-us.html" id="contactus">Contact Us</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="logout.html">Logout</a>
</li>
</ul>
</div>
</div>
</nav>
<h3>Contact us on social media</h3>
<div class="social">
<img src="img/facebook.png" alt="">
<img src="img/instagram.png" alt="">
<img src="img/telegram.png" alt="">
<img src="img/reddit.png" alt="">
<img src="img/twitter.png" alt="">
</div>
<div class="mainclass">
<h2>Or Write your Message here</h2>
<input type="text" name="password" id="password" class="inputs" placeholder="Your feedback" autocomplete="off" required>
<button type="submit" id="button" class="buttons" onclick="Button()">Submit</button>
</div>
</body>
<script src="https://www.gstatic.com/firebasejs/8.3.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.3.1/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.3.1/firebase-firestore.js"></script>
<script>
var firebaseConfig = {
apiKey: "AIzaSyB1SEaWtKNyYHwepc91rRIys7qrAn3VCQ0",
authDomain: "form-efe8c.firebaseapp.com",
databaseURL: "https://form-efe8c-default-rtdb.firebaseio.com",
projectId: "form-efe8c",
storageBucket: "form-efe8c.appspot.com",
messagingSenderId: "1007553602245",
appId: "1:1007553602245:web:6bea88e0de9877ce7ac6ac"
};
firebase.initializeApp(firebaseConfig);
var db = firebase.firestore();
function Button()
{
var email = localStorage.getItem('name');
var message = document.getElementById("password").value;
var start = Date.now();
var n = start.toString();
console.log(n);
db.collection("feedbacks").doc(n).set({
Email:email,
Message:message
})
.then(() => {
console.log("Document successfully written!");
alert("Thanks for your valuable feedback");
})
.catch((error) => {
console.error("Error writing document: ", error);
});
}
</script>
</html>