diff options
author | June McEnroe <june@causal.agency> | 2020-04-20 11:27:27 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-04-20 11:27:27 -0400 |
commit | b3b0956b7ea43fcc88528727e7ed57c0278e1c19 (patch) | |
tree | 725ebedabd48c28918e3fb6b1763a1025d2d5847 /html.c | |
parent | Use template system for paths and URLs (diff) | |
download | bubger-b3b0956b7ea43fcc88528727e7ed57c0278e1c19.tar.gz bubger-b3b0956b7ea43fcc88528727e7ed57c0278e1c19.zip |
Put attachments inside <ul>
Diffstat (limited to '')
-rw-r--r-- | html.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/html.c b/html.c index 403caef..b0e00c2 100644 --- a/html.c +++ b/html.c @@ -165,11 +165,15 @@ int htmlInline(FILE *file, const struct BodyPart *part, const char *content) { return templateRender(file, template, vars, escapeXML); } +int htmlAttachmentOpen(FILE *file) { + return templateRender(file, TEMPLATE(<ul class="attachment">), NULL, NULL); +} + int htmlAttachment( FILE *file, const struct BodyPart *part, const struct Variable *path ) { const char *template = TEMPLATE( - <a class="attachment" href="[url]">[name][type][/][subtype]</a> + <li><a href="[url]">[name][type][/][subtype]</a></li> ); char *url = templateURL("../" PATH_ATTACHMENT, path); const char *name = paramGet(part->disposition.params, "filename"); @@ -186,6 +190,10 @@ int htmlAttachment( return error; } +int htmlAttachmentClose(FILE *file) { + return templateRender(file, TEMPLATE(</ul>), NULL, NULL); +} + int htmlMessageClose(FILE *file) { return templateRender(file, TEMPLATE(</article>), NULL, NULL); } |