Skip to content

Add responsive contact form page #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions contact.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Contact Us</title>
<link rel="stylesheet" href="css/contact.css" />
</head>
<body>
<div class="container">
<h2>Contact Us</h2>
<form action="#" method="post">
<label for="name">Name</label>
<input type="text" id="name" name="name" placeholder="Your full name" required />

<label for="email">Email</label>
<input type="email" id="email" name="email" placeholder="Your email" required />

<label for="message">Message</label>
<textarea id="message" name="message" rows="5" placeholder="Your message..." required></textarea>

<button type="submit">Send Message</button>
</form>
</div>

<div id="footer-placeholder"></div>

<script>
fetch('/footer.html')
.then(response => response.text())
.then(data => {
document.getElementById('footer-placeholder').innerHTML = data;
})
.catch(err => console.error('Failed to load footer:', err));
</script>

</body>
</html>
36 changes: 36 additions & 0 deletions css/contact.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
body {
font-family: Arial, sans-serif;
background: #f8f9fa;
padding: 20px;
}

.container {
max-width: 600px;
margin: auto;
background: white;
padding: 30px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

input, textarea {
width: 100%;
padding: 12px;
margin: 8px 0 20px;
border: 1px solid #ccc;
border-radius: 4px;
resize: vertical;
}

button {
background-color: #007BFF;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
}

button:hover {
background-color: #0056b3;
}
Loading