add: close friends stack

This commit is contained in:
trisua 2025-08-31 13:02:15 -04:00
parent 407155e6c4
commit 5fafc8d7b9
83 changed files with 479 additions and 213 deletions

View file

@ -137,7 +137,7 @@
("style" "display: contents")
(text "{{ self::post(post=post, owner=owner, secondary=secondary, community=community, show_community=show_community, can_manage_post=can_manage_post, repost=repost, expect_repost=true) }}"))
(text "{%- endmacro %}")
(text "{% macro post_info(post, community) -%}")
(text "{% macro post_info(post, community, owner) -%}")
; info about the post: edited, date, etc.
(text "{% if post.context.edited != 0 -%}")
(div
@ -167,7 +167,7 @@
(text "{%- endif %} {% if post.stack -%}")
(a
("title" "Posted to a stack you're in")
("class" "flex items_center flush")
("class" "flex items_center flush {% if post.stack == owner.close_friends_stack -%} green {%- endif %}")
("style" "color: var(--color-primary)")
("href" "/stacks/{{ post.stack }}")
(text "{{ icon \"layers\" }}"))
@ -386,7 +386,7 @@
(span
; ("class" "name")
(text "{{ self::full_username(user=owner) }}"))
(text "{{ self::post_info(post=post, community=community) }}")
(text "{{ self::post_info(post=post, community=community, owner=owner) }}")
(text "{% if post.context.is_pinned or post.context.is_profile_pinned -%} {{ icon \"pin\" }} {%- endif %}"))
(text "{% if not dont_show_title and post.title and community and community.context.enable_titles -%}")
; post has a title AND whatever is rendering this component wants to see it
@ -516,7 +516,7 @@
(button
("class" "green raised")
("onclick" "trigger('me::update_notification_read_status', ['{{ notification.id }}', true])")
(text "{{ icon \"check\" }}")
(icon (text "check"))
(span
(text "{{ text \"notifs:action.mark_as_read\" }}")))
(text "{%- endif %}")
@ -552,7 +552,7 @@
(text "{{ self::community_avatar(id=post.community, community=community, size=\"18px\") }}")))
(div
("class" "flex gap_2")
(text "{{ self::post_info(post=post, community=community) }}")))
(text "{{ self::post_info(post=post, community=community, owner=owner) }}")))
(div
("class" "card_nest_horizontal")
; author info
@ -630,7 +630,7 @@
("class" "flex justify_between gap_2 w_full")
(text "{% if page > 0 -%}")
(a
("class" "button lowered")
("class" "button lowered pagination_previous")
("href" "?page={{ page - 1 }}{{ key }}{{ value }}")
(text "{{ icon \"arrow-left\" }}")
(span
@ -639,7 +639,7 @@
(div)
(text "{%- endif %} {% if items != 0 -%}")
(a
("class" "button lowered")
("class" "button lowered pagination_next")
("href" "?page={{ page + 1 }}{{ key }}{{ value }}")
(span
(text "{{ text \"general:link.next\" }}"))
@ -2168,7 +2168,15 @@
("class" "card secondary flex flex_col gap_2")
(div
("class" "flex items_center gap_2")
(text "{{ icon \"list\" }}")
(text "{% if stack.is_locked -%}")
(span
("class" "red")
("title" "Locked stack")
(icon (text "lock")))
(text "{% else %}")
(icon (text "list"))
(text "{%- endif %}")
(b
(text "{{ stack.name }}")))
(span