Compare commits
2 commits
ed8a5dae9c
...
66a45a2e16
| Author | SHA1 | Date | |
|---|---|---|---|
| 66a45a2e16 | |||
| edcab054b5 |
5 changed files with 58 additions and 8 deletions
|
|
@ -92,14 +92,21 @@ mod get {
|
||||||
}
|
}
|
||||||
body hx-ext="response-targets" {
|
body hx-ext="response-targets" {
|
||||||
h1 { "Entretien" }
|
h1 { "Entretien" }
|
||||||
form hx-post=(post_url) hx-target-error="#error" x-data=(json!({"user": state.autologin_user, "pass": state.autologin_pass, "htmx": false})) "x-on:htmx:load.document"="htmx = true" hx-trigger=(if state.autologin_pass.is_empty() { "submit" } else { "load" }) {
|
main {
|
||||||
label for="username" { "username" }
|
form hx-post=(post_url) hx-target-error="#error" x-data=(json!({"user": state.autologin_user, "pass": state.autologin_pass, "htmx": false})) "x-on:htmx:load.document"="htmx = true" hx-trigger=(if state.autologin_pass.is_empty() { "submit" } else { "load" }) {
|
||||||
input name="username" #username autofocus x-model="user" x-cloak;
|
label for="username" { "username" }
|
||||||
label for="password" { "password" }
|
input name="username" #username autofocus x-model="user" x-cloak;
|
||||||
input name="password" #password type="password" x-model="pass" x-cloak;
|
label for="password" { "password" }
|
||||||
|
input name="password" #password type="password" x-model="pass" x-cloak;
|
||||||
|
|
||||||
input type="submit" value="login" x-bind:disabled="!(user.length && pass.length && htmx)" hx-disabled-elt;
|
input type="submit" value="login" x-bind:disabled="!(user.length && pass.length && htmx)" hx-disabled-elt;
|
||||||
#error {}
|
#error {}
|
||||||
|
}
|
||||||
|
#blurb {
|
||||||
|
p { "Task manager for repeating tasks like home maintenance." }
|
||||||
|
p { "Try " code { "demo" } " for both username and password to try it out." }
|
||||||
|
p { "Contact me if you want an account!" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,9 @@ impl Layout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
|
nav {
|
||||||
|
a href="/logout" { "logout of " (self.user.username) }
|
||||||
|
}
|
||||||
main {
|
main {
|
||||||
(content)
|
(content)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@
|
||||||
|
|
||||||
main {
|
main {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 600px;
|
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abb
|
||||||
|
|
||||||
body {
|
body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
max-width: 600px;
|
||||||
|
margin: 0 auto;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
@ -58,3 +60,12 @@ form label {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 1em;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,9 @@ body {
|
||||||
form {
|
form {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
height: fit-content;
|
||||||
|
padding: 1em;
|
||||||
|
width: 60%;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -18,3 +21,30 @@ h1 {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: 2em;
|
margin-bottom: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: 1em;
|
||||||
|
|
||||||
|
height: fit-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
#blurb {
|
||||||
|
border: 1px solid var(--line-color);
|
||||||
|
border-radius: var(--input-border-radius);
|
||||||
|
padding: 1em;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 1.5em;
|
||||||
|
height: fit-content;
|
||||||
|
width: 40%;
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: monospace;
|
||||||
|
font-size: 115%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue