diff options
Diffstat (limited to 'html.c')
-rw-r--r-- | html.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/html.c b/html.c index 5146a34..5acbdf2 100644 --- a/html.c +++ b/html.c @@ -69,7 +69,7 @@ htmlAddressList(FILE *file, const char *class, struct AddressList list) { return templateRender(file, TEMPLATE(</ul>), NULL, NULL); } -static char *htmlMailto(const struct Envelope *envelope) { +static char *htmlReply(const struct Envelope *envelope) { const char *template = { "mailto:[mailbox]@[host]" "?subject=[re][subject]" @@ -142,19 +142,19 @@ int htmlMessageOpen(FILE *file, const struct Envelope *envelope) { <header> <h2 class="subject"><a href="[fragment]">[subject]</a></h2> <address class="from"> - <a href="[mailto]">[from]</a> + <a href="[reply]">[from]</a> </address> <time datetime="[utc]">[date]</time> ); char *fragment = htmlFragment(envelope->messageID); - char *mailto = htmlMailto(envelope); + char *reply = htmlReply(envelope); char utc[sizeof("0000-00-00T00:00:00Z")]; strftime(utc, sizeof(utc), "%FT%TZ", gmtime(&envelope->time)); struct Variable vars[] = { { "messageID", envelope->messageID }, { "fragment", fragment }, { "subject", envelope->subject }, - { "mailto", mailto }, + { "reply", reply }, { "from", addressName(envelope->from) }, { "utc", utc }, { "date", envelope->date }, @@ -166,7 +166,7 @@ int htmlMessageOpen(FILE *file, const struct Envelope *envelope) { || htmlAddressList(file, "cc", envelope->cc) || htmlMessageNav(file, envelope) || templateRender(file, TEMPLATE(</header>), NULL, NULL); - free(mailto); + free(reply); free(fragment); return error; } @@ -438,6 +438,7 @@ int htmlIndexOpen(FILE *file) { <nav> <ul> <li><a href="index.atom">follow</a></li> + <li><a href="mailto:[addr]">write</a></li> </ul> </nav> </header> @@ -446,6 +447,7 @@ int htmlIndexOpen(FILE *file) { ); struct Variable vars[] = { { "title", baseTitle }, + { "addr", baseAddress }, {0}, }; return templateRender(file, template, vars, escapeXML); |