diff options
| author | 2025-02-08 05:38:10 +0100 | |
|---|---|---|
| committer | 2025-02-08 05:38:10 +0100 | |
| commit | 54fe489c5f1582cbc8d627eccf2fe575dd38100c (patch) | |
| tree | cfcb1e0e69762f499b0e811ca656d1f796632cc9 /html.c | |
| parent | mastoapi: notify the maximum configured attachments. (diff) | |
| download | penes-snac2-54fe489c5f1582cbc8d627eccf2fe575dd38100c.tar.gz penes-snac2-54fe489c5f1582cbc8d627eccf2fe575dd38100c.tar.xz penes-snac2-54fe489c5f1582cbc8d627eccf2fe575dd38100c.zip | |
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, | |||
| 2706 | xs_html_attr("title", L("Post drafts")), | 2706 | xs_html_attr("title", L("Post drafts")), |
| 2707 | xs_html_text("drafts")))); | 2707 | xs_html_text("drafts")))); |
| 2708 | } | 2708 | } |
| 2709 | |||
| 2710 | /* the list of followed hashtags */ | ||
| 2711 | const char *followed_hashtags = xs_dict_get(user->config, "followed_hashtags"); | ||
| 2712 | |||
| 2713 | if (xs_is_list(followed_hashtags) && xs_list_len(followed_hashtags)) { | ||
| 2714 | xs_html *loht = xs_html_tag("ul", | ||
| 2715 | xs_html_attr("class", "snac-list-of-lists")); | ||
| 2716 | xs_html_add(body, loht); | ||
| 2717 | |||
| 2718 | const char *ht; | ||
| 2719 | |||
| 2720 | xs_list_foreach(followed_hashtags, ht) { | ||
| 2721 | xs *url = xs_fmt("%s/admin?q=%s", user->actor, ht); | ||
| 2722 | url = xs_replace_i(url, "#", "%23"); | ||
| 2723 | |||
| 2724 | xs_html_add(loht, | ||
| 2725 | xs_html_tag("li", | ||
| 2726 | xs_html_tag("a", | ||
| 2727 | xs_html_attr("href", url), | ||
| 2728 | xs_html_attr("class", "snac-list-link"), | ||
| 2729 | xs_html_text(ht)))); | ||
| 2730 | } | ||
| 2731 | } | ||
| 2709 | } | 2732 | } |
| 2710 | 2733 | ||
| 2711 | xs_html_add(body, | 2734 | xs_html_add(body, |