142 lines
No EOL
3.2 KiB
HTML
142 lines
No EOL
3.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<script src="lib/htmx.min.js"></script>
|
|
<title>Create Masked Email</title>
|
|
<meta name="viewport"
|
|
content="width=device-width,initial-scale=1" />
|
|
<link rel="manifest"
|
|
href="manifest.json" />
|
|
<link id="favicon"
|
|
rel="shortcut icon"
|
|
sizes="32x32"
|
|
href="icon-32x32.png">
|
|
<style>
|
|
:root {
|
|
--color: #1a40bc;
|
|
--input-width: 70vw;
|
|
}
|
|
|
|
.main {
|
|
min-height: 70vh;
|
|
align-items: center;
|
|
display: flex;
|
|
justify-content: center;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
|
|
h1,
|
|
input::-webkit-input-placeholder,
|
|
button {
|
|
font-family: 'roboto', sans-serif;
|
|
transition: all 0.3s ease-in-out;
|
|
}
|
|
h1 {
|
|
padding: 0 1rem;
|
|
}
|
|
form {
|
|
box-sizing: border-box;
|
|
|
|
box-shadow: 2px 2px 5px 1px rgba(0, 0, 0, 0.2);
|
|
padding-bottom: 2rem;
|
|
padding-top:2rem;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
input {
|
|
margin: 40px 25px;
|
|
width: var(--input-width);
|
|
display: block;
|
|
border: none;
|
|
padding: 10px 0;
|
|
border-bottom: solid 1px var(--color);
|
|
transition: all 0.3s cubic-bezier(.64, .09, .08, 1);
|
|
background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 96%, var(--color) 4%);
|
|
background-position: -var(--input-width) 0;
|
|
background-size: var(--input-width) 100%;
|
|
background-repeat: no-repeat;
|
|
color: darken(var(--color), 20%);
|
|
|
|
&:focus,
|
|
&:valid {
|
|
box-shadow: none;
|
|
outline: none;
|
|
background-position: 0 0;
|
|
|
|
&::-webkit-input-placeholder {
|
|
color: var(--color);
|
|
font-size: 11px;
|
|
transform: translateY(-20px);
|
|
visibility: visible !important;
|
|
}
|
|
}
|
|
}
|
|
|
|
button {
|
|
border: none;
|
|
font-size: 1.4rem;
|
|
background: var(--color);
|
|
cursor: pointer;
|
|
border-radius: 3px;
|
|
padding: 6px;
|
|
width: var(--input-width);
|
|
color: white;
|
|
margin-left: 25px;
|
|
box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.2);
|
|
|
|
&:hover {
|
|
transform: translateY(-3px);
|
|
box-shadow: 0 6px 6px 0 rgba(0, 0, 0, 0.2);
|
|
}
|
|
}
|
|
.reset {
|
|
font-size: 1.1rem;
|
|
color: -var(--color);
|
|
display: block;
|
|
margin-top:.5rem;
|
|
}
|
|
.htmx-indicator{
|
|
margin: 1rem auto 0;
|
|
text-align: center;
|
|
display:block;
|
|
}
|
|
.htmx-request .htmx-indicator{
|
|
display:block;
|
|
}
|
|
.htmx-request.htmx-indicator{
|
|
display:block;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="main">
|
|
<form id="mask-form"
|
|
hx-get="/mask"
|
|
hx-on:htmx:load="window.getSelection().selectAllChildren(event.target);document.execCommand('copy');"
|
|
hx-swap="innerHTML">
|
|
<input type="text"
|
|
autofocus
|
|
name="description"
|
|
required
|
|
minlength="2">
|
|
<input type="text"
|
|
name="domain">
|
|
<input type="hidden"
|
|
name="htmlx"
|
|
value="true">
|
|
<button type="submit">
|
|
Generate Email
|
|
</button>
|
|
<div class="htmx-indicator">Loading...</div>
|
|
</form>
|
|
<div>
|
|
<a class="reset" href="/maskedemail">Reset</a>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
|
|
</html> |