add: socket

This commit is contained in:
trisua 2025-08-24 17:58:39 -04:00
parent 8c86dd6cda
commit c48cf78314
10 changed files with 227 additions and 13 deletions

View file

@ -140,6 +140,11 @@ nav.sticky {
width: 100%;
}
.container.small {
margin: 0 auto;
max-width: 42ch;
}
.content_container {
margin: 0 auto var(--pad-2);
width: 100%;
@ -327,7 +332,9 @@ video {
}
/* input */
input {
input,
textarea,
select {
--h: 36px;
padding: var(--pad-2) calc(var(--pad-3) * 1.5);
background: var(--color-raised);
@ -341,6 +348,7 @@ input {
height: var(--h);
line-height: var(--h);
border-left: solid 0px transparent;
width: 100%;
}
input:not([type="checkbox"]):focus {
@ -354,7 +362,9 @@ input[data-invalid] {
border-left: inset 5px var(--color-red);
}
input.surface {
input.surface,
textarea.surface,
select.surface {
background: var(--color-surface);
}
@ -563,6 +573,7 @@ img {
--size: 18px;
width: var(--size);
height: var(--size);
border-radius: var(--radius);
aspect-ratio: 1 / 1;
}

View 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 %}")

View file

@ -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")

View file

@ -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