-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
69 lines (65 loc) · 3.08 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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>chitchat</title>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.3.2/socket.io.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>
</head>
<body>
<div id="nicknameForm" class="container">
<div class="header">
<h1>chitchat</h1>
</div>
<div class="card">
<h2>:-|</h2>
<div class="input-field">
<input type="text" id="nicknameInput" placeholder="请输入昵称" required>
</div>
<div class="input-field">
<input type="password" id="phraseKeyInput" placeholder="请输入密钥" required>
</div>
<button id="enterChat" class="btn">进入聊天室</button>
</div>
<div class="footer">
<a href="https://github.com/famasyang/chitchat" target="_blank">GitHub</a>
</div>
</div>
<div class="chat-container">
<div id="userList" class="user-list"></div>
<div class="container">
<div id="countdown" class="countdown"></div>
<ul id="messages"></ul>
<form id="form" action="">
<input id="input" autocomplete="off" placeholder="输入消息..." />
<button type="submit" class="icon-btn">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="22" y1="2" x2="11" y2="13"></line>
<polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>
</svg>
</button>
<button type="button" id="addImageBtn" class="icon-btn">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
<circle cx="8.5" cy="8.5" r="1.5"></circle>
<polyline points="21 15 16 10 5 21"></polyline>
</svg>
</button>
<input type="file" id="imageUpload" accept="image/*" style="display: none;">
</form>
</div>
</div>
<div id="locationInfo" style="display: none;"></div>
<div class="menu-container">
<button onclick="toggleMenu()" class="menu-btn">菜单</button>
<div id="menuContent" class="menu-content">
<a href="#" id="changeKeyBtn">更换密钥</a>
<a href="#" id="clearCookiesBtn">返回主页</a>
</div>
</div>
<script src="script.js"></script>
</body>
</html>