A clean, Markdown-based publishing platform made for writers. Write together, and build a community. https://writefreely.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

37 lines
1.4 KiB

  1. {{define "head"}}<title>Log in &mdash; {{.SiteName}}</title>
  2. <meta name="description" content="Log in to {{.SiteName}}.">
  3. <meta itemprop="description" content="Log in to {{.SiteName}}.">
  4. <style>
  5. input{margin-bottom:0.5em;}
  6. </style>
  7. {{end}}
  8. {{define "content"}}
  9. <div class="tight content-container">
  10. <h1>Log in to {{.SiteName}}</h1>
  11. {{if .Flashes}}<ul class="errors">
  12. {{range .Flashes}}<li class="urgent">{{.}}</li>{{end}}
  13. </ul>{{end}}
  14. {{template "oauth-buttons" .}}
  15. {{if not .DisablePasswordAuth}}
  16. <form action="/auth/login" method="post" style="text-align: center;margin-top:1em;" onsubmit="disableSubmit()">
  17. <input type="text" name="alias" placeholder="Username" value="{{.LoginUsername}}" {{if not .LoginUsername}}autofocus{{end}} /><br />
  18. <input type="password" name="pass" placeholder="Password" {{if .LoginUsername}}autofocus{{end}} /><br />
  19. {{if .To}}<input type="hidden" name="to" value="{{.To}}" />{{end}}
  20. <input type="submit" id="btn-login" value="Login" />
  21. </form>
  22. {{if and (not .SingleUser) .OpenRegistration}}<p style="text-align:center;font-size:0.9em;margin:3em auto;max-width:26em;">{{if .Message}}{{.Message}}{{else}}<em>No account yet?</em> <a href="{{.SignupPath}}">Sign up</a> to start a blog.{{end}}</p>{{end}}
  23. <script type="text/javascript">
  24. function disableSubmit() {
  25. var $btn = document.getElementById("btn-login");
  26. $btn.value = "Logging in...";
  27. $btn.disabled = true;
  28. }
  29. </script>
  30. {{end}}
  31. {{end}}