-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest.html
More file actions
350 lines (301 loc) · 9.19 KB
/
test.html
File metadata and controls
350 lines (301 loc) · 9.19 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<script>(async function () { let con = await fetch("/user/adi"); })();</script>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap" rel="stylesheet" />
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#5C7AEA">
<link rel="icon" href="https://img.icons8.com/emoji/48/000000/red-paper-lantern-emoji.png" />
<meta name="description" content="A Textspace for all your content and link for clubhouse." />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<title>CodeSH 🔹| A textSpace for your links</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/mortezaom/google-sans-cdn@master/fonts.css" />
</head>
<style>
@import url('https://fonts.googleapis.com/css2?family=Staatliches&display=swap');
body {
background-color: #fff;
font-family: "Google Sans", sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
display: flex;
justify-content: space-evenly;
width: 100%;
height: 100vh;
align-items: center;
flex-direction: column;
}
.container {
width: 95%;
height: 85vh;
display: flex;
justify-content: space-evenly;
align-items: center;
background: #2e3034;
border-radius: 03em 20em 20em 20em;
border: #000 5px solid;
}
.container .leftWrapper {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
background: none;
color: #000000;
border-radius: 0em 3em 3em 0em;
}
.container .leftWrapper h2 {
font-family: 'Staatliches', cursive;
font-size: 2.5em;
color: #fff;
margin: 0;
padding: 0;
letter-spacing: 1px;
}
.container .leftWrapper .spand {
font-size: 1em;
width: 100%;
display: flex;
justify-content: space-evenly;
}
.container .leftWrapper .spand .btn {
background: #fff;
color: #202124;
border: 3px solid #000;
}
.container .leftWrapper .spand .randBtn {
background: #428EFF;
color: black;
border: 3px solid #000;
}
#btn {
padding: 0.8em;
border-radius: 0.5em;
font-weight: 500;
font-family: 'Staatliches', cursive;
font-size: 1.3em;
cursor: pointer;
}
.container .rightWrapper {
padding-top: 5vh;
width: 20%;
display: flex;
justify-content: center;
align-items: left;
flex-direction: column;
color: #000000;
border-radius: 3rem;
padding: 2rem;
border: #000 3px solid;
}
.container .rightWrapper h1 {
font-family: 'Staatliches', cursive;
color: #fff;
margin: 0;
padding: 0;
letter-spacing: 1px;
margin-bottom: 2em;
}
#card {
background-color: none;
padding: 0.3rem 1.2rem;
/* margin: 2rem; */
margin: 0 2rem 2rem 0;
border-radius: 1.3rem;
background: #428EFF;
border: #000 3px solid;
}
.container .rightWrapper pre {
color: #000000;
}
.container .rightWrapper a {
text-decoration: none;
color: #fff;
font-family: 'Staatliches', cursive;
font-size: 0.8em;
font-weight: 500;
}
footer {
width: 100%;
height: 2rem;
color: #000;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
font-family: 'Staatliches', cursive;
}
footer a {
color: #428EFF;
font-family: 'Staatliches', cursive;
text-decoration: none;
}
@media screen and (max-width: 900px) {
/* .container {
position: relative;
border-radius: 0;
min-height: 300%;
height: 300%;
flex-wrap: wrap;
}
.container .leftWrapper {
width: 100%;
height: 90vh;
border-radius: 0;
position: relative;
}
.container .rightWrapper {
width: 100%;
border-radius: 0;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
padding: 1.5em;
position: relative;
}
.container .rightWrapper h1 {
margin-left: 0rem;
}
.container .leftWrapper .spand {
width: 100%;
display: flex;
justify-content: space-evenly;
}
footer {
margin-top: 2em;
position: relative;
} */
body{
margin: 0;
padding: 0;
max-width: 100% !important;
min-height: 150vh;
background: #2e3034;
}
.container{
border: none;
border-radius: 0;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
flex-wrap: wrap;
padding: 0;
margin: 0;
width: 95%;
}
.container .leftWrapper {
margin: 0;
padding: 0;
position: relative;
height: max-content;
border-radius: 0;
width: 90% !important;
}
.container .leftWrapper h2 {
font-size: 1.5em;
width: 100%;
text-align: center;
}
.container .leftWrapper .spand {
width: 100%;
display: flex;
justify-content: space-evenly;
}
.container .leftWrapper .spand .btn {
width: 40%;
padding: 0.8em;
border-radius: 0.5em;
font-weight: 500;
font-family: 'Staatliches', cursive;
font-size: 1em;
cursor: pointer;
}
.container .leftWrapper .spand .randBtn {
width: 40%;
border-radius: 0.5em;
font-weight: 500;
font-family: 'Staatliches', cursive;
font-size: 0.8em;
cursor: pointer;
}
.container .rightWrapper {
margin: 0;
padding: 0;
width: 90%;
border-radius: 0;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
margin-top: 6em;
position: relative;
padding-top: 2em;
width: 90% !important;
margin-bottom: 0;
}
#card{
width: 85%;
}
footer {
position: relative;
color: #fff;
}
}
@media screen and (max-width: 1366px) {
.container .rightWrapper {
width: 30%;
}
.container .leftWrapper{
width: 30%;
}
.container .rightWrapper h1 {
font-size: 1.5em;
}
.container .rightWrapper a {
font-size: 0.8em;
}
}
</style>
<body>
<div class="container">
<div class="leftWrapper">
<h2>Get the shortest link for your Code !</h2> <br>
<span style="margin-top: 2em;" class="spand"><a class="btn" id="btn">Custom paste<i
class="bi bi-plus-square"></i></a>
<a class="randBtn" id="btn" >Random
paste<i class="bi bi-plus-square"></i></a> </span>
</div>
<div class="rightWrapper">
<h1>Recents</h1>
<div class="cardContainer">
</div>
</div>
</div>
<footer>
<section> Version 9.0.0 <br> Site by <a href="http://adithyapai.com" target="_blank"
rel="noopener noreferrer">Adtihya Pai B 👀</a></section>
</footer>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>document.querySelector(".btn").addEventListener("click", async function () { let a = prompt("Enter a id for your space"); if (a = (a = a.trim()).replaceAll(" ", ""), new RegExp(/^[a-zA-Z0-9 ]*$/).test(a)) { let b = await fetch("/user/" + a); console.log(b), (b = await b.json()) ? alert("The user space already exists ") : window.location.href = "/new/" + a } else alert("Only alphabets and numbers allowed !!") }); </script>
<script>
let randBtn = document.querySelector(".randBtn");
randBtn.addEventListener("click", async function () {
let userId = Math.random().toString(36).substring(7);
userId ? window.location.href = "/new/" + userId : null;
});
let getHTMLTemplate = async()=>{
f = await fetch("https://codesh.cf/latest");
f = await f.text();
// render the html in f
document.querySelector(".cardContainer").innerHTML = f;
}
getHTMLTemplate();
</script>
</body>
</html>