-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
48fbfba
commit 85c0403
Showing
7 changed files
with
148 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Contact/Booking - Bokkerijders</title> | ||
<link rel="stylesheet" href="styles.css"> | ||
<script type="text/javascript" src="https://cdn.emailjs.com/dist/email.min.js"></script> | ||
<script type="text/javascript"> | ||
(function(){ | ||
emailjs.init(process.env.REACT_APP_EMAILJS_PUBLIC_KEY); | ||
})(); | ||
</script> | ||
</head> | ||
<body> | ||
<header> | ||
<nav> | ||
<ul> | ||
<li><a href="index.html">HOME</a></li> | ||
<li><a href="shows.html">SHOWS</a></li> | ||
<li><a href="releases.html">RELEASES</a></li> | ||
<li><a href="https://bokkerijders.bigcartel.com/">MERCH</a></li> | ||
<li><a href="contact.html">CONTACT/BOOKING</a></li> | ||
</ul> | ||
</nav> | ||
<img src="images/logo.png" alt="Bokkerijders logo" class="logo-image"> | ||
</header> | ||
<main id="contact"> | ||
<h1>CONTACT/BOOKING</h1> | ||
<p>For booking and other inquiries, fill out the form below or email us at <a href="mailto:[email protected]">[email protected]</a></p> | ||
<form id="contact-form"> | ||
<label for="name">Name:</label> | ||
<input type="text" id="name" name="name" required> | ||
|
||
<label for="email">Email:</label> | ||
<input type="email" id="email" name="email" required> | ||
|
||
<label for="message">Message:</label> | ||
<textarea id="message" name="message" rows="5" required></textarea> | ||
|
||
<button type="submit">Send</button> | ||
</form> | ||
</main> | ||
<footer> | ||
<p>© 2024 BOKKERIJDERS. All rights reserved.</p> | ||
</footer> | ||
<script src="script.js"></script> | ||
|
||
<script type="text/javascript"> | ||
document.getElementById('contact-form').addEventListener('submit', function(event) { | ||
event.preventDefault(); | ||
|
||
emailjs.sendForm( | ||
process.env.REACT_APP_EMAILJS_SERVICE_ID, | ||
process.env.REACT_APP_EMAILJS_TEMPLATE_ID, | ||
this | ||
).then(function() { | ||
console.log('SUCCESS!'); | ||
alert('Your message has been sent!'); | ||
}, function(error) { | ||
console.log('FAILED...', error); | ||
alert('Oops... something went wrong.'); | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
document.getElementById('contact-form').addEventListener('submit', function(event) { | ||
event.preventDefault(); | ||
|
||
// Simple email validation regex | ||
const email = document.getElementById('email').value; | ||
const emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/; | ||
|
||
if (!emailPattern.test(email)) { | ||
alert('Please enter a valid email address.'); | ||
return; | ||
} | ||
|
||
// These IDs from the previous steps | ||
emailjs.sendForm('service_ikab6sp', 'template_fl1p6kp', this) | ||
.then(function() { | ||
console.log('SUCCESS!'); | ||
alert('Your message has been sent!'); | ||
}, function(error) { | ||
console.log('FAILED...', error); | ||
alert('Oops... something went wrong.'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters