Skip to content

Commit

Permalink
Improved Ui and responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
TBorundia committed Aug 8, 2024
1 parent 9654f4d commit 0ccb10e
Showing 1 changed file with 124 additions and 86 deletions.
210 changes: 124 additions & 86 deletions assets/html/school.html
Original file line number Diff line number Diff line change
@@ -1,104 +1,142 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Donate Books to School</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
background-image: url("https://content.jdmagicbox.com/comp/kanpur/s9/0512px512.x512.221110025557.d4s9/catalogue/b-g-public-school-jajmau-kanpur-2e8dh0tkhf.jpg");
background-size: cover;
background-position: center;
background-attachment: fixed;
color: #0b0000c2;
text-shadow: 1px 1px 2px #f5eded68;
}
.form-container {
max-width: 600px;
margin: auto;
background-color: rgba(
210,
248,
248,
0.6
); /* Semi-transparent background */
padding: 30px;
border-radius: 25px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.9);
border: 2px solid black;
}
.form-container h1 {
text-align: center;
color: black;
font-size: 35px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 10px;
font-weight: bold;
font-size: 20px;
}
.form-group input,
.form-group select {
width: 100%;
background-color: rgb(238, 253, 253);
padding: 8px;
box-sizing: border-box;
border-radius: 10px;
margin-bottom: 10px;
}
.form-group button {
display: block;
width: 60%;
padding: 10px 20px;
background-color: #0c0257;
color: white;
border: none;
cursor: pointer;
border-radius: 7px;
text-align: center;
}
.form-group button:hover {
background-color: #6ee3fa;
color: black;
border: 3px solid black;
}
.thank-you-message {
display: none;
font-weight: bold;
margin-top: 20px;
color: green;
text-align: center;
font-size: 30px;
}
@media (max-width: 600px) {
body {
font-family: Arial, sans-serif;
margin: 20px;
background-image: url('https://www.utility.rentals/wp-content/uploads/2016/09/Is-lighting-affecting-schools.jpg'); /* Replace 'background-image.jpg' with your image path */
background-size: cover;
background-position: center;
background-attachment: fixed;
color: #0b0000c2;
text-shadow: 1px 1px 2px #f5eded68;
margin: 10px;
}
.form-container {
max-width: 600px;
margin: auto;
margin-top: 12rem;
text-align: center;
background-color: rgba(246, 246, 183, 0.927); /* Semi-transparent background */
padding: 20px;
border-radius: 10px;
padding: 15px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
}
.form-group input, .form-group select {
width: 100%;
padding: 8px;
box-sizing: border-box;
}
.form-group button {
padding: 10px 20px;
background-color: #81061f;
color: white;
border: none;
cursor: pointer;
}
.form-group button:hover {
background-color: #810639;
}
.thank-you-message {
display: none;
margin-top: 20px;
color: green;
.form-group input,
.form-group select {
padding: 10px;
}
}
</style>
</head>
<body>
</head>
<body>
<div class="form-container">
<h1>Donate Books to School</h1>
<form id="donationForm">
<div class="form-group">
<label for="name">Name of Donor:</label>
<input type="text" id="name" name="name" required>
</div>
<div class="form-group">
<label for="phone">Phone Number:</label>
<input type="tel" id="phone" name="phone" required>
</div>
<div class="form-group">
<label for="email">Email ID:</label>
<input type="email" id="email" name="email" required>
</div>
<div class="form-group">
<label for="bookName">Book Name:</label>
<input type="text" id="bookName" name="bookName" required>
</div>
<div class="form-group">
<label for="library">Select School:</label>
<select id="library" name="library" required>
<option value="">Select a School</option>
<option value="central_library">M.K.Gandhi School</option>
<option value="westside_library">Swaraj Rajya School</option>
<option value="eastside_library">Symbiosis High School</option>
</select>
</div>
<div class="form-group">
<button type="button" onclick="submitForm()">Submit</button>
</div>
</form>
<div id="thankYouMessage" class="thank-you-message">
Thank you for your contribution! We will contact you for further details.
<h1>Donate Books to School</h1>
<form id="donationForm">
<div class="form-group">
<label for="name">Name of Donor:</label>
<input type="text" id="name" name="name" required />
</div>
<div class="form-group">
<label for="phone">Phone Number:</label>
<input type="tel" id="phone" name="phone" required />
</div>
<div class="form-group">
<label for="email">Email ID:</label>
<input type="email" id="email" name="email" required />
</div>
<div class="form-group">
<label for="bookName">Book Name:</label>
<input type="text" id="bookName" name="bookName" required />
</div>
<div class="form-group">
<label for="library">Select School:</label>
<select id="library" name="library" required>
<option value="">Select a School</option>
<option value="central_library">M.K.Gandhi School</option>
<option value="westside_library">Swaraj Rajya School</option>
<option value="eastside_library">Symbiosis High School</option>
</select>
</div>
<div class="form-group">
<button type="button" onclick="submitForm()">Submit</button>
</div>
</form>
<div id="thankYouMessage" class="thank-you-message">
Thank you for your contribution! We will contact you for further
details.
</div>
</div>

<script>
function submitForm() {
// Hide the form
document.getElementById('donationForm').style.display = 'none';
function submitForm() {
// Hide the form
document.getElementById("donationForm").style.display = "none";

// Show thank you message
document.getElementById('thankYouMessage').style.display = 'block';
}
// Show thank you message
document.getElementById("thankYouMessage").style.display = "block";
}
</script>
</body>
</body>
</html>

0 comments on commit 0ccb10e

Please sign in to comment.