Initial website commit
This commit is contained in:
60
contact.html
Normal file
60
contact.html
Normal file
@@ -0,0 +1,60 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Contact | EngineeringBuild</title>
|
||||
<link rel="stylesheet" href="main.css" />
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
<div class="brand-block">
|
||||
<a class="brand" href="index.html">EngineeringBuild</a>
|
||||
<div class="brand-subtitle">Telecommunications, Networking, Linux, Embedded</div>
|
||||
</div>
|
||||
<nav class="site-nav" aria-label="Primary">
|
||||
<a href="index.html">Home</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main class="contact-page">
|
||||
<section class="contact-card">
|
||||
<p class="section-label">Contact</p>
|
||||
<h1>Send an enquiry</h1>
|
||||
<p>Use the form below to send a message directly to <a href="mailto:info@engineeringbuild.com">info@engineeringbuild.com</a>.</p>
|
||||
|
||||
<form id="contact-form" class="contact-form">
|
||||
<label>
|
||||
Name
|
||||
<input name="name" type="text" required />
|
||||
</label>
|
||||
<label>
|
||||
Email
|
||||
<input name="email" type="email" required />
|
||||
</label>
|
||||
<label>
|
||||
Subject
|
||||
<input name="subject" type="text" required />
|
||||
</label>
|
||||
<label>
|
||||
Enquiry
|
||||
<textarea name="message" rows="6" required></textarea>
|
||||
</label>
|
||||
<button type="submit">Send enquiry</button>
|
||||
</form>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
document.getElementById('contact-form').addEventListener('submit', function (event) {
|
||||
event.preventDefault();
|
||||
const data = new FormData(event.target);
|
||||
const subject = encodeURIComponent(data.get('subject') || 'EngineeringBuild Enquiry');
|
||||
const body = encodeURIComponent(
|
||||
`Name: ${data.get('name')}\nEmail: ${data.get('email')}\n\n${data.get('message')}`
|
||||
);
|
||||
window.location.href = `mailto:info@engineeringbuild.com?subject=${subject}&body=${body}`;
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user