mirror of
https://github.com/openziti/zrok.git
synced 2024-11-22 08:03:49 +01:00
reset password email styling (#157)
This commit is contained in:
parent
1789e79b98
commit
3a0bc3c1c8
@ -1,12 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>Welcome to zrok!</title>
|
||||
<meta name="description" content="Please click to create your zrok account.">
|
||||
<title>Password reset requested!</title>
|
||||
<meta name="description" content="Reset your zrok password.">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Russo+One&display=swap" rel="stylesheet">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap" rel="stylesheet">
|
||||
@ -14,7 +14,7 @@
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 25;
|
||||
font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
|
||||
font-family: 'JetBrains Mono', 'Courier New', monospace;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
color: #ffffff;
|
||||
@ -22,22 +22,6 @@
|
||||
|
||||
}
|
||||
|
||||
tt,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-family: 'Russo One', sans-serif;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: #00d7e4;
|
||||
}
|
||||
@ -51,47 +35,6 @@
|
||||
color: #ff0100;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
line-height: 1.3em;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
|
||||
font-size: 1.5em;
|
||||
line-height: 1.3em;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.17em;
|
||||
line-height: 1.3em;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: 0;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
p code,
|
||||
li code {
|
||||
font-size: .875em;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.site-title {
|
||||
display: inline-block;
|
||||
font-size: 5em;
|
||||
line-height: 48px;
|
||||
color: #ffffff;
|
||||
margin: 0 .25em 0 0;
|
||||
}
|
||||
|
||||
.claim {
|
||||
font-size: 2em;
|
||||
margin: 0.5em 0 1em 0;
|
||||
@ -104,9 +47,7 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cta {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
@ -122,7 +63,7 @@
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
color: #FFF;
|
||||
color: #ffffff;
|
||||
background-color: #ff0100;
|
||||
border-color: #ff0100;
|
||||
}
|
||||
@ -138,8 +79,10 @@
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background-color: #ddd;
|
||||
border-color: #ccc;
|
||||
background-color: #b3b3b3;
|
||||
border-color: #b3b3b3;
|
||||
color: #252525;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
a.btn-secondary:link,
|
||||
@ -184,9 +127,28 @@
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Someone requested a password reset on your behalf, {{ .EmailAddress }}!</h1>
|
||||
<p>Please click this to change your <code>zrok</code> account password.</p>
|
||||
<div><a class="btn btn-primary" href="{{ .Url }}">Reset Password</a></div>
|
||||
</body>
|
||||
|
||||
<body style="font-family: 'JetBrains Mono', 'Courier New', monospace; color: #ffffff; background-color: #3b2693; font-weight: 600;">
|
||||
|
||||
<div class="container">
|
||||
<div class="banner" style="margin: auto;">
|
||||
<img src="https://zrok.io/wp-content/uploads/2023/01/welcome.jpg" width="363px" height="500px" style="padding-bottom: 10px;"/>
|
||||
</div>
|
||||
<div class="cta" style="text-align: center;">
|
||||
<p style="text-align: center;">Someone requested a password reset on your behalf, {{ .EmailAddress }}.</p>
|
||||
<a class="btn btn-primary" href="{{ .Url }}" style="color: #ffffff;">Reset Password</a>
|
||||
<a class="btn btn-secondary" href="#" style="color: #ffffff">Documentation</a>
|
||||
</div>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0" align="center" class="about">
|
||||
<tr>
|
||||
<td><a href="https://github.com/openziti/zrok" target="_blank">github.com/openziti/zrok</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ .Version }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p style="text-align: center;"></a>Copyright © 2023 <a href="http://www.netfoundry.io" target="_blank" style="color: #00d7e4;">NetFoundry, Inc.</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -3,6 +3,7 @@ package controller
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"github.com/openziti/zrok/build"
|
||||
"html/template"
|
||||
|
||||
"github.com/openziti/zrok/controller/emailUi"
|
||||
@ -14,12 +15,14 @@ import (
|
||||
type resetPasswordEmail struct {
|
||||
EmailAddress string
|
||||
Url string
|
||||
Version string
|
||||
}
|
||||
|
||||
func sendResetPasswordEmail(emailAddress, token string) error {
|
||||
emailData := &resetPasswordEmail{
|
||||
EmailAddress: emailAddress,
|
||||
Url: fmt.Sprintf("%s/%s", cfg.ResetPassword.ResetUrlTemplate, token),
|
||||
Version: build.String(),
|
||||
}
|
||||
|
||||
plainBody, err := emailData.mergeTemplate("resetPassword.gotext")
|
||||
|
Loading…
Reference in New Issue
Block a user