signup.html 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>{{.Strings.Signup.title}}</title>
  7. <link rel="stylesheet" href="/static/style/style.css" />
  8. <link rel="icon" type="image/svg+xml" href="/static/img/logo.svg">
  9. <link rel="apple-touch-icon" type="image/svg+xml" href="/static/img/logo.svg">
  10. </head>
  11. <body class="flex flex-column height-all">
  12. <header class="w12 padding-bottom-_25 flex flex-row flex-justify-space flex-align-centre flex-content">
  13. <a href="/" class="decoration-none">
  14. <h1 class="inline valign-mid text sans margin-lr-1">a·muse</h1>
  15. </a>
  16. </header>
  17. <main class="margin-lr-1 flex-fill">
  18. <div class="flex flex-column height-fill flex-centre">
  19. <div class="w12 flex flex-centre border-box left">
  20. <div>
  21. <div class="sans italic centre">{{.Strings.Signup.swear}}</div>
  22. <hr/>
  23. {{if .State.Error}}
  24. <div class="sans bg-error centre bold margin-tb-1 padding-tb-1">Error: {{index .Strings.Signup .State.Error.Err.Error}}</div>
  25. {{ end }}
  26. <form action="/signup" method="POST" class="clear-float">
  27. <label for="username" class="sans block font-1 margin-top-1">{{.Strings.Signup.username}}</label>
  28. <input autofocus type="text" required id="username" name="username" value="{{.Data.Username}}" class="block bg-none border-none border-bottom text font-1_5" />
  29. <label for="password" class="sans block font-1 margin-top-1">{{.Strings.Signup.password}}</label>
  30. <input type="password" required id="password" name="password" class="block bg-none border-none border-bottom text font-1_5" />
  31. <label for="password2" class="sans block font-1 margin-top-1">{{.Strings.Signup.confirm_pass}}</label>
  32. <input type="password" required id="password2" name="password2" class="block bg-none border-none border-bottom text font-1_5" />
  33. <div class="margin-tb-2 border-_5 border-grey padding-tb-_5 padding-lr-_25 border-solid">
  34. <label for="sfa-enabled" class="sans font-1 margin-top-1">{{.Strings.Signup.enable_sfa}} <span title="{{.Strings.Signup.use_totp_app}}" class="material-icon">&#xe887</span></label>
  35. <input type="checkbox" id="sfa-enabled" class="" name="sfaEnabled" value="true" {{if .Data.SfaEnabled}}checked{{end}}/>
  36. <div class="" id="sfa-box">
  37. <input type="hidden" name="sfaSecret" class="margin-lr-_5 margin-tb-_5 text bg-none border-none" value="{{.Data.Secret}}" />
  38. <div class="margin-tb-_5">
  39. <img src="{{.Data.Qr}}" class="block margin-auto"/>
  40. </div>
  41. <span class="sans text-unimportant">{{.Data.Secret}}</span>
  42. <label for="sfa" class="sans block font-1 margin-top-1">{{.Strings.Signup.confirm_sfa}}</label>
  43. <input type="text" pattern="[0-9 ]*" inputmode="numeric" autocomplete="off" id="sfa" name="sfa" class="block bg-none border-none border-bottom text font-1_5" />
  44. </div>
  45. </div>
  46. <input type="submit" class="margin-tb-1 right-float bg-accent border-text padding-lr-_5 padding-tb-_25 cursor-hand no-outline" value="{{.Strings.Signup.sign_up}}"/>
  47. </form>
  48. <p class="sans font-_875">{{.Strings.Signup.already_have_account}} <a href="/login">{{.Strings.Signup.log_in}}</a></p>
  49. </div>
  50. </div>
  51. </div>
  52. </main>
  53. </body>
  54. </html>