A web blog and personal homepage engine written in Go.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.5 KiB

{{ define "title" }}Contact Me{{ end }}
{{ define "content" }}
<h1>Contact Me</h1>
<div class="card">
<div class="card-body">
<p>
Fill out this form to send an e-mail to the site owner.
</p>
<form action="/contact" method="POST">
{{ CSRF }}
<div class="form-row">
<div class="form-group col-md-6">
<label for="name">Your name:</label>
<input type="text" class="form-control" id="name" name="name" placeholder="Anonymous" value="{{ .V.name }}">
</div>
<div class="form-group col-md-6">
<label for="name">Your email:</label>
<input type="email" class="form-control" id="email" name="email" placeholder="name@example.com" value="{{ .V.email }}">
<small id="email-help" class="form-text text-muted">
If you want a response; optional.
</small>
</div>
</div>
<div class="form-row">
<div class="form-group col-12">
<label for="subject">Subject</label>
<input type="text" class="form-control" name="subject" placeholder="No Subject">
</div>
</div>
<div class="form-row">
<div class="form-group col-12">
<label for="message" title="Required">Message<span class="text-danger">*</span></label>
<textarea cols="80" rows="10" class="form-control" name="message" id="message" required="required"></textarea>
</div>
</div>
<div class="form-row">
<div class="form-group col-12">
<button type="submit" class="btn btn-primary">Send</button>
</div>
</div>
</form>
</div>
</div>
{{ end }}