feat: merged in css from the almnui renew page/repo https://gitlab.skynet.ie/compsoc1/skynet/website/alumni-renew
This commit is contained in:
parent
2038a88466
commit
d864a3bafd
11 changed files with 735 additions and 656 deletions
175
src/signup.html
175
src/signup.html
|
@ -1,95 +1,96 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-ie">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>Skynet Sign-up</title>
|
||||
<link rel="icon" type="image/png" href="images/favicon/favicon-16x16.png"/>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheets/index.css"/>
|
||||
<style>
|
||||
/* Taken from the W3 schools loader tutorial */
|
||||
.loader {
|
||||
border: 16px solid #f3f3f3;
|
||||
border-radius: 50%;
|
||||
border-top: 16px solid #3498db;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
-webkit-animation: spin 2s linear infinite; /* Safari */
|
||||
animation: spin 20s linear;
|
||||
}
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>Skynet Sign-up</title>
|
||||
<link rel="icon" type="image/png" href="images/favicon/favicon-16x16.png"/>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheets/index.css"/>
|
||||
<style>
|
||||
/* Taken from the W3 schools loader tutorial */
|
||||
.loader {
|
||||
border: 16px solid #f3f3f3;
|
||||
border-radius: 50%;
|
||||
border-top: 16px solid #3498db;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
-webkit-animation: spin 2s linear infinite; /* Safari */
|
||||
animation: spin 20s linear;
|
||||
}
|
||||
|
||||
/* Safari */
|
||||
@-webkit-keyframes spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
/* Safari */
|
||||
@-webkit-keyframes spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="title">
|
||||
<a href="./"><img src="images/sharky_vector_svg.svg" alt="Picture of Sharky, the mascot of skynet" width="145"
|
||||
height="81.56"/> </a>
|
||||
<h1>Skynet Password Reset & Sign-up service</h1>
|
||||
</div>
|
||||
<div class="boxes">
|
||||
<h2>Welcome to Skynet</h2>
|
||||
<p>
|
||||
Skynet is a server cluster that the UL Computer Society runs. If you previously had an account and need to
|
||||
activate <br/>
|
||||
it please click <a href="./modify.html">here</a> to set a contact email address for your account. IF you are a
|
||||
new <br/>
|
||||
user, please fill in the form below with the email that you use on ul wolves.
|
||||
</p>
|
||||
<form id="register">
|
||||
<label for="mail">Email address</label>
|
||||
<input type="email" id="mail" name="email"/> <br/>
|
||||
<input type="submit" value="Submit"/>
|
||||
</form>
|
||||
<p id="formStatus"></p>
|
||||
</div>
|
||||
<footer>
|
||||
UL Computer Society 2023-<span id="year">2023</span>
|
||||
</footer>
|
||||
<script>
|
||||
const formEl = document.getElementById('register');
|
||||
formEl.addEventListener('submit', (listener) => formHandler(listener));
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<header class="page-header">
|
||||
<img src="./images/sharky.svg" alt="Picture of Sharky, the mascot of skynet" width="145" height="81.56"/>
|
||||
<h1>Skynet self service</h1>
|
||||
</header>
|
||||
<main class="page-body">
|
||||
<h2>Welcome to Skynet</h2>
|
||||
<p>
|
||||
Skynet is a server cluster that the UL Computer Society runs. If you previously had an account and need to
|
||||
activate <br/>
|
||||
it please click <a href="./modify.html">here</a> to set a contact email address for your account. IF you are a
|
||||
new <br/>
|
||||
user, please fill in the form below with the email that you use on ul wolves.
|
||||
</p>
|
||||
<form id="register">
|
||||
<label for="mail">Email address</label>
|
||||
<input type="email" id="mail" name="email"/> <br/>
|
||||
<input type="submit" value="Submit"/>
|
||||
</form>
|
||||
<p id="formStatus"></p>
|
||||
<script>
|
||||
const formEl = document.getElementById('register');
|
||||
formEl.addEventListener('submit', (listener) => formHandler(listener));
|
||||
|
||||
function formHandler(listener) {
|
||||
listener.preventDefault();
|
||||
//HTML below taken from the W3 schools tutorial ()
|
||||
document.getElementById('formStatus').innerHTML = "<div class='loader'></div>"
|
||||
const formData = new FormData(formEl);
|
||||
const email = formData.get("email");
|
||||
const object = {email: email};
|
||||
fetch('https://api.account.skynet.ie/ldap/new/email', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(object),
|
||||
mode: "cors"
|
||||
}).then(res => {
|
||||
if (res.status === 200) {
|
||||
document.getElementById('formStatus').innerHTML = "<span style='background-color: green; color: white'>Success</span>";
|
||||
} else if (res.status === 500) {
|
||||
document.getElementById('formStatus').innerHTML = "<span style='background-color: red; color: white'>Failure</span>";
|
||||
} else {
|
||||
document.getElementById('formStatus').innerHTML = "<span style='background-color: red; color: white'>Failure: Failed to communicate to server</span>";
|
||||
}
|
||||
}).catch(() => document.getElementById('formStatus').innerHTML = "<span style='background-color: yellow; color: black'>Please try again</span>");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
<script>
|
||||
document.getElementById('year').textContent = new Date().getFullYear().toString()
|
||||
</script>
|
||||
function formHandler(listener) {
|
||||
listener.preventDefault();
|
||||
//HTML below taken from the W3 schools tutorial ()
|
||||
document.getElementById('formStatus').innerHTML = "<div class='loader'></div>"
|
||||
const formData = new FormData(formEl);
|
||||
const email = formData.get("email");
|
||||
const object = {email: email};
|
||||
fetch('https://api.account.skynet.ie/ldap/new/email', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(object),
|
||||
mode: "cors"
|
||||
}).then(res => {
|
||||
if (res.status === 200) {
|
||||
document.getElementById('formStatus').innerHTML = "<span style='background-color: green; color: white'>Success</span>";
|
||||
} else if (res.status === 500) {
|
||||
document.getElementById('formStatus').innerHTML = "<span style='background-color: red; color: white'>Failure</span>";
|
||||
} else {
|
||||
document.getElementById('formStatus').innerHTML = "<span style='background-color: red; color: white'>Failure: Failed to communicate to server</span>";
|
||||
}
|
||||
}).catch(() => document.getElementById('formStatus').innerHTML = "<span style='background-color: yellow; color: black'>Please try again</span>");
|
||||
}
|
||||
</script>
|
||||
</main>
|
||||
<footer class="page-footer">
|
||||
UL Computer Society 2023-<span id="year">2023</span>
|
||||
<script>
|
||||
document.getElementById('year').textContent = new Date().getFullYear().toString()
|
||||
</script>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue