-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.html
132 lines (117 loc) · 3.51 KB
/
home.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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta stuff -->
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<!-- Import stylesheet -->
<link rel="stylesheet" href="style.css" />
<!-- Import iconify -->
<script src="https://code.iconify.design/1/1.0.7/iconify.min.js"></script>
<!-- Import script -->
<script src="script.js"></script>
<!-- Bad words -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/badwords.js"></script>
<!-- Title -->
<title>Chatify</title>
</head>
<body>
<div class="container">
<!-- Banner -->
<div class="banner">
<h2>
Chatify
</h2>
</div>
<!-- Div with text -->
<div class="text">
<!-- Icon -->
<span class="iconify" data-icon="bi:chat-square-text" data-inline="false"></span>
<!-- Header and desc -->
<h2>Welcome to Chatify!</h2>
<p>Chatify is an app made by --Explosion-- and GrahamSH, it is a free online chat app with channels, XSS
sanitization,
quoting, editing, and much more! Try it out!</p>
<!-- Buttons -->
<div class='buttons'><a onclick='signup()'>Get started</a><a href='settings.html'>Go to
settings</a>
</div>
</div>
</div>
<button onclick="fullscreen()" id="fullscreen">
<span class="iconify" data-icon="octicon:screen-full-16" data-inline="false"></span>
</button>
</button>
</body>
</html>
<style>
/* General styling */
.text {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 30px;
}
.text h2 {
text-align: center;
}
/* Styling for the buttons (Actually link elements) */
.text a {
cursor: pointer;
display: inline-block;
transition: background-color .4s ease;
letter-spacing: 2px;
background: rgb(118, 184, 206);
padding: 10px;
border-radius: 5px;
text-decoration: none;
margin: 5px;
color: white;
}
/* This is the div containing both buttons */
.buttons {
margin-top: 0px;
}
.text a:hover {
background-color: rgb(112, 214, 112);
}
.text .iconify {
font-size: 70px;
margin: 5px;
}
</style>
<script>
if (window.localStorage.getItem('user') !== null) {
// If the user is already logged in
window.location.href = `https://vnmpd.csb.app/index.html`
}
// This is what happens when the user clicks 'Get started'
function signup() {
// 'fromhome' means that index.html will not redirect back, because we want index.html to redirect here if th euser is not logged in, but at this point the user has not logged in yet.
window.localStorage.setItem('fromhome', 'true');
if (window.localStorage.getItem('settings-visited') !== 'true') {
// If the user did not visit settings.html set some default settings.
window.localStorage.setItem('sounds', 'on')
window.localStorage.setItem('showtyping', 'on')
window.localStorage.setItem('leavejoin', 'on')
}
window.location.href = `https://vnmpd.csb.app/`
}
</script>
<script>
setInterval(() => {
// Font
try {
font.remove();
} catch (err) {}
font = document.createElement("STYLE");
font.innerHTML = `@import url("https://fonts.googleapis.com/css2?family=${window.localStorage.getItem(
"font"
)}&display=swap");\n* {\n\tfont-family: ${window.localStorage.getItem(
"font"
)}, Poppins, sans-serif;\n}`;
document.body.appendChild(font);
}, 10);
</script>