add: forum posts ui

This commit is contained in:
trisua 2025-08-03 23:24:57 -04:00
parent ef029c59b3
commit 2be87c397d
90 changed files with 1459 additions and 1299 deletions

View file

@ -4,19 +4,19 @@
(text "{% endblock %} {% block body %} {{ macros::nav(selected=\"\") }}")
(main
("class" "flex flex-col gap-2")
("class" "flex flex_col gap_2")
(div
("class" "card-nest")
("class" "card_nest")
(div
("class" "card small flex items-center gap-2")
("class" "card small flex items_center gap_2")
(text "{{ components::avatar(username=add_user.username, size=\"24px\") }}")
(text "{{ components::full_username(user=add_user) }}"))
(div
("class" "card flex flex-col gap-2")
("class" "card flex flex_col gap_2")
(span (text "Select a stack to add this user to:"))
(text "{% for stack in stacks %}")
(button
("class" "justify-start lowered w-full")
("class" "justify-start lowered w_full")
("onclick" "choose_stack('{{ stack.id }}')")
(icon (text "layers"))
(text "{{ stack.name }}"))

View file

@ -4,21 +4,21 @@
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
(main
("class" "flex flex-col gap-2")
("class" "flex flex_col gap_2")
(text "{{ macros::timelines_nav(selected=\"stacks\") }}")
(div
("class" "card-nest w-full")
("class" "card_nest w_full")
(div
("class" "card small flex items-center justify-between gap-2")
("class" "card small flex items_center justify_between gap_2")
(div
("class" "flex items-center gap-2")
("class" "flex items_center gap_2")
(a
("href" "/api/v1/auth/user/find/{{ stack.owner }}")
(text "{{ components::avatar(username=stack.owner, selector_type=\"id\") }}"))
(span
(text "{{ stack.name }}")))
(div
("class" "flex gap-2")
("class" "flex gap_2")
(text "{% if stack.mode == 'Circle' -%}")
; post button for circle stacks
(a
@ -39,7 +39,7 @@
(text "{{ text \"general:action.manage\" }}")))
(text "{%- endif %}")))
(div
("class" "card w-full flex flex-col gap-2")
("class" "card w_full flex flex_col gap_2")
(text "{% if stack.users|length == 0 -%}")
(p
(text "No users included yet! Maybe ")
@ -61,14 +61,14 @@
(str (text "stacks:label.unblock_all")))
(text "{%- endif %}")
(div
("class" "flex gap-2 flex-wrap w-full")
("class" "flex gap_2 flex_wrap w_full")
(text "{% for user in list %} {{ components::user_plate(user=user, secondary=true) }} {% endfor %}"))
(text "{{ components::pagination(page=page, items=list|length) }}")
(text "{% else %}")
; user icons for circle stack
(text "{% if stack.mode == 'Circle' -%}")
(div
("class" "flex w-full gap-2 flex-wrap")
("class" "flex w_full gap_2 flex_wrap")
(text "{% for user in stack.users %}")
(a
("href" "/api/v1/auth/user/find/{{ user }}")
@ -79,7 +79,7 @@
; posts for all stacks except blocklist
(div
("class" "w-full flex flex-col gap-2")
("class" "w_full flex flex_col gap_2")
("ui_ident" "io_data_load")
(div ("ui_ident" "io_data_marker")))

View file

@ -4,19 +4,19 @@
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
(main
("class" "flex flex-col gap-2")
("class" "flex flex_col gap_2")
(text "{{ macros::timelines_nav(selected=\"stacks\") }} {% if user -%}")
(div
("class" "card-nest")
("class" "card_nest")
(div
("class" "card small")
(b
(text "{{ text \"stacks:label.create_new\" }}")))
(form
("class" "card flex flex-col gap-2")
("class" "card flex flex_col gap_2")
("onsubmit" "create_stack_from_form(event)")
(div
("class" "flex flex-col gap-1")
("class" "flex flex_col gap_1")
(label
("for" "name")
(text "{{ text \"communities:label.name\" }}"))
@ -32,16 +32,16 @@
(text "{{ text \"communities:action.create\" }}"))))
(text "{%- endif %}")
(div
("class" "card-nest w-full")
("class" "card_nest w_full")
(div
("class" "card small flex items-center justify-between gap-2")
("class" "card small flex items_center justify_between gap_2")
(div
("class" "flex items-center gap-2")
("class" "flex items_center gap_2")
(text "{{ icon \"layers\" }}")
(span
(text "{{ text \"stacks:label.my_stacks\" }}"))))
(div
("class" "card flex flex-col gap-2")
("class" "card flex flex_col gap_2")
(text "{% for item in list %}")
(text "{{ components::stack_listing(stack=item) }}")
(text "{% endfor %}"))))

View file

@ -4,7 +4,7 @@
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
(main
("class" "flex flex-col gap-2")
("class" "flex flex_col gap_2")
(div
("class" "pillmenu")
(a
@ -21,13 +21,13 @@
(span
(text "{{ text \"stacks:tab.users\" }}"))))
(div
("class" "w-full flex flex-col gap-2")
("class" "w_full flex flex_col gap_2")
("data-tab" "general")
(div
("id" "manage_fields")
("class" "card lowered flex flex-col gap-2")
("class" "card lowered flex flex_col gap_2")
(div
("class" "card-nest")
("class" "card_nest")
("ui_ident" "privacy")
(div
("class" "card small")
@ -46,7 +46,7 @@
("selected" "{% if stack.privacy == 'Public' -%}true{% else %}false{%- endif %}")
(text "Public")))))
(div
("class" "card-nest")
("class" "card_nest")
("ui_ident" "mode")
(div
("class" "card small")
@ -73,7 +73,7 @@
("selected" "{% if stack.mode == 'Circle' -%}true{% else %}false{%- endif %}")
(text "Circle")))))
(div
("class" "card-nest")
("class" "card_nest")
("ui_ident" "sort")
(div
("class" "card small")
@ -92,17 +92,17 @@
("selected" "{% if stack.sort == 'Likes' -%}true{% else %}false{%- endif %}")
(text "Likes")))))
(div
("class" "card-nest")
("class" "card_nest")
("ui_ident" "change_name")
(div
("class" "card small")
(b
(text "{{ text \"stacks:label.change_name\" }}")))
(form
("class" "card flex flex-col gap-2")
("class" "card flex flex_col gap_2")
("onsubmit" "change_name(event)")
(div
("class" "flex flex-col gap-1")
("class" "flex flex_col gap_1")
(label
("for" "name")
(text "{{ text \"communities:label.name\" }}"))
@ -118,15 +118,15 @@
(span
(text "{{ text \"general:action.save\" }}"))))))
(div
("class" "card-nest")
("class" "card_nest")
("ui_ident" "danger_zone")
(div
("class" "card small flex gap-1 items-center red")
("class" "card small flex gap_1 items_center red")
(text "{{ icon \"skull\" }}")
(b
(text "{{ text \"communities:label.danger_zone\" }}")))
(div
("class" "card flex flex-wrap gap-2")
("class" "card flex flex_wrap gap_2")
(button
("class" "red lowered")
("onclick" "delete_stack()")
@ -134,7 +134,7 @@
(span
(text "{{ text \"general:action.delete\" }}"))))))
(div
("class" "card w-full flex flex-col gap-2 hidden")
("class" "card w_full flex flex_col gap_2 hidden")
("data-tab" "users")
(button
("onclick" "add_user()")
@ -143,9 +143,9 @@
(text "{{ text \"stacks:label.add_user\" }}")))
(text "{% for user in users %}")
(div
("class" "card secondary flex flex-wrap gap-2 items-center justify-between")
("class" "card secondary flex flex_wrap gap_2 items_center justify_between")
(div
("class" "flex gap-2")
("class" "flex gap_2")
(text "{{ components::avatar(username=user.username) }} {{ components::full_username(user=user) }}"))
(button
("class" "lowered small red")
@ -155,7 +155,7 @@
(text "{{ text \"stacks:label.remove\" }}"))))
(text "{% endfor %}"))
(div
("class" "flex gap-2 flex-wrap")
("class" "flex gap_2 flex_wrap")
(a
("href" "/stacks/{{ stack.id }}")
("class" "button secondary")