forked from arunkenesocialmedia/social
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusers.html
892 lines (727 loc) · 30.2 KB
/
users.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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
<html>
<script src="https://www.gstatic.com/firebasejs/5.7.3/firebase.js"></script>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<style>
.loader {
border: 16px solid gray;
border-top: 16px solid blue;
border-radius: 50%;
width: 200px;
height: 200px;
animation: spin 2s ease-out infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
#myInput {
background-image: url('searchicon.png'); /* Add a search icon to input */
background-position: 10px 12px; /* Position the search icon */
background-repeat: no-repeat; /* Do not repeat the icon image */
background-size: 20px 20px;
width: 100%; /* Full-width */
font-size: 16px; /* Increase font-size */
padding: 12px 20px 12px 40px; /* Add some padding */
border: 2px solid blue; /* Add a grey border */
margin-bottom: 12px; /* Add some space below the input */
margin-top: 0px;
}
#myTable {
/*border-collapse: collapse;*/ /* Collapse borders */
width: 100%; /* Full-width */
border: 2px solid blue; /* Add a grey border */
font-size: 18px; /* Increase font-size */
}
#myTable th, #myTable td {
text-align: left; /* Left-align text */
padding: 12px; /* Add padding */
}
#myTable tr {
/* Add a bottom border to all table rows */
border-bottom: 1px solid #ddd;
}
#myusers{
width: 100%;
}
.friendplus {
filter: brightness(0.5);
}
.friendplus:hover {
filter: brightness(1);
}
.avatar{
vertical-align: middle;
width: 70px;
height: 70px;
border-radius: 50%;
filter: brightness(1);
}
.avatar:hover{
filter: brightness(1);
}
body{
-webkit-animation: bgcolor 30s infinite;
animation: bgcolor 30s infinite;
}
@-webkit-keyframes bgcolor {
0% {background: #ffffff;}
20% {background: #e5e5ff;}
40% {background: #ccccff;}
60% {background: #b2b2ff;}
80% {background: #ccccff;}
100% {background: #ffffff;}
}
@keyframes bgcolor {
0% {background: #ffffff;}
20% {background: #e5e5ff;}
40% {background: #ccccff;}
60% {background: #b2b2ff;}
80% {background: #ccccff;}
100% {background: #ffffff;}
}
#myphoto {
cursor: pointer;
}
/* The Modal (background) */
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}
/* Modal Content/Box */
.modal-content {
background-color: #fefefe;
margin: 5% auto; /* 15% from the top and centered */
padding: 10px;
border: 1px solid #888;
width: 80%; /* Could be more or less, depending on screen size */
}
/* The Close Button */
.closes {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.closes:hover,
.closes:focus {
color: black;
text-decoration: none;
cursor: pointer;
}
#close{
padding: 8px 16px;
background-color: white;
color: black;
border: 3px solid black;
width: 200px;
align-self: center;
font-size: 15;
}
#close:hover{
background-color: blue;
border: 3px solid blue;
color: white;
cursor: pointer;
font-size: 15;
}
#twit{
width: 100%;
height: 400px;
border: 3px solid black;
}
tr:hover {background-color: blue; color: white; cursor: pointer; box-shadow: 0 8px 8px 0 rgba(0,0,0,0.8);}
th, td {
border: 1px solid blue;
text-align: center;
}
td{
padding: 5px;
}
th{
padding: 10px;
font-size: 20;
}
table {
width: 100%;
}
.tweet:hover{
background-color: lightgray;
cursor: pointer;
}
.topnav {
overflow: hidden;
background-color: black;
border-bottom: 1px solid white;
}
.topnav a {
float: left;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav a:hover {
background-color: white;
color: black;
}
.topnav a.active {
background-color: #0000ff;
color: white;
}
.btnat {
background-color: blue;
font-family: Times New Roman;
border: 3px solid white;
color: black;
padding: 16px 32px;
text-align: center;
font-size: 25px;
transition: 0.2s;
}
.btn {
background-color: black;
font-family: Times New Roman;
border: 3px solid white;
color: white;
padding: 16px 32px;
text-align: center;
font-size: 25px;
transition: 0.2s;
}
.btn:hover {
background-color: white;
color: black;
cursor: pointer;
}
#signout:hover {
cursor: pointer;
}
#signin:hover {
cursor: pointer;
}
.signbtn{
padding: 8px 16px;
background-color: white;
color: black;
border: 3px solid black;
}
.signbtn:hover{
padding: 8px 16px;
background-color: limegreen;
color: white;
border: 3px solid limegreen;
cursor: pointer;
}
.submit {
padding: 8px 16px;
background-color: white;
color: black;
border: 3px solid black;
}
.submit:hover {
padding: 8px 16px;
background-color: blue;
color: white;
border: 3px solid blue;
cursor: pointer;
}
#inputFileToLoad{
margin-left: 10px;
}
.topnav {
font-family: "Fredoka One";
overflow; hidden;
background-color:blue;
color: white;
font-size: 30px;
padding: 13px;
}
.topnav a {
color: white;
float: right;
text-align: center;
text-decoration: none;
font-size: 18px;
font-family: "Fredoka One";
padding: 9px;
max-height: 20px;
z-index: 5;
}
.topnav a:hover {
background-color:white;
color: blue;
}
.topnav a.active {
background-color: white;
color: blue;
}
/* Dropdown Button */
.dropbtn {
background-color: blue;
color: white;
padding: 16px;
font-size: 16px;
border: none;
cursor: pointer;
}
/* Dropdown button on hover & focus */
.dropbtn:hover, .dropbtn:focus {
background-color: blue;
}
/* The container <div> - needed to position the dropdown content */
.dropdown {
float: right;
overflow: hidden;
display: inline-block;
}
/* Dropdown Content (Hidden by Default) */
.dropdown-content {
display: none;
position: absolute;
top: 55px;
background-color: white;
min-width: 80px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.4);
z-index: 1;
}
/* Links inside the dropdown */
.dropdown-content a {
color: blue;
padding: 12px 16px;
text-decoration: none;
display: block;
float: none;
}
/* Change color of dropdown links on hover */
.dropdown-content a:hover {
background-color: blue;
color: white;
}
.dropdown:hover .dropdown-content {
display: block;
}
.modaltext{
font-size: 30;
}
</style>
<script>
//var friendToAdd = "";
// Initialize Firebase
var config = {
apiKey: "AIzaSyDPVd7G8313nLPFN8vBribM8Sfma3Pac1o",
authDomain: "test-addbb.firebaseapp.com",
databaseURL: "https://test-addbb.firebaseio.com",
projectId: "test-addbb",
storageBucket: "test-addbb.appspot.com",
messagingSenderId: "267017042003"
};
firebase.initializeApp(config);
// Check to see if you are logged in
firebase.auth().onAuthStateChanged(function(user) {
if (user == null) {
alert("Not logged in.");
signinbutton = document.getElementById("signin");
signinbutton.style.visibility="visible";
signoutbutton = document.getElementById("signout");
signoutbutton.style.visibility="hidden";
return;
} else {
userId = user.uid;
name = user.displayName;
imageUrl = user.photoURL;
email = user.email;
signinbutton = document.getElementById("signin");
signinbutton.style.visibility="hidden";
signoutbutton = document.getElementById("signout");
signoutbutton.style.visibility="visible";
// write user data to users
writeUserData(userId, name, email, imageUrl);
// write data to document
//mydiv = document.getElementById("mydata");
//mydiv.innerHTML = name;
//myphotodiv = document.getElementById("invis");
//myphotodiv.style.visibility="visible";
// write user data to users
myphotodiv = document.getElementById("myphoto");
myphotodiv.innerHTML = "<img id='profilepic' onmouseover='showPic()' src='" + imageUrl + "'style='max-width:40px; max-height:40px; border-radius: 10px; display:inline-block; padding-bottom: 0px; z-index:-1;'/>";
photodiv = document.getElementById("modalphoto");
var modalcontent = "<center><p class='modaltext'>" + name + "</p><img id='profilepic' src='" + imageUrl + "'style='max-height:300px; border-radius: 10px'></center>";
photodiv.innerHTML = modalcontent;
firebase.database().ref('/users').once('value').then(function(snapshot) {
var data = (snapshot.val());
if (data == null) {
console.log("No data found at /users/" + userId);
} else {
var userdata = (snapshot.val());
if (userdata != null) {
dataarray = [data,userdata]
console.log(dataarray)
//updatetweets(dataarray);
showUsers(dataarray, userId);
updateModal(dataarray, userId);
}
//console.log(data)
//updatetweets(data);
}
});
} // end user null check
}); // end check auth state
function encodeImageFileAsURL() {
var filesSelected = document.getElementById("inputFileToLoad").files;
if (filesSelected.length > 0) {
var fileToLoad = filesSelected[0];
var fileReader = new FileReader();
fileReader.onload = function(fileLoadedEvent) {
var srcData = fileLoadedEvent.target.result; // <--- data: base64
//var newImage = document.createElement('img');
//newImage.src = srcData;
//document.getElementById("imgTest").innerHTML = newImage.outerHTML;
//document.getElementById("imgTest").innerHTML = srcData;
//console.log("Converted Base64 version is: " + document.getElementById("imgTest").innerHTML);
//console.log(srcData);
}
fileReader.readAsDataURL(fileToLoad);
}
} // end function
// write user data
function writeUserData(userId, name, email, imageUrl) {
firebase.database().ref('users/' + userId).update({
username: name,
email: email,
profile_picture : imageUrl,
userId: userId
});
}
async function showUsers(data, uID) {
//var mylist = "<ul>";
var mytab = "<table id='myTable'><tr class='header'><th>Profile Pic</th><th>Username</th><th>Email</th><th>Add</th><tr>";
users = data[1]; // put on top, because changed data - not good coding change later
data = data[0];
var c = 0;
for (var u in users) {
c = c+1;
mytab = mytab + "<tr>";
mytab = mytab + "<td><center><img class='avatar' src='" + users[u].profile_picture + "' width='60px'></center></td>";
var display;
if (users[u].newName!=null){
display = users[u].newName;
}
else{
display = users[u].username;
}
mytab = mytab + "<td>" + display + "</td>";
mytab = mytab + "<td>" + users[u].email + "</td>";
var isFriend = false;
if (users[u].userId == uID){
isFriend = true;
}
else{
isFriend = await checkUser(users[u].userId, uID);
}
//alert(isFriend);
//friendToAdd = display;
if (!isFriend){
mytab = mytab + "<td><center><img id='add" + c + "' onclick='addFriend(" + c + ")' class='friendplus' src='plus.png' width='60px'></center></td>";
/*mytab = mytab + "<td><center><img onclick='alert()' class='friendplus' src='plus.png' width='60px'></center></td>";*/
}
else{
mytab = mytab + "<td><center><img src='check.png' width='60px'></center></td>";
}
mytab = mytab + "</tr>";
}
//mylist = mylist + "</ul>";
mytab = mytab + "</table>"
var mytdiv = document.getElementById("myusers");
//mytdiv.innerHTML = mylist;
mytdiv.innerHTML = mytab;
}
function checkUser(usersId, uID){
var isFriend = false;
return new Promise(function(resolve, reject) {
firebase.database().ref('/users/' + uID + '/friends').once('value').then(function(snapshot) {
var userdata = (snapshot.val());
dataarray = [userdata];
console.log(dataarray);
users2 = dataarray[0];
for (var x in users2) {
//alert(users2[x].userId + " = " + usersId);
if (users2[x].userId == usersId || usersId == uID) {
isFriend = true;
}
}
resolve(isFriend);
});
});
}
function addFriend(userCount){
//firebase.database().ref('users/' + userId + "/friends").push({uName: userName});
alert(userCount);
var added = document.getElementById("add" + userCount);
added.src = "check.png";
added.onclick = "";
added.style.filter = "brightness(1)";
firebase.database().ref('/users').once('value').then(function(snapshot) {
var data = (snapshot.val());
if (data == null) {
console.log("No data found at /users/" + userId);
} else {
var userdata = (snapshot.val());
if (userdata != null) {
dataarray = [data,userdata]
console.log(dataarray)
users1 = dataarray[1];
var count = 0;
for (var u in users1){
count = count+1;
if (count == userCount){
//alert("yes");
//alert(count);
var display1;
if (users1[u].newName!=null){
display1 = users1[u].newName;
}
else{
display1 = users1[u].username;
}
//alert(display1);
//alert(users1[u].userId);
firebase.database().ref('users/' + userId + "/friends/").push({uName: display1, userId: users1[u].userId});
}
}
}
}
});
}
// write tweets to firebase
/*function tweet() {
var twitdoc = document.getElementById("twit");
var twitimg = document.getElementById("imgTest");
var nameValue = twitdoc.value;
var imgValue = twitimg.innerHTML;
var js_time = Date.now();
var tweetid = firebase.database().ref('tweets/' + userId + "/").push({tweet: nameValue, time: js_time, img: imgValue});
twitdoc.value = "";
console.log("tweet written")
firebase.database().ref('/tweets').once('value').then(function(snapshot) {
var data = (snapshot.val());
if (data == null) {
console.log("No data found at /tweets/" + userId);
} else {
firebase.database().ref('/users').once('value').then(function(snapshot) {
var userdata = (snapshot.val());
if (userdata != null) {
dataarray = [data,userdata]
console.log(dataarray)
updatetweets(dataarray);
}
});
}
});
// The unique key stored in tweetid is based on a timestamp, so list items will automatically be ordered chronologically. Because Firebase generates a unique key for each tweet, no write conflicts will occur if multiple users add a post at the same time. https://firebase.google.com/docs/database/admin/save-data
}*/
function signin() {
console.log("Signing in");
var provider = new firebase.auth.GoogleAuthProvider();
firebase.auth().signInWithRedirect(provider).then(function(result) {
window.location.replace("fbtest.html");
});
}
function signout() {
console.log("Signing out");
firebase.auth().signOut().then(function() {
});
}
function openProfile(){
closebtn = document.getElementById("closebtn");
closebtn.innerHTML = "<button onclick='closeProfile()'>---</button>";
tweets = document.getElementById("mytweets");
tweets.style.display = "block";
}
function closeProfile(){
closebtn = document.getElementById("closebtn");
closebtn.innerHTML = "<button onclick='openProfile()'>+++</button>";
tweets = document.getElementById("mytweets");
tweets.style.display = "none";
}
function showPic(){
pic = document.getElementById("profilepic");
}
function makeCyan(str){
var k = document.getElementById(str);
str.style.color = "cyan";
}
function makeWhite(str){
var k = document.getElementById(str);
str.style.color = "white";
}
function updateModal(data, usersId){
users = data[1];
data = data[0];
photodiv = document.getElementById("modalphoto");
var modalcontent = "<center><p class='modaltext'>" + name + "</p><img id='profilepic' src='" + imageUrl + "'style='max-height:300px; border-radius: 10px'><p class='modaltext'></p></center>";
var yourUsername = "";
var yourPic = "";
var yourAge = "";
var yourBio = "";
var yourEmail = "";
var yourName = "";
var yourFav = "";
var yourRecent = "";
var updated = false;
for (var u in data) {
if (users[u].userId = usersId && !updated){
updated = true;
if (users[u].newName != null) {
yourUsername = users[u].newName;
}
else {
yourUsername = users[u].username;
}
if (users[u].newPic != null) {
yourPic = users[u].newPic;
}
else {
yourPic = users[u].profile_picture;
}
if (users[u].email != null) {
yourEmail = users[u].email;
}
if (users[u].bio != null) {
yourBio = users[u].bio;
}
else{
yourBio = "N/A"
}
if (users[u].age != null) {
yourAge = users[u].age;
}
else{
yourAge = "N/A"
}
if (users[u].book != null) {
yourFav = users[u].book;
}
else{
yourFav = "N/A"
}
if (users[u].recent != null) {
yourRecent = users[u].recent;
}
else{
yourRecent = "N/A"
}
modalcontent = modalcontent + "<center><p class='modaltext'>Username: " + yourUsername + "<br>Bio: " + yourBio + "<br>Age: " + yourAge + "<br>Favourite Book: " + yourFav + "<br>Most Recent Read: " + yourRecent + "</p></center>";
photodiv.innerHTML = modalcontent;
}
}
}
function searchFunction() {
// Declare variables
var input, filter, table, tr, td, i, txtValue;
input = document.getElementById("myInput");
filter = input.value.toUpperCase();
table = document.getElementById("myTable");
tr = table.getElementsByTagName("tr");
// Loop through all table rows, and hide those who don't match the search query
for (i = 1; i < tr.length; i++) {
var shown = false;
td = tr[i].getElementsByTagName("td")[1];
tf = tr[i].getElementsByTagName("td")[2];
if (td) {
txtValue = td.textContent || td.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
shown = true;
} else {
tr[i].style.display = "none";
}
}
if (tf) {
txtValue = tf.textContent || tf.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
shown = true;
} else {
tr[i].style.display = "none";
}
}
if (!shown){
tr[i].style.display = "none";
}
else{
tr[i].style.display = "";
}
}
}
function openModal(){
var modal = document.getElementById('myModal');
modal.style.display = "block";
}
function closeModal(){
var modal = document.getElementById('myModal');
modal.style.display = "none";
photodiv = document.getElementById("modalphoto");
}
</script>
<body>
<!--<a href="index.html"><button class="btnat" style="margin-left: 6%; width: 28%">Home</button></a>
<a href="explore.html"><button class="btn" style="width: 28%">Explore</button></a>
<a href=""><button class="btn" style="margin-right: 6%; width: 28%">Profile</button></a>-->
<div class="topnav">
<i class="fas fa-gem" style="border-right: solid 1px white; padding-right: 8px"></i> Crystal
<span id="invis">
<span id="myphoto" height="60px;" style="float:right" onclick="openModal()"></span>
<span class="dropdown" style="padding-right: 10px">
<a style="height:100px: padding-right:10px" class="dropbtn">
<!--<span id="myphoto" height="60px" ></span>-->
<!--<i style="bottom: 10px;" height="30px" class="fas fa-plus-circle"></i>-->
<i style="bottom: 10px;" height="30px" class="fas fa-chevron-circle-down"></i>
</a>
<span id="myDropdown" class="dropdown-content">
<a href="profile.html">Profile</a>
<!--<a href="settings.html">Settings</a>-->
<a href="about.html">About</a>
<a id="signout" onclick="signout()">Sign Out</a>
</span>
<!--<a href="message.html"><i class="fas fa-plus-circle"></i></a>-->
</span>
</span>
<span style="float: right">
<!--<i class="fas fa-comment-dots" style="float: right; height: 10px; cursor: pointer; padding: 10px; bottom: 10px; padding-right: 15px; font-size: 20;" onmouseover="makeCyan(i3)" onmouseout="makeWhite(i3)" id="i3" onclick="closeTwit()"> Chat</i>-->
<a href="users.html" style="color: cyan; background-color: blue;" id="i2"><i class="fas fa-users" style="float: right; height: 5px; cursor: pointer; padding-right: 10px; font-size: 20;"> Users</i></a>
<a href="books.html" style="color: white; background-color: blue;"><i class="fas fa-book" style="float: right; height: 5px; cursor: pointer; padding-right: 10px; font-size: 20;" onmouseover="makeCyan(i1)" onmouseout="makeWhite(i1)" id="i1"> Books</i></a>
<a href="home.html" style="color: white; background-color: blue;"><i class="fas fa-home" style="float: right; height: 5px; cursor: pointer; padding-right: 10px; font-size: 20;" onmouseover="makeCyan(i4)" onmouseout="makeWhite(i4)" id="i4"> Home</i></a>
<a id="signin" onclick="signin()">Sign in</a>
</span>
</div>
<input type="text" id="myInput" onkeyup="searchFunction()" placeholder="Search for names..">
<!--<i class="fas fa-arrow-circle-up" style="float: right; font-size: 35; margin-top: 5px;"></i>-->
<br>
<center><h1 style="font-family: 'Helvetica'; color: blue;">Crystal Users</h1></center>
<br>
<div id="myusers">
<center>
<div class='loader'></div>
<br>
<h3>Loading Users...</h3>
</center>
</div>
<div id="myModal" class="modal">
<!-- Modal content -->
<div class="modal-content">
<span class="closes" onclick="closeModal()">×</span>
<div id="modalphoto"></div>
</div>
</div>
</body>
</html>