forked from stoicfeats/airbornesd.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex-firebasefeedback.html
236 lines (167 loc) · 7.09 KB
/
index-firebasefeedback.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
<!-- Its A Simple Feedback Form -->
<!-- It Uses Firebase to Store all its feedback -->
<!-- You can get your Credentials from Firebase Console -->
<!DOCTYPE html>
<html>
<body>
<h1><center>Firebase-Feedback</center></h1>
<h5><center>HacktoberFest 21</center></h5>
<input type="text" placeholder="Name" id = "namebox" placeholder = "Name"> </input>
<input type="text" placeholder="Email" id = "emailbox" placenolder = "Email"></input>
<textarea type="text" placeholder="Feedback / Comment" id = "commentbox" placeholder = "Comment"></textarea>
<button class= "button" type="submit" id="isubmit"> Submit Feedback </button>
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-app.js"></script>
<!-- TODO: Add SDKs for Firebase products that you want to use
https://firebase.google.com/docs/web/setup#available-libraries -->
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-analytics.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.10.0/firebase-database.js"></script>
<script id = "MainScript">
//Enter Your Credentials
// -------------------------
var firebaseConfig = {
apiKey: "",
authDomain: "",
databaseURL: "",
projectId: "",
storageBucket: "",
messagingSenderId: "",
appId: "",
measurementId: ""
};
// ---------------------
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
firebase.analytics();
//Ready Data
var nameV , emailV , commentV ;
function Ready(){
nameV = document.getElementById('namebox').value;
emailV = document.getElementById('emailbox').value;
commentV = document.getElementById('commentbox').value;
}
///Insert
document.getElementById('isubmit').onclick = function(){
Ready();
firebase.database().ref(nameV).set({
name : nameV,
email : emailV,
comment : commentV
});
Clear();
}
function Clear(){
document.getElementById("namebox").value = "";
document.getElementById("emailbox").value = "";
document.getElementById("commentbox").value = "";
}
</script>
<style>
@import url(https://fonts.googleapis.com/css?family=Montserrat:400,700);
body { background:#13151C; }
form { max-width:420px; margin:50px auto; }
h1 {
color:white;
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
font-size: 60px;
}
h5 {
color:white;
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
font-size: 30px;
}
#note {
color : gray ;
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
font-size: 12px;
}
#feedbackrule {
color :gray;
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
font-size: 15px;
}
#lastline {
color :white;
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
font-size: 18px;
}
/* Class by '.' Or Id by '#'*/
#namebox {
color:white;
font-family: Helvetica, Arial, sans-serif;
font-weight:500;
font-size: 18px;
border-radius: 5px;
line-height: 22px;
background-color: transparent;
border:2px solid white;
transition: all 0.3s;
padding: 13px;
margin-bottom: 15px;
width:100%;
box-sizing: border-box;
outline:0;
}
#iname :hover { border:10px solid white; }
#emailbox {
color:white;
font-family: Helvetica, Arial, sans-serif;
font-weight:500;
font-size: 18px;
border-radius: 5px;
line-height: 22px;
background-color: transparent;
border:2px solid white;
transition: all 0.3s;
padding: 13px;
margin-bottom: 15px;
width:100%;
box-sizing: border-box;
outline:0;
}
#commentbox {
vertical-align: text-top;
height: 150px;
line-height: 150%;
resize:vertical;
color:white;
font-family: Helvetica, Arial, sans-serif;
font-weight:500;
font-size: 18px;
border-radius: 5px;
line-height: 22px;
background-color: transparent;
border:2px solid white;
transition: all 0.3s;
padding: 13px;
margin-bottom: 15px;
width:100%;
box-sizing: border-box;
outline:0;
}
#isubmit {
border:2px solid white;
border-radius: 5px;
background-color: #13151C;
padding: 22px 30px;
text-align: center;
display: inline-block;
font-size: 18px;
margin: 4px 2px;
cursor: pointer;
color: white;
}
#isubmit:hover {
background-color: white;
color: black;
}
</style>
</br>
</br>
</br>
</br>
<center>
<p id= "lastline">Created By - SB || HacktoberFest 21 - Contribution<br> </p>
</center>
</body>
</html>