{{ define "title" }}Contact Me{{ end }}
{{ define "content" }}
<h1>Contact Me</h1>

<p>
    You can use the form below to send an e-mail to this website's
    administrator.
</p>

{{ $form := .Data.Form }}
<form method="POST" action="/contact">
    <input type="hidden" name="_csrf" value="{{ .CSRF }}">
    <div class="form-group">
        <label for="name">
            Your name:
            <small class="form-text text-muted">(so I know who you are)</small>
        </label>
        <input type="text"
            name="name"
            class="form-control"
            id="name"
            placeholder="Anonymous"
            value="{{ $form.Name }}">
    </div>
    <div class="form-group">
        <label for="email">Your email:</label>
        <input type="email"
            name="email"
            class="form-control"
            id="email"
            placeholder="(if you want a response)"
            value="{{ $form.Email }}">
    </div>
    <div class="form-group">
        <label for="subject">
            Message subject:
            <small class="form-text text-muted">(optional)</small>
        </label>
        <input type="text"
            name="subject"
            class="form-control"
            id="subject"
            placeholder="No Subject"
            value="{{ $form.Subject }}">
    </div>
    <div class="form-group">
        <label for="message">Message:</label>
        <textarea class="form-control"
            cols="40"
            rows="12"
            name="message"
            id="message"
            placeholder="Message"
            required>{{ $form.Message }}</textarea>
    </div>

    <button type="submit" class="btn btn-primary">Send Message</button>

    <div style="display: none">
        If you can see these boxes, don't touch them.<br>
        <input type="text" size="40" name="contact" value=""><br>
        <input type="text" size="40" name="website" value="http://">
    </div>
</form>
{{ end }}
