summary refs log tree commit diff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/html.c b/html.c
index 8aa872d..14a4be9 100644
--- a/html.c
+++ b/html.c
@@ -65,6 +65,7 @@ int htmlEnvelope(FILE *file, const struct Envelope *envelope) {
 		"mailto:[mailbox]@[host]?subject=[re][subject]&In-Reply-To=[messageID]",
 		urlVars
 	);
+	char *mbox = templateURL("../message/[messageID].mbox", urlVars);
 
 	char date[256];
 	char utc[sizeof("0000-00-00T00:00:00Z")];
@@ -78,6 +79,7 @@ int htmlEnvelope(FILE *file, const struct Envelope *envelope) {
 		{ "from", addressName(envelope->from) },
 		{ "date", date },
 		{ "utc", utc },
+		{ "mbox", mbox },
 		{0},
 	};
 	const char *Summary = TEMPLATE(
@@ -86,11 +88,13 @@ int htmlEnvelope(FILE *file, const struct Envelope *envelope) {
 			<h1 class="subject"><a href="[fragment]">[subject]</a></h1>
 			<address class="from"><a href="[mailto]">[from]</a></address>
 			<time datetime="[utc]">[date]</time>
+			<a class="mbox" href="[mbox]">mbox</a>
 		</summary>
 	);
 	int error = templateRender(file, Summary, vars, escapeXML);
 	free(fragment);
 	free(mailto);
+	free(mbox);
 	if (error) return error;
 
 	return 0
June McEnroe 2019-02-17Generate HTML with hi -n -f html -o anchorJune McEnroe 2019-02-17Add hi -f html -o anchor for line number linksJune McEnroe 2019-02-17Simplify temp trap in upJune McEnroe 2019-02-17Add line numbers to hiJune McEnroe 2019-02-17Always split spans after newlinesJune McEnroe 2019-02-15Color format specifiers light cyan in vimJune McEnroe 2019-02-15Highlight Interp as yellowJune McEnroe 2019-02-15Highlight strings in sh command substitutionsJune McEnroe 2019-02-15Add nmap gpJune McEnroe 2019-02-14Avoid newline when copying URL to pasteboardJune McEnroe 2019-02-13Add forgotten "sixth" book of H2G2June McEnroe