mirror of
https://github.com/librecaptcha/lc-core.git
synced 2025-01-13 06:53:19 -05:00
Add basic webpage template
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
This commit is contained in:
parent
889405507e
commit
c45c9f0b99
23
client/index.html
Normal file
23
client/index.html
Normal file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Libre Captcha</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<h1>Libre Captcha</h1><hr>
|
||||
<h2>Open Source solution to Captchas</h2>
|
||||
<h3>v0.2 (Beta)</h3>
|
||||
</div>
|
||||
<div class="form">
|
||||
<input type="text" id="email" placeholder="email">
|
||||
<input type="button" id="reg-btn" value="Register">
|
||||
<!-- <p id="token"></p> -->
|
||||
</div>
|
||||
<div class="secret">
|
||||
<h4 id="token"></h4>
|
||||
</div>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
9
client/script.js
Normal file
9
client/script.js
Normal file
@ -0,0 +1,9 @@
|
||||
document.getElementById("reg-btn").addEventListener("click", function(){
|
||||
var email = document.getElementById("email").value;
|
||||
var url = window.location.origin+"/v1/token?email="+email
|
||||
fetch(url)
|
||||
.then(res => res.json())
|
||||
.then((data) => {
|
||||
document.getElementById("token").innerHTML = "SECRET "+data.token;
|
||||
})
|
||||
})
|
24
client/style.css
Normal file
24
client/style.css
Normal file
@ -0,0 +1,24 @@
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.form {
|
||||
width: 200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.form input {
|
||||
width: 100%;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#token {
|
||||
margin: 10px;
|
||||
padding: 3px;
|
||||
text-align: center;
|
||||
}
|
Loading…
Reference in New Issue
Block a user