diff options
author | Vikas Kushwaha <dev@vikas.rocks> | 2025-02-11 16:31:08 +0530 |
---|---|---|
committer | Vikas Kushwaha <dev@vikas.rocks> | 2025-02-11 16:31:08 +0530 |
commit | 57eb8f6712361a3bf75983ce153fac4846dc0273 (patch) | |
tree | 269a168d59c917c4e313c819e2b4c3ff8175f912 /cmd/web/templates/sign-in |
Initial commit
Diffstat (limited to 'cmd/web/templates/sign-in')
-rw-r--r-- | cmd/web/templates/sign-in/htmx-sign-in-page.tmpl | 3 | ||||
-rw-r--r-- | cmd/web/templates/sign-in/index.tmpl | 23 | ||||
-rw-r--r-- | cmd/web/templates/sign-in/partials/sign-in-form.tmpl | 27 |
3 files changed, 53 insertions, 0 deletions
diff --git a/cmd/web/templates/sign-in/htmx-sign-in-page.tmpl b/cmd/web/templates/sign-in/htmx-sign-in-page.tmpl new file mode 100644 index 0000000..3201ee8 --- /dev/null +++ b/cmd/web/templates/sign-in/htmx-sign-in-page.tmpl @@ -0,0 +1,3 @@ +{{ template "sign-in/index" . }} +{{ template "components/navbar" . }} +{{ template "components/head" . }}
\ No newline at end of file diff --git a/cmd/web/templates/sign-in/index.tmpl b/cmd/web/templates/sign-in/index.tmpl new file mode 100644 index 0000000..8f6806d --- /dev/null +++ b/cmd/web/templates/sign-in/index.tmpl @@ -0,0 +1,23 @@ +<div class="auth-page"> + <div class="container page"> + <div class="row"> + + <div class="col-md-6 col-md-offset-3 col-xs-12"> + <h1 class="text-xs-center">Sign in</h1> + <p class="text-xs-center"> + <a + href="/sign-up" + hx-push-url="/sign-up" + hx-get="/htmx/sign-up" + hx-target="#app-body" + > + Need an account? + </a> + </p> + + {{ template "sign-in/partials/sign-in-form" }} + </div> + + </div> + </div> +</div>
\ No newline at end of file diff --git a/cmd/web/templates/sign-in/partials/sign-in-form.tmpl b/cmd/web/templates/sign-in/partials/sign-in-form.tmpl new file mode 100644 index 0000000..21f2c84 --- /dev/null +++ b/cmd/web/templates/sign-in/partials/sign-in-form.tmpl @@ -0,0 +1,27 @@ +<div id="sign-in-form-messages" + {{ if .IsOob }} + hx-swap-oob="true" + {{ end }} +> + {{ if .Errors }} + <div class="alert alert-danger"> + <ul> + {{ range $error := .Errors }} + <li>{{ $error }}</li> + {{ end }} + </ul> + </div> + {{ end }} +</div> + +<form method="POST" hx-post="/htmx/sign-in"> + <fieldset class="form-group"> + <input type="text" id="sign-in-email" class="form-control form-control-lg" name="email" placeholder="Email"> + </fieldset> + <fieldset class="form-group"> + <input type="password" id="sign-in-password" class="form-control form-control-lg" name="password" placeholder="Password"> + </fieldset> + <button class="btn btn-lg btn-primary pull-xs-right"> + Sign in + </button> +</form>
\ No newline at end of file |