-
Notifications
You must be signed in to change notification settings - Fork 50
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
2cbba9f
commit 494a048
Showing
2 changed files
with
154 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
document.getElementById('contact-form').addEventListener('submit', function(event) { | ||
event.preventDefault(); | ||
|
||
// Basic form validation | ||
const name = document.getElementById('name').value; | ||
const email = document.getElementById('email').value; | ||
const subject = document.getElementById('subject').value; | ||
const message = document.getElementById('message').value; | ||
|
||
if (name && email && subject && message) { | ||
// Show the popup | ||
document.getElementById('popup').style.display = 'flex'; | ||
} else { | ||
alert("Please fill out all fields."); | ||
} | ||
}); | ||
|
||
document.getElementById('close-popup').addEventListener('click', function() { | ||
document.getElementById('popup').style.display = 'none'; | ||
}); |
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,134 @@ | ||
* { | ||
box-sizing: border-box; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
body { | ||
font-family: Arial, sans-serif; | ||
background-color: #f4f4f4; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
} | ||
|
||
.contact-container { | ||
background-color: white; | ||
padding: 20px; | ||
max-width: 500px; | ||
width: 100%; | ||
border-radius: 8px; | ||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
h2 { | ||
text-align: center; | ||
margin-bottom: 20px; | ||
color: #333; | ||
} | ||
|
||
.form-group { | ||
margin-bottom: 15px; | ||
} | ||
|
||
.form-group label { | ||
display: block; | ||
margin-bottom: 5px; | ||
font-weight: bold; | ||
color: #555; | ||
} | ||
|
||
.form-group input, | ||
.form-group textarea { | ||
width: 100%; | ||
padding: 10px; | ||
border: 1px solid #ddd; | ||
border-radius: 4px; | ||
font-size: 16px; | ||
} | ||
|
||
.form-group input:focus, | ||
.form-group textarea:focus { | ||
outline: none; | ||
border-color: #007bff; | ||
} | ||
|
||
button { | ||
width: 100%; | ||
padding: 10px; | ||
background-color: #007bff; | ||
color: white; | ||
border: none; | ||
border-radius: 4px; | ||
font-size: 16px; | ||
cursor: pointer; | ||
} | ||
|
||
button:hover { | ||
background-color: #0056b3; | ||
} | ||
|
||
/* Responsive */ | ||
@media (max-width: 768px) { | ||
.contact-container { | ||
padding: 15px; | ||
} | ||
|
||
h2 { | ||
font-size: 1.5em; | ||
} | ||
|
||
.form-group input, | ||
.form-group textarea { | ||
font-size: 14px; | ||
} | ||
|
||
button { | ||
font-size: 14px; | ||
} | ||
} | ||
|
||
/* Custom Popup Styles */ | ||
.popup-overlay { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background: rgba(0, 0, 0, 0.5); | ||
display: none; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.popup-content { | ||
background-color: white; | ||
padding: 20px; | ||
border-radius: 8px; | ||
text-align: center; | ||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
.popup-content h2 { | ||
margin-bottom: 15px; | ||
color: #333; | ||
} | ||
|
||
.popup-content p { | ||
margin-bottom: 20px; | ||
color: #555; | ||
} | ||
|
||
#close-popup { | ||
background-color: #007bff; | ||
color: white; | ||
padding: 10px 20px; | ||
border: none; | ||
border-radius: 4px; | ||
cursor: pointer; | ||
} | ||
|
||
#close-popup:hover { | ||
background-color: #0056b3; | ||
} |