From dd83fbdbcc4580c9fe3d5ac70e4ec892a6df22ee Mon Sep 17 00:00:00 2001 From: Tristan Maat Date: Sat, 7 Apr 2018 15:36:47 +0000 Subject: [PATCH] mail.pug: Rebuild the mail page --- src/mail/mail.pug | 50 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/src/mail/mail.pug b/src/mail/mail.pug index 001a079..db04c69 100644 --- a/src/mail/mail.pug +++ b/src/mail/mail.pug @@ -1,4 +1,52 @@ extends ../lib/pug/base block content - p This is the mail page. + h1 Contact me + + .row + //- The form + .col-md-6 + form#sendmail(role="form", action="/api/mail", method="post") + //- The sender address + .form-group + label.control-label(for="mail") Email address + input#mail.form-control( + type="email", + placeholder="Your address", + name="mail", + required + ) + + //- The subject line + .form-group + label.control-label(for="subject") Subject + input#subject.form-control( + type="text", + placeholder="E.g. There's a typo on your home page!", + name="subject", + autocomplete="off", + required + ) + + //- The message box + .form-group + label.control-label(for="message") Message + textarea#message.form-control( + type="text", + rows="6", + name="message", + autocomplete="off", + required + ) + + button.btn.btn-primary(type="submit", form="sendmail") Send + + .col-md-6 + :markdown-it + Any messages you enter here are directly forwarded to me. I aim to + respond within a day. + + Don't be upset about the form, I want to avoid the spam + publishing your email address brings with it... And minimize + the amount of mail that doesn't reach me, this form is an + exception in all my spam filters, you see ;)