Skip to content
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

added a contact us page #369

Open
wants to merge 1 commit into
base: main
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
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<nav class="navbar">
<h1 id="logoName">Maa-Vimala</h1>
<ul class="nav-links">
<li><i class="fa-solid fa-house"></i><a href="#home"> Home </a></li>
<li><i class="fa-solid fa-house"></i><a href="index.html"> Home </a></li>
<li><i class="fa-solid fa-info-circle"></i><a href="#about"> About Us </a></li>
<li><i class="fa-solid fa-concierge-bell"></i><a href="#services"> Services </a></li>
<li><i class="fa-solid fa-star"></i><a href="#reviews"> Reviews </a></li>
<li><i class="fa-solid fa-envelope"></i><a href="#contact"> Contact Us </a></li>
<li><i class="fa-solid fa-envelope"></i><a href="pages\contactus.html"> Contact Us </a></li>
</ul>
</nav>
</header>
Expand Down
Binary file added pages/contact.bagrounf.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
201 changes: 201 additions & 0 deletions pages/contactus.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
* {
padding: 0;
margin: 0;
box-sizing: border-box; /* Corrected box-sizing property */
}

/* Navbar Styling */
nav {
background-color: rgba(0, 0, 0, 0.8);
width: 100%;
padding: 1rem 0;
position: fixed;
top: 0;
left: 0;
z-index: 1000;
}

.navbar {
list-style: none;
display: flex;
justify-content: space-around;
align-items:center;
margin: 0;
padding: 15px;
}
.navbar h1 {
color: #fff;
font-size: 1.5rem;
font-weight: 600;
margin: 0;
}

.nav-links {
list-style: none;
display: flex;
margin: 0;
padding: 0;
}

.nav-links li {
margin: 0 10px;
}

.nav-links a {
text-decoration: none;
color: #fff;
font-size: 1.2rem;
transition: color 0.3s ease;
}
.navbar .nav-links li i {
color: #fff;

}

.nav-links a:hover {
color: #ffcc00; /* Highlight color on hover */
}

/* Responsive Navbar for Mobile */
@media screen and (max-width: 600px) {
.navbar {
flex-direction: column;
align-items: flex-start;
}

.nav-links {
flex-direction: column;
width: 100%;
}

.nav-links li {
margin: 10px 0;
}
}
body {
background-image: url('contact.bagrounf.jpg');
background-size: cover;
background-position: center;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
width: 100vw;
}

.contact-box {
width: 90%;
max-width: 500px;
height: auto; /* Adjust to auto height for better responsiveness */
background-color: rgb(242, 230, 242);
border-radius: 10px;
display: flex;
flex-direction: column;
justify-content: center; /* Corrected spelling from "centre" to "center" */
align-items: center;
padding: 20px; /* Added padding for inner spacing */
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
animation: slide-in 1s forwards;
}

.contact-box div {
width: 100%;
margin-bottom: 20px;
position: relative;
}
.contact-box input{
background-color: lightgray;
}

.contact-box i {
position: absolute;
left: 18px;
top: 50%;
transform: translateY(-50%);
font-size: 20px;
color: #bbb;
}

.contact-box input, .contact-box textarea {
width: 100%;
padding: 20px 20px 20px 40px; /* Adjusted padding for input/textarea */
border: none;
outline: none;
border-radius: 40px;
font-size: 18px;
}

textarea {
resize: none;
height: 150px; /* Set height for textarea */
background-color: lightgrey;
}

button {
width: 100%;
cursor: pointer;
padding: 15px;
font-size: 20px;
border: none;
background-color: #28a745;
color: white;
border-radius: 40px;
transition: background-color 0.3s;
}

button:hover {
background-color: #218838;
}

.message {
width: 100%;
position: relative;
display: flex;
justify-content: center;
margin-bottom: 20px;
}

.message .success, .message .problem {
font-size: 20px;
position: absolute;
animation: button 0.3s linear;
display: none;
}

.message .success {
color: green;
}

.message .problem {
color: red;
}

@keyframes button {
0% { transform: scale(0.1); }
50% { transform: scale(0.5); }
100% { transform: scale(1); }
}
@keyframes slide-in {
from {
transform: translateX(-100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}

/* Media Queries */
@media (min-width: 768px) {
.contact-box {
width: 70%;
}
}

@media (min-width: 1024px) {
.contact-box {
width: 60%;
}
}

53 changes: 53 additions & 0 deletions pages/contactus.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<link rel="stylesheet" href="contactus.css">
<title>contat us</title>
</head>
<body>
<header>
<nav class="navbar">
<h1 id="logoName">Maa-Vimala</h1>
<ul class="nav-links">
<li><i class="fa-solid fa-house"></i><a href="index.html"> Home </a></li>
<li><i class="fa-solid fa-info-circle"></i><a href="#about"> About Us </a></li>
<li><i class="fa-solid fa-concierge-bell"></i><a href="#services"> Services </a></li>
<li><i class="fa-solid fa-star"></i><a href="#reviews"> Reviews </a></li>
<li><i class="fa-solid fa-envelope"></i><a href="pages\contactus.html"> Contact Us </a></li>
</ul>
</nav>
</header>

<div class="contact-box">

<h1>Let's get in touch!</h1>
<div class="name" >
<i class="fas fa-user"></i>
<input type="text" placeholder="username" id="name">
</div>
<div class="email">
<i class="fas fa-envelope"></i>
<input type="email" placeholder="email" id="email">
</div>
<div class="message-box">
<textarea placeholder="message" id="message-box" cols="30" rows="10"></textarea>
</div>
<div class="button">
<button onclick="message()">send</button>
</div>
<div class="message" >
<div class="success" id="success">
Message send successfully!
</div>
<div class="problem" id="problem">
Fields can't be empt!
</div>
</div>
</div>
<!-- Link to the external JavaScript file -->
<script src="submit.js"></script>
</body>
</html>
21 changes: 21 additions & 0 deletions pages/submit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
function message() {
var name = document.getElementById("name");
var email = document.getElementById("email");
var msg = document.getElementById("message-box");
const success = document.getElementById("success");
const problem = document.getElementById("problem");

if (name.value === "" || email.value === "" || msg.value === "") {
problem.style.display = 'block';
success.style.display = 'none'; // Hide success message if showing error
} else {
problem.style.display = 'none'; // Hide error message if showing success
success.style.display = 'block';
setTimeout(() => {
name.value = '';
email.value = '';
msg.value = '';
success.style.display = 'none'; // Hide success message after clearing inputs
}, 2000);
}
}
1 change: 0 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ nav {
margin: 10px 0;
}
}

/* Other existing styles */


Expand Down