-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
114 lines (107 loc) · 3.32 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!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>Code Along</title>
<link rel="stylesheet" href="style.css" />
<script
src="https://kit.fontawesome.com/39545e5ba2.js"
crossorigin="anonymous"
></script>
<link
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/icon?family=Material+Icons"
/>
</head>
<body>
<header>
<nav class="nav">
<label class="logo">
<span ><img class="logoimg"style="padding-top:1rem;" src="./asset/Logo (2).png" alt="" /></span>
<a href="./index.html"> <b><span style="margin-top:-5px;padding-top: -4px ;"></span>CodeAlong</b></a></label
>
<ul>
<li><a href="share.html">Share</a></li>
<li><a href="singup.html">Sign Up</a></li>
<li><a href="login.html">Log In</a></li>
</ul>
</nav>
</header>
<main>
<textarea id="text"></textarea>
<div class="sidebar-container">
<div class="sidebar">
<div class="sidebar-options">
<i title="Add File" class="material-icons" style="font-size: 40px"
>note_add</i
>
<i title="Vide Call" class="material-icons" style="font-size: 40px"
>videocam</i
>
<i title="Download" class="material-icons" style="font-size: 40px"
>file_download</i
>
<img
title="GitHub"
src="./asset/GithubFinal.png"
width="30px"
alt=""
/>
<i title="Account" class="material-icons" style="font-size: 40px"
>person</i
>
<i
title="Scroll Top"
class="material-icons scroll-top "
style="font-size: 40px"
>arrow_circle_up</i
>
</div>
</div>
</div>
</main>
<footer class="footer">
<div class="footer-icons">
<div class="left-icons"></div>
<i title="Settings" class="material-icons bottom" style="font-size: 30px"
>settings</i>
</div>
<div class="right-icons">
<i title="Error" class="material-icons" style="font-size: 25px"
>report_problem</i
>
<span>0</span>
</div>
</div>
</div>
</footer>
<script src="./function.js"></script>
<script>
var sock = new WebSocket("ws://15.207.7.109:8082");
var log = document.getElementById("text");
sock.onmessage = function (event) {
if (event.data instanceof Blob) {
reader = new FileReader();
reader.onload = () => {
log.value = reader.result;
};
reader.readAsText(event.data);
} else {
log.value = event.data;
}
};
document.querySelector("#text").onkeyup = function () {
var text = document.getElementById("text").value;
sock.send(text);
log.value = text;
};
</script>
<script src="./function.js"></script>
</body>
</html>