-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
168 lines (146 loc) · 7.38 KB
/
index.html
File metadata and controls
168 lines (146 loc) · 7.38 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ForgeDotDev | Join the Org</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.6.0/dist/confetti.browser.min.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');
body {
font-family: 'Inter', sans-serif;
background-color: #030712;
background-image:
radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
}
.glass {
background: rgba(17, 24, 39, 0.8);
backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.1);
position: relative;
overflow: hidden;
}
/* Fixed Shimmer: Added pointer-events-none so it doesn't block clicks */
.shimmer-layer {
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
pointer-events: none;
z-index: 1;
}
.shimmer-layer::after {
content: '';
position: absolute;
top: -50%; left: -50%;
width: 200%; height: 200%;
background: linear-gradient(45deg, transparent, rgba(255,255,255,0.03), transparent);
transform: rotate(45deg);
animation: shimmer 6s infinite linear;
}
@keyframes shimmer {
0% { transform: translateX(-100%) rotate(45deg); }
100% { transform: translateX(100%) rotate(45deg); }
}
/* Ensure input is always interactable */
input:focus {
background-color: rgba(15, 23, 42, 0.9) !important;
}
</style>
</head>
<body class="text-slate-200 flex items-center justify-center min-h-screen p-6">
<div class="glass max-w-md w-full rounded-3xl p-8 shadow-2xl transition-all duration-500 hover:border-blue-500/30">
<div class="shimmer-layer"></div>
<div class="relative z-10">
<div class="flex justify-center mb-6">
<div class="h-16 w-16 bg-gradient-to-tr from-blue-600 to-emerald-400 rounded-2xl flex items-center justify-center shadow-lg shadow-blue-500/20">
<svg class="w-10 h-10 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"></path>
</svg>
</div>
</div>
<h1 class="text-center text-3xl font-extrabold tracking-tight text-white mb-2">
Forge<span class="text-blue-500">Dot</span>Dev
</h1>
<p class="text-center text-slate-400 text-sm mb-8">
Enter your GitHub alias to get write access.
</p>
<div class="space-y-4">
<div class="relative">
<div class="absolute inset-y-0 left-0 pl-4 flex items-center pointer-events-none">
<span class="text-slate-500 text-sm">github.com/</span>
</div>
<input type="text" id="username" autocomplete="off" spellcheck="false"
class="relative z-20 block w-full pl-28 pr-4 py-4 bg-slate-900 border border-slate-700 rounded-xl text-white placeholder-slate-600 focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:border-blue-500 transition-all cursor-text"
placeholder="username">
</div>
<button onclick="handleInvite()" id="submit-btn"
class="relative z-20 w-full bg-white text-slate-950 font-bold py-4 rounded-xl transition-all duration-200 hover:bg-blue-50 hover:scale-[1.02] active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed">
<span id="btn-text">Request Access</span>
</button>
</div>
<div id="status-container" class="mt-6 hidden transition-all duration-300">
<div class="flex items-center p-4 rounded-lg border text-sm" id="status-box">
<p id="status-msg"></p>
</div>
</div>
<p class="mt-8 text-center text-[10px] text-slate-600 uppercase tracking-[0.2em]">
Authorized Access Only • Forge Management
</p>
</div>
</div>
<script>
// --- PASTE YOUR URL BELOW ---
const SCRIPT_URL = "https://script.google.com/macros/s/AKfycbwNrDPLqnhs4H3KxKGG-mJM__WBQ4TTFv6933EhJB2U1JQ6ySS7uTQp-_Pf9xoiluXw/exec";
async function handleInvite() {
const username = document.getElementById('username').value.trim();
const btn = document.getElementById('submit-btn');
const btnText = document.getElementById('btn-text');
const statusContainer = document.getElementById('status-container');
const statusBox = document.getElementById('status-box');
const statusMsg = document.getElementById('status-msg');
if (!username) {
showStatus("Username is required", "error");
return;
}
btn.disabled = true;
btnText.innerText = "Connecting to Forge...";
statusContainer.classList.add('hidden');
try {
const response = await fetch(SCRIPT_URL, {
method: 'POST',
body: JSON.stringify({ username: username })
});
const result = await response.json();
if (result.status === 201 || result.status === 200) {
showStatus("Success! Invite sent to " + username, "success");
btnText.innerText = "Invite Sent";
confetti({ particleCount: 150, spread: 70, origin: { y: 0.6 }, colors: ['#3b82f6', '#10b981', '#ffffff'] });
} else {
const errorDetails = JSON.parse(result.body);
showStatus(errorDetails.message || "Invite failed", "error");
btnText.innerText = "Try Again";
btn.disabled = false;
}
} catch (err) {
showStatus("Network error. Verify Google Script deployment.", "error");
btnText.innerText = "Error";
btn.disabled = false;
}
}
function showStatus(message, type) {
const container = document.getElementById('status-container');
const box = document.getElementById('status-box');
const msg = document.getElementById('status-msg');
container.classList.remove('hidden');
if (type === 'success') {
box.className = "flex items-center p-4 rounded-lg border border-emerald-500/30 bg-emerald-500/10 text-emerald-400 text-sm";
msg.innerText = "✓ " + message;
} else {
box.className = "flex items-center p-4 rounded-lg border border-red-500/30 bg-red-500/10 text-red-400 text-sm";
msg.innerText = "✕ " + message;
}
}
</script>
</body>
</html>