{{ 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 }}
