add: forge pinned tickets

This commit is contained in:
trisua 2025-06-10 22:12:22 -04:00
parent 68071b96c8
commit 46f8aea538
5 changed files with 44 additions and 16 deletions

View file

@ -41,12 +41,23 @@
(text "{{ icon \"award\" }}")
(span
(text "{{ text \"communities:label.my_communities\" }}")))
(a
("href" "/communities/search")
("class" "button quaternary small")
(text "{{ icon \"search\" }}")
(span
(text "{{ text \"communities:label.join_new\" }}"))))
(div
("class" "flex items-center gap-2")
(a
("href" "/forges")
("class" "button quaternary small")
(text "{{ icon \"anvil\" }}")
(span
("class" "desktop")
(text "{{ text \"forge:label.my_forges\" }}")))
(a
("href" "/communities/search")
("class" "button quaternary small")
(text "{{ icon \"search\" }}")
(span
("class" "desktop")
(text "{{ text \"communities:label.join_new\" }}")))))
(div
("class" "card flex flex-col gap-2")
(text "{% for item in list %} {{ components::community_listing_card(community=item) }} {% endfor %}")))

View file

@ -1789,7 +1789,12 @@
(text "{{ self::full_username(user=owner) }}"))
; timestamp
(span ("class" "date") (text "{{ post.created }}")))
(span ("class" "date") (text "{{ post.created }}"))
; pinned
(text "{% if post.context.is_pinned -%}")
(icon (text "pin"))
(text "{%- endif %}"))
; post title
(a

View file

@ -3,5 +3,4 @@
("class" "flex flex-col gap-4 w-full")
(text "{{ macros::forge_nav(community=community, selected=\"info\") }}")
(text "{{ components::community_info(community=community) }}"))
; (text "{{ components::community_banner(id=community.id, community=community) }}")
(text "{% endblock %}")

View file

@ -2,6 +2,19 @@
(div
("class" "flex flex-col gap-4 w-full")
(text "{{ macros::forge_nav(community=community, selected=\"tickets\") }}")
(div
("class" "card-nest")
(div
("class" "card small flex items-center gap-2")
(icon (text "pin"))
(str (text "communities:label.pinned")))
(div
("class" "card flex flex-col gap-2")
(text "{% for post in pinned -%}")
(text "{{ components::ticket(post=post[0], owner=post[1]) }}")
(text "{%- endfor %}")))
(div
("class" "card-nest")
(div