-
Notifications
You must be signed in to change notification settings - Fork 0
/
alive.js
113 lines (110 loc) · 4.95 KB
/
alive.js
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
var http = require("http");
function startServer() {
http
.createServer(function (req, res) {
res.writeHead(200, { "Content-Type": "text/html" });
var htmlContent = `
<!DOCTYPE html>
<html>
<head>
<title>Replit Project</title>
<style>
body {
margin: 0;
padding: 0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #121212;
color: #fff;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
transition: background-color 0.3s;
}
.container {
text-align: center;
background-color: #1e1e1e;
padding: 50px;
border-radius: 15px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
max-width: 600px;
animation: fadeIn 1s ease-in-out;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(-20px); }
to { opacity: 1; transform: translateY(0); }
}
h1 {
color: #0d6efd;
margin-bottom: 20px;
}
p {
color: #adb5bd;
line-height: 1.6;
}
.button {
background-color: #0d6efd;
color: white;
border: none;
padding: 12px 25px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 10px;
cursor: pointer;
border-radius: 5px;
transition: background-color 0.3s ease, transform 0.2s ease;
}
.button:hover {
background-color: #0a58ca;
transform: translateY(-3px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.button.youtube { background-color: #ff0000; }
.button.youtube:hover { background-color: #c30000; }
.button.discord { background-color: #5865F2; }
.button.discord:hover { background-color: #4752c4; }
.button.github { background-color: #6e5494; }
.button.github:hover { background-color: #5a4680; }
.button.copy {
background-color: #28a745;
}
.button.copy:hover {
background-color: #218838;
}
</style>
</head>
<body>
<div class="container">
<h1>Welcome to Wick Studio!</h1>
<p>You can reach us through the links provided in the buttons below</p>
<a href="https://www.youtube.com/@wick_studio" target="_blank" class="button youtube">YouTube</a>
<a href="https://discord.gg/wicks" target="_blank" class="button discord">Discord</a>
<a href="https://github.com/wickstudio" target="_blank" class="button github">GitHub</a>
<button class="button copy" onclick="copyLink()">Copy Link</button>
</div>
<script>
function copyLink() {
const el = document.createElement('textarea');
el.value = window.location.href;
document.body.appendChild(el);
el.select();
document.execCommand('copy');
document.body.removeChild(el);
alert('Link copied to clipboard!');
}
</script>
</body>
</html>
`;
// Send the HTML content
res.write(htmlContent);
res.end();
})
.listen(8080, () =>
console.log("HTTP server running on http://localhost:8080"),
);
}
module.exports = { startServer };