Changed Footer

This commit is contained in:
James Dinh 2022-07-06 15:51:50 -07:00
parent b55d8c21e2
commit 0d36d4c5ca
9 changed files with 169 additions and 59 deletions

View File

@ -19,6 +19,7 @@
<link href="css/scroll_nav.css" rel="stylesheet" type="text/css" media="all">
<link rel="icon" href="img/Gilroy-Hacks-Logo-icon-tp.ico">
<script src="js/jquery-3.6.0.min.js"></script>
<style>
@font-face {
font-family: "Glacial Indifference";
@ -101,36 +102,46 @@
</header>
<main>
<section>
<h2 class="topic">Contact Form</h2>
<h2 class="topic">Contact Us</h2>
<hr class="line">
<!-- Src: https://codepen.io/nikhil8krishnan/pen/gaybLK -->
<form action="" class="contact-form">
<form action="https://formsubmit.co/tech@gilroyhacks.com" class="contact-form" method="POST">
<input type="hidden" name="email" id="email" value="tech@gilroyhacks.com">
<input type="hidden" name="success">
<div class="form-single-line">
<div class="input-block">
<label for="">Name</label>
<input type="text" class="form-control">
<input type="text" name="Name" class="form-control" required>
</div>
</div>
<div class="form-single-line">
<div class="input-block">
<label for="">Email</label>
<input type="text" class="form-control">
<input type="email" name="Email" class="form-control" required>
</div>
</div>
<div class="form-single-line">
<div class="input-block">
<label for="">Subject</label>
<input type="text" class="form-control">
<!-- <input type="text" name="subject" class="form-control"> -->
<select name="Subject" class="form-control" required>
<option value="choose">--Choose a Subject--</option>
<option value="signup">Signups & Registration</option>
<option value="details">Event Details</option>
<option value="website">Website</option>
<option value="discord">Discord</option>
<option value="other">Other</option>
</select>
</div>
</div>
<div class="col-sm-12">
<div class="form-multi-line">
<div class="input-block textarea">
<label for="">Drop your message here</label>
<textarea rows="3" type="text" class="form-control"></textarea>
<textarea rows="3" name="Message" class="form-control" required></textarea>
</div>
</div>
<div class="col-sm-12">
<button class="square-button">Send</button>
<div class="form-submit-button">
<button type="submit" name="Send" class="square-button">Send</button>
</div>
</form>
</section>
@ -159,10 +170,10 @@
<li><a class="link" target="_blank" href="https://forms.gle/coK7q43RwBV2f15i7">Signup Form</a></li>
<li><a class="link" target="_blank" href="https://sccl.bibliocommons.com/events/62acbe100685eb4200c37c48" title="Gilroy Library Event">Library Event Entry</a></li>
<li><a class="link" href="licenses.html" title="Licenses">Licenses</a></li>
<li><a class="link" target="_blank" href="mailto:tech@gilroyhacks.com" title="Email">Email Us</a></li>
<li><a class="link" href="contact.html" title="Contact">Contact Form</a></li>
</ul>
</article>
<article id="footer-links">
<article id="footer-location">
<h3>Location</h3><br>
<ul>
<li>Gilroy Library<br>350 W 6th St, Gilroy, CA 95020</li>

View File

@ -433,10 +433,14 @@ section {
.contact-form {
margin-top: 30px;
min-width: 300px;
width: 40vw;
}
.contact-form .input-block {
.input-block {
background-color: rgba(255, 255, 255, 0.8);
border: solid 1px #003f88;
border-radius: 10px;
width: 100%;
height: 60px;
padding: 25px;
@ -444,18 +448,21 @@ section {
margin-bottom: 20px;
transition: all 0.3s ease-out;
}
.contact-form .input-block.focus {
background-color: #fff;
.input-block.focus {
background-color: rgb(243, 243, 243);
border: solid 1px #00236e;
}
.contact-form .input-block.textarea {
.input-block.textarea {
height: auto;
font-size: 18px;
}
.contact-form .input-block.textarea .form-control {
.form-control {
height: auto;
resize: none;
width: 100%;
resize: vertical;
font-family: "Glacial Indifference";
}
.contact-form .input-block label {
.input-block label {
position: absolute;
left: 25px;
top: 25px;
@ -467,9 +474,9 @@ section {
font-size: 18px;
line-height: 10px;
}
.contact-form .input-block .form-control {
.input-block .form-control {
background-color: transparent;
padding: 0;
padding: 5px;
border: none;
border-radius: 0;
box-shadow: none;
@ -479,25 +486,25 @@ section {
font-size: 18px;
color: #333;
}
.contact-form .input-block .form-control:focus label {
.input-block .form-control:focus label {
top: 0;
}
.contact-form .square-button {
background-color: rgba(255, 255, 255, 0.8);
.square-button {
background-color: rgba(155, 222, 243, 0.8);
color: #006dac;
font-size: 26px;
text-transform: uppercase;
font-weight: 700;
text-align: center;
border-radius: 2px;
border-radius: 6px;
transition: all 0.3s ease;
padding: 0 60px;
height: 60px;
border: none;
width: 100%;
width: 30%;
}
.contact-form .square-button:hover, .contact-form .square-button:focus {
background-color: white;
.square-button:hover, .square-button:focus {
filter: brightness(0.8);
cursor: pointer;
}
@media (min-width: 768px) {
@ -631,7 +638,14 @@ footer {
}
#footer-links {
width: 200px;
width: 180px;
margin-top: 7px;
margin-right: 20px;
text-align: left;
}
#footer-location {
width: 220px;
margin-top: 7px;
margin-right: 20px;
text-align: left;

View File

@ -1953,7 +1953,14 @@ footer {
}
#footer-links {
width: 200px;
width: 180px;
margin-top: 7px;
margin-right: 20px;
text-align: left;
}
#footer-location {
width: 220px;
margin-top: 7px;
margin-right: 20px;
text-align: left;

View File

@ -565,7 +565,14 @@ footer {
}
#footer-links {
width: 200px;
width: 180px;
margin-top: 7px;
margin-right: 20px;
text-align: left;
}
#footer-location {
width: 220px;
margin-top: 7px;
margin-right: 20px;
text-align: left;

76
email.php Normal file
View File

@ -0,0 +1,76 @@
<?php
if (isset($_POST['Email'])) {
// EDIT THE 2 LINES BELOW AS REQUIRED
$email_to = "tech@gilroyhacks.com";
$email_subject = "Gilroy Hacks Query [Contact Form]";
function problem($error)
{
echo "We are very sorry, but there were error(s) found with the form you submitted. ";
echo "These errors appear below.<br><br>";
echo $error . "<br><br>";
echo "Please go back and fix these errors.<br><br>";
die();
}
// validation expected data exists
if (
!isset($_POST['Name']) ||
!isset($_POST['Email']) ||
!isset($_POST['Message'])
) {
problem('We are sorry, but there appears to be a problem with the form you submitted.');
}
$name = $_POST['Name']; // required
$email = $_POST['Email']; // required
$message = $_POST['Message']; // required
$error_message = "";
$email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
if (!preg_match($email_exp, $email)) {
$error_message .= 'The Email address you entered does not appear to be valid.<br>';
}
$string_exp = "/^[A-Za-z .'-]+$/";
if (!preg_match($string_exp, $name)) {
$error_message .= 'The Name you entered does not appear to be valid.<br>';
}
if (strlen($message) < 2) {
$error_message .= 'The Message you entered do not appear to be valid.<br>';
}
if (strlen($error_message) > 0) {
problem($error_message);
}
$email_message = "Form details below.\n\n";
function clean_string($string)
{
$bad = array("content-type", "bcc:", "to:", "cc:", "href");
return str_replace($bad, "", $string);
}
$email_message .= "Name: " . clean_string($name) . "\n";
$email_message .= "Email: " . clean_string($email) . "\n";
$email_message .= "Message: " . clean_string($message) . "\n";
// create email headers
$headers = 'From: ' . $email . "\r\n" .
'Reply-To: ' . $email . "\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
?>
<!-- include your success message below -->
Thank you for contacting us. We will be in touch with you very soon.
<?php
}
?>

View File

@ -736,23 +736,16 @@
<li><a class="link" onclick="check('01'); save();" target="_blank" href="https://forms.gle/coK7q43RwBV2f15i7">Signup Form</a></li>
<li><a class="link" target="_blank" href="https://sccl.bibliocommons.com/events/62acbe100685eb4200c37c48" title="Gilroy Library Event">Library Event Entry</a></li>
<li><a class="link" href="licenses.html" title="Licenses">Licenses</a></li>
<li><a class="link" target="_blank" href="mailto:tech@gilroyhacks.com" title="Email">Email Us</a></li>
<li><a class="link" href="contact.html" title="Contact">Contact Form</a></li>
</ul>
</article>
<article id="footer-links">
<article id="footer-location">
<h3>Location</h3><br>
<ul>
<li>Gilroy Library<br>350 W 6th St, Gilroy, CA 95020</li>
</ul>
</article>
</div>
<!-- <ul>
<li><a class="link" onclick="check('02'); save()" target="_blank" href="https://discord.gg/nkTDKMcYbr" title="Discord Invite Link">Discord</a></li>
<li><a class="link" target="_blank" href="mailto:tech@gilroyhacks.com" title="Email">Contact Us</a></li>
</ul>
<hr id="footer-line">
© 2022 Gilroy Hacks <br>
All Rights Reserved -->
</footer>
<!-- JavaScript Refs -->
<script src="js/jquery-3.6.0.min.js"></script>

2
js/jquery-3.6.0.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -267,10 +267,10 @@
<li><a class="link" target="_blank" href="https://forms.gle/coK7q43RwBV2f15i7">Signup Form</a></li>
<li><a class="link" target="_blank" href="https://sccl.bibliocommons.com/events/62acbe100685eb4200c37c48" title="Gilroy Library Event">Library Event Entry</a></li>
<li><a class="link" href="licenses.html" title="Licenses">Licenses</a></li>
<li><a class="link" target="_blank" href="mailto:tech@gilroyhacks.com" title="Email">Email Us</a></li>
<li><a class="link" href="contact.html" title="Contact">Contact Form</a></li>
</ul>
</article>
<article id="footer-links">
<article id="footer-location">
<h3>Location</h3><br>
<ul>
<li>Gilroy Library<br>350 W 6th St, Gilroy, CA 95020</li>