diff options
| author | default <nobody@localhost> | 2025-02-08 05:38:10 +0100 |
|---|---|---|
| committer | default <nobody@localhost> | 2025-02-08 05:38:10 +0100 |
| commit | 54fe489c5f1582cbc8d627eccf2fe575dd38100c (patch) | |
| tree | cfcb1e0e69762f499b0e811ca656d1f796632cc9 /html.c | |
| parent | 1787102870161914fa7ba19d16803ebf7050b7dd (diff) | |
Show links to followed hashtags just below the list of lists.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -2706,6 +2706,29 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only, xs_html_attr("title", L("Post drafts")), xs_html_text("drafts")))); } + + /* the list of followed hashtags */ + const char *followed_hashtags = xs_dict_get(user->config, "followed_hashtags"); + + if (xs_is_list(followed_hashtags) && xs_list_len(followed_hashtags)) { + xs_html *loht = xs_html_tag("ul", + xs_html_attr("class", "snac-list-of-lists")); + xs_html_add(body, loht); + + const char *ht; + + xs_list_foreach(followed_hashtags, ht) { + xs *url = xs_fmt("%s/admin?q=%s", user->actor, ht); + url = xs_replace_i(url, "#", "%23"); + + xs_html_add(loht, + xs_html_tag("li", + xs_html_tag("a", + xs_html_attr("href", url), + xs_html_attr("class", "snac-list-link"), + xs_html_text(ht)))); + } + } } xs_html_add(body, |