examples/js/views/index.html

111 lines
2.4 KiB
HTML
Raw Normal View History

2024-01-07 23:05:24 +05:30
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Home | mCaptcha Example SErver</title>
<meta name="referrer" content="no-referrer-when-downgrade" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
name="description"
content="mCaptcha is an AGPL'd, privacy focued, proof-of-work based CAPTCHA System"
/>
</head>
<body>
<form action="/" method="post">
<h1>Demo Form</h1>
<label for="name">
Name
<input type="text" name="name" id="name" />
</label>
<label for="comment">
Comment
<input type="password" name="comment" id="comment" />
</label>
<label
for="mcaptcha__token"
data-mcaptcha_url="{{ widget_link }}"
id="mcaptcha__token-label"
>
mCaptcha authorization token.
<a
href="https://mcaptcha.org/docs/user-manual/how-to-mcaptcha-without-js/"
>Instructions</a
>.
<input type="text" name="mcaptcha__token" id="mcaptcha__token" />
</label>
<div id="mcaptcha__widget-container"></div>
<script src="https://unpkg.com/@mcaptcha/vanilla-glue@0.1.0-rc2/dist/index.js"></script>
<button type="submit">Register</button>
</form>
<style>
body {
display: flex;
flex-direction: column;
align-items: center;
height: 100vh;
justify-content: space-around;
}
* {
padding: 0;
margin: 0;
}
form {
display: flex;
flex-direction: column;
margin: auto;
}
label {
display: block;
width: 100%;
margin: 5px 0;
}
input {
display: block;
width: 100%;
margin: 5px 0 auto;
height: 26px;
}
/*
#mcaptcha__token {
display: none;
}
*/
button {
background: none;
border: none;
background: green;
color: #fff;
height: 26px;
border-radius: 5px;
margin: 5px 0 auto;
}
h1 {
text-align: center;
align-self: center;
margin: 40px auto;
}
#mcaptcha__widget-container {
height: 78px;
width: 100%;
margin: 10px 0;
}
</style>
</body>
</html>