Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f0962cbf3 |
3 changed files with 5 additions and 4 deletions
|
|
@ -96,13 +96,13 @@ mod get {
|
||||||
}
|
}
|
||||||
body hx-ext="response-targets" {
|
body hx-ext="response-targets" {
|
||||||
h1 { "Mascarpone" }
|
h1 { "Mascarpone" }
|
||||||
form hx-post=(post_url) hx-target-error="#error" x-data="{ user: '', pass: '' }" {
|
form hx-post=(post_url) hx-target-error="#error" x-data="{ user: '', pass: '', htmx: false }" "x-on:htmx:load.document"="htmx = true" {
|
||||||
label for="username" { "Username" }
|
label for="username" { "Username" }
|
||||||
input name="username" #username autofocus x-model="user" x-cloak;
|
input name="username" #username autofocus x-model="user" x-cloak;
|
||||||
label for="password" { "Password" }
|
label for="password" { "Password" }
|
||||||
input name="password" #password type="password" x-model="pass" x-cloak;
|
input name="password" #password type="password" x-model="pass" x-cloak;
|
||||||
|
|
||||||
input type="submit" value="login" x-bind:disabled="!(user.length && pass.length)";
|
input type="submit" value="login" x-bind:disabled="!(user.length && pass.length && htmx)" hx-disabled-elt;
|
||||||
#error {}
|
#error {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ mod get {
|
||||||
?.top;\
|
?.top;\
|
||||||
top&&document\
|
top&&document\
|
||||||
.getElementById('contacts-sidebar')\
|
.getElementById('contacts-sidebar')\
|
||||||
.scrollTo({{top:top+window.innerHeight/2,left:0,behavior:'instant'}});",
|
.scrollTo({{top:top-window.innerHeight/2,left:0,behavior:'instant'}});",
|
||||||
id
|
id
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,8 @@ section#content {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
&.hide {
|
&.hide {
|
||||||
display: none;
|
left: -200%;
|
||||||
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue