about summary refs log tree commit diff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/html.c b/html.c
index 14a4be9..ac1411d 100644
--- a/html.c
+++ b/html.c
@@ -51,7 +51,7 @@ htmlAddressList(FILE *file, const char *class, struct AddressList list) {
 	return templateRender(file, TEMPLATE(</ul>), vars, escapeXML);
 }
 
-int htmlEnvelope(FILE *file, const struct Envelope *envelope) {
+int htmlMessageHead(FILE *file, const struct Envelope *envelope) {
 	struct Variable urlVars[] = {
 		{ "mailbox", envelope->replyTo.mailbox },
 		{ "host", envelope->replyTo.host },
@@ -85,7 +85,7 @@ int htmlEnvelope(FILE *file, const struct Envelope *envelope) {
 	const char *Summary = TEMPLATE(
 		<details class="message" id="[messageID]">
 		<summary>
-			<h1 class="subject"><a href="[fragment]">[subject]</a></h1>
+			<a class="subject" href="[fragment]">[subject]</a>
 			<address class="from"><a href="[mailto]">[from]</a></address>
 			<time datetime="[utc]">[date]</time>
 			<a class="mbox" href="[mbox]">mbox</a>
@@ -101,3 +101,8 @@ int htmlEnvelope(FILE *file, const struct Envelope *envelope) {
 		|| htmlAddressList(file, "to", envelope->to)
 		|| htmlAddressList(file, "cc", envelope->cc);
 }
+
+int htmlMessageTail(FILE *file) {
+	int n = fprintf(file, "</details>\n");
+	return (n < 0 ? n : 0);
+}