(Feat): Initial Commit
This commit is contained in:
13
web/README.md
Normal file
13
web/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# `/web`
|
||||
|
||||
Web application specific components: static web assets, server side templates and SPAs.
|
||||
|
||||
https://github.com/golang-standards/project-layout/tree/master/web
|
||||
|
||||
### `/web/i18n`
|
||||
|
||||
Please name your translation files according to the locale (e.g. `de.toml`, `en.toml` or `en-uk.toml` and `en-us.toml`). We assume that any translation file hold all keys (no key mixing between locales)!
|
||||
|
||||
### `/web/templates`
|
||||
|
||||
This directory should e.g. hold email related templates (used by `/internal/mailer`).
|
||||
3
web/i18n/en.toml
Normal file
3
web/i18n/en.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
# https://github.com/toml-lang/toml/wiki
|
||||
# https://github.com/nicksnyder/go-i18n
|
||||
# Add additional files (like de.toml) or more specialized language forms like (en-uk.toml) into this folder.
|
||||
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Account confirmation</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="{{ .confirmationLink }}">Click here</a>
|
||||
</body>
|
||||
</html>
|
||||
10
web/templates/email/password_reset/password_reset.html.tmpl
Normal file
10
web/templates/email/password_reset/password_reset.html.tmpl
Normal file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Password reset</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="{{ .passwordResetLink }}">Click here</a>
|
||||
</body>
|
||||
</html>
|
||||
30
web/templates/views/account_confirmation.html.tmpl
Normal file
30
web/templates/views/account_confirmation.html.tmpl
Normal file
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Account confirmation</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="status">Processing request...</div>
|
||||
|
||||
<script>
|
||||
function processConfirmation() {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', {{ .confirmationRequestURL }}, true);
|
||||
xhr.onload = function () {
|
||||
if (xhr.status >= 200 && xhr.status < 300) {
|
||||
document.getElementById('status').textContent = 'Successfully confirmed account.';
|
||||
} else {
|
||||
document.getElementById('status').textContent = 'Failed to confirm, please try registering again.';
|
||||
}
|
||||
};
|
||||
xhr.onerror = function () {
|
||||
document.getElementById('status').textContent = 'Failed to confirm, please try registering again.';
|
||||
};
|
||||
xhr.send(JSON.stringify({}));
|
||||
}
|
||||
|
||||
window.onload = processConfirmation;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user