summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorGravatar default2024-05-30 16:12:08 +0200
committerGravatar default2024-05-30 16:12:08 +0200
commita5ec96a6da5437cad88487205d62a95f27614bd7 (patch)
tree2df61457b69c26adafed87aca7f1951ca847b513 /html.c
parentUpdated RELEASE_NOTES. (diff)
downloadpenes-snac2-a5ec96a6da5437cad88487205d62a95f27614bd7.tar.gz
penes-snac2-a5ec96a6da5437cad88487205d62a95f27614bd7.tar.xz
penes-snac2-a5ec96a6da5437cad88487205d62a95f27614bd7.zip
Added an "Alt..." details just below attachments with them.
The alt text is still also generated as 'alt' and 'name' attributes, but this is more usable from phones and tablets.
Diffstat (limited to 'html.c')
-rw-r--r--html.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/html.c b/html.c
index bacee5b..b50d69e 100644
--- a/html.c
+++ b/html.c
@@ -1891,6 +1891,9 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
1891 xs_html_tag("a", 1891 xs_html_tag("a",
1892 xs_html_attr("href", href), 1892 xs_html_attr("href", href),
1893 xs_html_text(href)))); 1893 xs_html_text(href))));
1894
1895 /* do not generate an Alt... */
1896 name = NULL;
1894 } 1897 }
1895 else { 1898 else {
1896 xs_html_add(content_attachments, 1899 xs_html_add(content_attachments,
@@ -1900,6 +1903,18 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
1900 xs_html_text(L("Attachment")), 1903 xs_html_text(L("Attachment")),
1901 xs_html_text(": "), 1904 xs_html_text(": "),
1902 xs_html_text(href)))); 1905 xs_html_text(href))));
1906
1907 /* do not generate an Alt... */
1908 name = NULL;
1909 }
1910
1911 if (name != NULL && *name) {
1912 xs_html_add(content_attachments,
1913 xs_html_tag("p",
1914 xs_html_tag("details",
1915 xs_html_tag("summary",
1916 xs_html_text(L("Alt..."))),
1917 xs_html_text(name))));
1903 } 1918 }
1904 } 1919 }
1905 } 1920 }