-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
86 lines (70 loc) · 1.82 KB
/
index.html
File metadata and controls
86 lines (70 loc) · 1.82 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Workshop URL Generator</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 600px;
margin: 40px auto;
padding: 20px;
line-height: 1.6;
}
label {
font-weight: bold;
}
input {
width: 100%;
padding: 10px;
margin: 8px 0 20px;
font-size: 16px;
}
button {
padding: 12px 20px;
font-size: 16px;
background-color: #0069d9;
color: white;
border: none;
cursor: pointer;
}
button:hover {
background-color: #0053b3;
}
.result {
margin-top: 25px;
padding: 15px;
background: #f1f1f1;
border-left: 4px solid #0069d9;
display: none;
}
</style>
</head>
<body>
<h1>Workshop URL Generator</h1>
<label for="username">GitHub username:</label>
<input type="text" id="username"/>
<label for="unit">Unit number:</label>
<input type="number" id="unit" min="1" max="99" placeholder="1" />
<button onclick="generateURL()">Get my unique URL</button>
<div class="result" id="resultBox">
<p>Your unique URL:</p>
<p id="outputURL"></p>
</div>
<script>
function generateURL() {
const username = document.getElementById("username").value.trim();
const unit = document.getElementById("unit").value.trim();
if (!username || !unit) {
alert("Please enter both your GitHub username and unit number.");
return;
}
const url = `https://github.com/corndel-ai/ai6-${unit}w-${username}`;
document.getElementById("outputURL").innerHTML =
`${url}</a>`;
document.getElementById("resultBox").style.display = "block";
}
</script>
</body>
</html>