generated from t/malachite
add: socket
This commit is contained in:
parent
8c86dd6cda
commit
c48cf78314
10 changed files with 227 additions and 13 deletions
9
app/templates_src/components.lisp
Normal file
9
app/templates_src/components.lisp
Normal file
|
@ -0,0 +1,9 @@
|
|||
(text "{% macro avatar(id, size=\"24px\") -%}")
|
||||
(img
|
||||
("title" "User avatar")
|
||||
("src" "{{ config.service_hosts.buckets }}/avatars/{{ id }}")
|
||||
("alt" "User avatar")
|
||||
("class" "avatar shadow")
|
||||
("loading" "lazy")
|
||||
("style" "--size: {{ size }}"))
|
||||
(text "{%- endmacro %}")
|
|
@ -3,7 +3,7 @@
|
|||
(text "Login — {{ name }}"))
|
||||
(text "{% endblock %} {% block body %}")
|
||||
(div
|
||||
("class" "card")
|
||||
("class" "card container small")
|
||||
(h4 (text "Login with Tetratto"))
|
||||
|
||||
(form
|
||||
|
@ -24,7 +24,7 @@
|
|||
("id" "username")))
|
||||
(div
|
||||
("class" "flex flex_col gap_1")
|
||||
(label ("for" "username") (b (text "Password")))
|
||||
(label ("for" "password") (b (text "Password")))
|
||||
(input
|
||||
("class" "surface")
|
||||
("type" "password")
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
(text "{%- import \"components.lisp\" as components -%}")
|
||||
(text "<!doctype html>")
|
||||
(html
|
||||
("lang" "en")
|
||||
|
@ -35,8 +36,12 @@
|
|||
(button
|
||||
("onclick" "open_dropdown(event)")
|
||||
("exclude" "dropdown")
|
||||
("class" "button camo fade")
|
||||
(text "{{ icon \"menu\" }}"))
|
||||
("class" "button camo")
|
||||
(text "{% if user -%}")
|
||||
(text "{{ components::avatar(id=user.id) }}")
|
||||
(text "{%- else -%}")
|
||||
(text "{{ icon \"menu\" }}")
|
||||
(text "{%- endif %}"))
|
||||
(div
|
||||
("class" "inner left")
|
||||
(a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue