mirror of
https://github.com/hugmouse/maddy-password-reset.git
synced 2025-09-07 16:26:11 +00:00
Initial commit
This commit is contained in:
commit
e26324c07e
6 changed files with 482 additions and 0 deletions
6
templates/embed.go
Normal file
6
templates/embed.go
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
package templates
|
||||
|
||||
import "embed"
|
||||
|
||||
//go:embed *.gohtml
|
||||
var Templates embed.FS
|
||||
58
templates/reset.gohtml
Normal file
58
templates/reset.gohtml
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Сброс пароля</title>
|
||||
<style>
|
||||
body {
|
||||
padding: 1rem;
|
||||
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
}
|
||||
|
||||
input {
|
||||
margin-top: 1rem;
|
||||
padding: 1rem;
|
||||
background: transparent;
|
||||
border: 1px solid black;
|
||||
color: black;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
background-color: #222;
|
||||
color: white;
|
||||
}
|
||||
|
||||
input {
|
||||
border: 1px solid #ffffff;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Сброс пароля</h1>
|
||||
{{ if .UniqueLinkTriggered }}
|
||||
<p>Напишите здесь ваш новый пароль</p>
|
||||
<form action="" method="post">
|
||||
<label for="password">Ваш новый пароль</label>
|
||||
<input type="password" name="password" id="password" placeholder="Введите свой новый пароль">
|
||||
</form>
|
||||
{{ else }}
|
||||
{{ if .Sent }}
|
||||
<p>Сообщение о сбросе пароля было отправлено, если такой адрес существует.</p>
|
||||
{{ else }}
|
||||
<form action="/reset" method="post">
|
||||
<label for="email">Email адрес</label>
|
||||
<input type="email" name="email" id="email" placeholder="Введите свой email адрес">
|
||||
</form>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue