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,15 +4,15 @@
(text "{% endblock %} {% block body %} {{ macros::nav(selected=\"achievements\") }}")
(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")
(icon (text "coffee"))
(span (text "Welcome to {{ config.name }}!")))
(div
("class" "card no_p_margin flex flex-col gap-2")
("class" "card no_p_margin flex flex_col gap_2")
(p (text "To help you move in, you'll be rewarded with small achievements for completing simple tasks on {{ config.name }}!"))
(p (text "You'll find out what each achievement is when you get it, so look around!"))
(hr)
@ -20,24 +20,24 @@
(div ("class" "progress_bar") (div ("class" "poll_bar") ("style" "width: {{ percentage }}%")))))
(div
("class" "card-nest")
("class" "card_nest")
(div
("class" "card small flex items-center justify-between gap-2")
("class" "card small flex items_center justify_between gap_2")
(span
("class" "flex items-center gap-2")
("class" "flex items_center gap_2")
(icon (text "award"))
(span (str (text "general:link.achievements")))))
(div
("class" "card lowered flex flex-col gap-4")
("class" "card lowered flex flex_col gap_4")
(text "{% for achievement in achievements %}")
(div
("class" "w-full card-nest")
("class" "w_full card_nest")
(div
("class" "card small flex items-center gap-2 {% if achievement[2] == 'Uncommon' -%} green {%- elif achievement[2] == 'Rare' -%} purple {%- endif %}")
("class" "card small flex items_center gap_2 {% if achievement[2] == 'Uncommon' -%} green {%- elif achievement[2] == 'Rare' -%} purple {%- endif %}")
(icon (text "award"))
(text "{{ achievement[0] }}"))
(div
("class" "card flex flex-col gap-2")
("class" "card flex flex_col gap_2")
(span ("class" "no_p_margin") (text "{{ achievement[1]|markdown|safe }}"))
(hr)
(span ("class" "fade") (text "Unlocked: ") (span ("class" "date") (text "{{ achievement[3].unlocked }}")))))

View file

@ -3,19 +3,19 @@
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
(main
("class" "flex flex-col gap-2")
("class" "flex flex_col gap_2")
(div
("class" "card-nest")
("class" "card_nest")
(div
("class" "card small")
(b (text "Error 😦")))
(div
("class" "card flex flex-col gap-4")
("class" "card flex flex_col gap_4")
(span (text "{{ error_text }}"))
(div
("class" "w-full flex gap-2")
("class" "w_full flex gap_2")
(a
("class" "button primary") ("href" "/")
(text "Home"))

View file

@ -3,13 +3,13 @@
(text "{% endblock %} {% block body %} {{ macros::nav() }}")
(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 justify-between gap-2")
("class" "card small flex items_center justify_between gap_2")
(span
("class" "flex items-center gap-2")
("class" "flex items_center gap_2")
(icon (text "scroll-text"))
(span (text "{{ file_name }}"))))

View file

@ -4,12 +4,12 @@
(text "{% endblock %} {% block body %} {{ macros::nav(selected=\"notifications\") }}")
(main
("class" "flex flex-col gap-2")
("class" "flex flex_col gap_2")
; viewing other user's notifications warning
(text "{% if profile.id != user.id -%}")
(div
("class" "card w-full red flex gap-2 items-center")
("class" "card w_full red flex gap_2 items_center")
(text "{{ icon \"skull\" }}")
(b
(text "Viewing other user's notifications! Please be careful.")))
@ -17,16 +17,16 @@
; ...
(div
("class" "card-nest")
("class" "card_nest")
(div
("class" "card small flex items-center justify-between gap-2")
("class" "card small flex items_center justify_between gap_2")
(span
("class" "flex items-center gap-2")
("class" "flex items_center gap_2")
(text "{{ icon \"bell\" }}")
(span
(text "{{ text \"notifs:label.notifications\" }}")))
(div
("class" "flex gap-2")
("class" "flex gap_2")
(button
("onclick" "trigger('me::clear_notifs')")
("class" "small red lowered")
@ -53,7 +53,7 @@
(span
(text "{{ text \"notifs:label.mark_all_as_unread\" }}")))))))
(div
("class" "card lowered flex flex-col gap-4")
("class" "card lowered flex flex_col gap_4")
(text "{% for notification in notifications %} {{ components::notification(notification=notification) }} {% endfor %}")))
(text "{{ components::pagination(page=page, items=notifications|length, key=\"&id=\", value=profile.id) }}"))

View file

@ -4,12 +4,12 @@
(text "{% endblock %} {% block body %} {{ macros::nav(selected=\"requests\") }}")
(main
("class" "flex flex-col gap-2")
("class" "flex flex_col gap_2")
; viewing other user's requests warning
(text "{% if profile.id != user.id -%}")
(div
("class" "card w-full red flex gap-2 items-center")
("class" "card w_full red flex gap_2 items_center")
(text "{{ icon \"skull\" }}")
(b
(text "Viewing other user's requests! Please be careful.")))
@ -17,11 +17,11 @@
; ...
(div
("class" "card-nest")
("class" "card_nest")
(div
("class" "card small flex items-center justify-between gap-2")
("class" "card small flex items_center justify_between gap_2")
(span
("class" "flex items-center gap-2")
("class" "flex items_center gap_2")
(text "{{ icon \"inbox\" }}")
(span
(text "{{ text \"requests:label.requests\" }}")))
@ -34,17 +34,17 @@
(text "{{ text \"notifs:action.clear\" }}")))
(text "{% endif %}"))
(div
("class" "card lowered flex flex-col gap-4")
("class" "card lowered flex flex_col gap_4")
(text "{% for request in requests %} {% if request.action_type == \"CommunityJoin\" %}")
(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 "{{ icon \"user-plus\" }}")
(span
(text "{{ text \"requests:label.community_join_request\" }}")))
(div
("class" "card flex flex-wrap gap-2")
("class" "card flex flex_wrap gap_2")
(a
("href" "/community/{{ request.linked_asset }}/manage?uid={{ request.id }}#/members")
("class" "button")
@ -59,21 +59,21 @@
(text "{{ text \"general:action.delete\" }}")))))
(text "{% elif request.action_type == \"Follow\" %}")
(div
("class" "card-nest")
("class" "card_nest")
(div
("class" "card small flex items-center gap-2")
("class" "card small flex items_center gap_2")
(a
("href" "/api/v1/auth/user/find/{{ request.id }}")
(text "{{ components::avatar(username=request.id, selector_type=\"id\") }}"))
(span
(text "{{ text \"requests:label.user_follow_request\" }}")))
(div
("class" "card flex flex-col gap-2")
("class" "card flex flex_col gap_2")
(span
("class" "flex items-center gap-2")
("class" "flex items_center gap_2")
(text "{{ text \"requests:label.user_follow_request_message\" }}"))
(div
("class" "card flex flex-wrap w-full secondary gap-2")
("class" "card flex flex_wrap w_full secondary gap_2")
(a
("href" "/api/v1/auth/user/find/{{ request.id }}")
("class" "button")
@ -94,13 +94,13 @@
(text "{{ text \"general:action.delete\" }}"))))))
(text "{%- endif %} {% endfor %} {% for question in questions %}")
(div
("class" "card-nest")
("class" "card_nest")
(text "{{ components::question(question=question[0], owner=question[1], asking_about=question[2], profile=user) }}")
(form
("class" "card flex flex-col gap-2")
("class" "card flex flex_col gap_2")
("onsubmit" "answer_question_from_form(event, '{{ question[0].id }}')")
(div
("class" "flex flex-col gap-1")
("class" "flex flex_col gap_1")
(label
("for" "content")
(text "{{ text \"communities:label.content\" }}"))
@ -114,11 +114,11 @@
("maxlength" "4096")))
(div
("id" "files_list")
("class" "flex gap-2 flex-wrap"))
("class" "flex gap_2 flex_wrap"))
(div
("class" "flex w-full justify-between flex-collapse gap-2")
("class" "flex w_full justify_between flex_collapse gap_2")
(div
("class" "flex flex-wrap w-full gap-2")
("class" "flex flex_wrap w_full gap_2")
(text "{{ components::create_post_options() }}")
(button
("type" "button")