add: login

This commit is contained in:
trisua 2025-08-24 17:04:27 -04:00
parent ce9ce4f635
commit 8c86dd6cda
13 changed files with 407 additions and 25 deletions

View file

@ -15,7 +15,12 @@
(meta ("property" "og:type") ("content" "website"))
(meta ("property" "og:site_name") ("content" "{{ name }}"))
(meta ("property" "og:title") ("content" "{{ name }}"))
(meta ("property" "twitter:title") ("content" "{{ name }}"))
(link ("rel" "icon") ("href" "/public/favicon.svg"))
(script ("src" "/public/app.js?v={{ build_code }}") ("defer"))
(script ("src" "/public/tokens.js?v={{ build_code }}") ("defer"))
(text "{% block head %}{% endblock %}"))
@ -42,6 +47,30 @@
("class" "button")
("href" "https://trisua.com/t/malachite")
(text "source"))
(hr)
(text "{% if not user -%}")
(a
("class" "button")
("href" "/login")
(text "login"))
(a
("class" "button")
("href" "{{ config.service_hosts.tetratto }}/auth/register")
(text "sign up"))
(text "{%- else -%}")
(a
("class" "button")
("href" "/app")
(text "app"))
(a
("class" "button")
("href" "{{ config.service_hosts.tetratto }}/settings")
(text "settings"))
(button
("class" "button red")
("onclick" "user_logout()")
(text "logout"))
(text "{%- endif %}")
(text "{% block dropdown %}{% endblock %}")))
(a ("class" "button camo") ("href" "/") (b (text "{{ name }}"))))
@ -51,14 +80,14 @@
; theme switches
(button
("class" "button camo fade")
("class" "button camo fade filled")
("id" "switch_light")
("title" "Switch theme")
("onclick" "set_theme('Dark')")
(text "{{ icon \"sun\" }}"))
(button
("class" "button camo fade hidden")
("class" "button camo fade filled hidden")
("id" "switch_dark")
("title" "Switch theme")
("onclick" "set_theme('Light')")