Skip to content

Commit

Permalink
Merge branch 'main' into ui2
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya-bhaumik authored Jul 13, 2024
2 parents 4e6d39b + 7578b9c commit 5a68ce5
Show file tree
Hide file tree
Showing 14 changed files with 3,002 additions and 2,212 deletions.
2 changes: 1 addition & 1 deletion Css-Files/aboutus.css
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
flex-direction: column;
gap: 1rem;
width: 35%;
height: 18rem;
height: 19.5rem;
border: 1px solid rgba(206, 212, 218, 1);
border-radius: 8px;
margin-bottom: 21px;
Expand Down
122 changes: 110 additions & 12 deletions Html-Files/Css-Files/appointStyle.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
body {
margin: 0;
padding: 0;
background-color: #f9f9f9;
background-color: #000;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
font-family: "Raleway", sans-serif;
}

header {
background-color: #007074d5;
color: white;
padding: 15px;
text-align: center;
width: 100%;
}

header .logo {
Expand All @@ -17,65 +24,130 @@ header .logo {
}

main {
width: 100%;
max-width: 600px;
padding: 20px;

}

h1 {
color: #333;
main h1 {
color: #ffffff;
text-align: center;
font-size: 40px;
}
main p {
color: #ccc;
font-size: 16px;
}

form {
background: white;
background: #3fbcc051;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
margin: auto;
width: 100%;
max-width: 570px;
}

.form-section {
margin-bottom: 20px;
margin-left: 8px;
margin-top: 6px;
}

label {
display: block;
margin-bottom: 5px;
color: white;
font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea,
input[type="tel"], input[type="date"],
textarea {
width: 90%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
select {
width: 100%;
width: 94%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}

textarea {
height: 100px;
}

button {
background-color: #007074d5;
background-color:#0b8080;
color: white;
padding: 15px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
width: 100%;
max-width: 200px;
margin: 10px auto;
display: block;
}

button:hover {
background-color: #3fbcc0a4;
background-color: #026062;
transform: translateY(2px);
}

.contact-info-doc {
/* .contact-info-doc {
padding: 20px;
background-color: #f1f1f1;
margin-top: 20px;
border-radius: 5px;
text-align: center;
width: 100%;
max-width: 600px;
} */
#preview-section {
display: flex;
justify-content: center;
align-items: center;
margin-top: 20px;
background: #055653d5;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#preview-section h2 {
color: #ffffff;
text-align: center;
font-size: 33px;
}

#preview-details p {
color: #000 !important;

}

.contact-info-doc {
color: #000;
margin-top: 40px;
background-color: #cfcece;
padding: 20px;
border-radius: 5px;
width: 100%;
max-width: 100vw;
box-sizing: border-box;
text-align: center;
}

.contact-info-doc h2 {
margin-bottom: 15px;
}

footer {
Expand All @@ -102,3 +174,29 @@ footer ul li a {
color: white;
text-decoration: none;
}

@media (max-width: 768px) {
form {
padding: 15px;
}

input[type="date"] {
width: 100%;
}
}

@media (max-width: 600px) {
main h1 {
font-size: 30px;
}

button {
padding: 12px 16px;
}
}

@media (max-width: 480px) {
main p {
font-size: 14px;
}
}
21 changes: 15 additions & 6 deletions Html-Files/appointScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ document.addEventListener("DOMContentLoaded", function() {
const doctorSelect = document.getElementById('doctor-select');
const appointmentDate = document.getElementById('appointment-date');
const timeSlotsDiv = document.getElementById('time-slots');

existingPatientCheckbox.addEventListener('change', function() {
if (this.checked) {
patientIdInput.style.display = 'block';
Expand All @@ -21,14 +20,15 @@ document.addEventListener("DOMContentLoaded", function() {
const formData = new FormData(appointmentForm);

let details = `
<strong>Doctor:</strong> ${formData.get('doctor')}<br>
<strong>Date:</strong> ${formData.get('date')}<br>
<strong>Time:</strong> ${formData.get('time-slot')}<br>
<strong>Name:</strong> ${formData.get('full-name')}<br>
<strong>Date of Birth:</strong> ${formData.get('dob')}<br>
<strong>Email:</strong> ${formData.get('email')}<br>
<strong>Phone:</strong> ${formData.get('phone')}<br>
<strong>Reason for Visit:</strong> ${formData.get('reason')}<br>
<strong>Phone:</strong> ${formData.get('phone')}<br><br>
<strong>Doctor:</strong> ${formData.get('doctor')}<br>
<strong>Appointment Date:</strong> ${formData.get('date')}<br>
<strong>Time:</strong> ${formData.get('time-slot')}<br>
<strong>Reason for Visit:</strong> ${formData.get('reason')}<br><br>
<strong>Existing Patient:</strong> ${formData.get('existing-patient') ? 'Yes' : 'No'}<br>
<strong>Patient ID:</strong> ${formData.get('patient-id')}
`;
Expand All @@ -51,5 +51,14 @@ document.addEventListener("DOMContentLoaded", function() {
previewSection.style.display = 'none';
appointmentForm.style.display = 'block';
};
function togglePatientID() {
const patientID = document.getElementById('patient-id');
const existingPatient = document.getElementById('existing-patient');
if (existingPatient.checked) {
patientID.style.display = 'block';
} else {
patientID.style.display = 'none';
}
};
});

104 changes: 59 additions & 45 deletions Html-Files/appointment.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,78 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Book an Appointment</title>
<link rel="shortcut icon" href="/assets/img/favi-Appoint.png" type="image/x-icon" >
<link rel="stylesheet" href="./Css-Files/appointStyle.css">
<style>#progressBar {
position: fixed;
top: 0;
left: 0;
width: 0%;
height: 8px;
background-color: #3fbcc0;
z-index: 9999;

}</style>
<style>
#progressBar {
position: fixed;
top: 0;
left: 0;
width: 0%;
height: 8px;
background-color: #3fbcc0;
z-index: 9999;
}
</style>
</head>
<body>
<div id="progressBar"></div>
<script>
window.onscroll = function () {
var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
var scrolled = (winScroll / height) * 100;
document.getElementById("progressBar").style.width = scrolled + "%";
};
window.onscroll = function () {
var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
var scrolled = (winScroll / height) * 100;
document.getElementById("progressBar").style.width = scrolled + "%";
};
</script>
<header>
<div class="logo">Doctor's Clinic</div>
</header>

<main>
<h1>Book an Appointment</h1>
<p>Schedule your visit with our expert doctors easily.</p>
<p>Conveniently Connect with the Healthcare Experts!</p>

<form id="appointment-form">
<div class="form-section">
<label for="doctor-select">Select a Doctor:</label>
<label for="full-name">Full Name</label>
<input type="text" id="full-name" name="full-name" placeholder="Enter your name" required>
</div>

<div class="form-section">
<label for="dob">Date of Birth :
<input type="date" id="dob" name="dob" required></label>
</div>

<div class="form-section">
<label for="email">Email Address</label>
<input type="email" id="email" name="email" placeholder="[email protected]" required>
</div>

<div class="form-section">
<label for="phone">Phone Number</label>
<input type="tel" id="phone" name="phone" placeholder="Enter your phone number" required>
</div>

<div class="form-section">
<label for="doctor-select">Select a Doctor</label>
<select id="doctor-select" name="doctor">
<option value="doctor1">Dr. Vikas Chopra - Cardiologist</option>
<option value="doctor2">Dr. Ajay Aggarwal - Cardiologist</option>
<option value="doctor3">Dr. Soni Gupta - Dermatologist</option>
<option value="doctor4">Dr. Jayant Jaswal - ENT Specialist</option>
<option value="" disabled selected>Select a Doctor</option>
<option value="Dr. Vikas Chopra">Dr. Vikas Chopra - Cardiologist</option>
<option value="Dr. Ajay Aggarwal">Dr. Ajay Aggarwal - Cardiologist</option>
<option value="Dr. Soni Gupta">Dr. Soni Gupta - Dermatologist</option>
<option value="Dr. Jayant Jaswal">Dr. Jayant Jaswal - ENT Specialist</option>
</select>
</div>

<div class="form-section">
<label for="appointment-date">Choose a Date:</label>
<input type="date" id="appointment-date" name="date" required>
<label for="appointment-date">Appointment :&nbsp;
<input type="date" id="appointment-date" name="date" required></label>

</div>

<div class="form-section">
<label for="time-slot">Select a Time:</label>
<label for="time-slot">Select a Time</label>
<select id="time-slot" name="time-slot" required>
<option value="10:00 AM">10:00 AM</option>
<option value="11:00 AM">11:00 AM</option>
Expand All @@ -62,36 +86,26 @@ <h1>Book an Appointment</h1>
</div>

<div class="form-section">
<label for="full-name">Full Name:</label>
<input type="text" id="full-name" name="full-name" required>

<label for="dob">Date of Birth:</label>
<input type="date" id="dob" name="dob" required>

<label for="email">Email Address:</label>
<input type="email" id="email" name="email" required>

<label for="phone">Phone Number:</label>
<input type="tel" id="phone" name="phone" required>

<label for="reason">Reason for Visit:</label>
<textarea id="reason" name="reason" required></textarea>
<label for="reason">Reason for Visit</label>
<textarea id="reason" name="reason" placeholder="Enter your reason for visit..." required></textarea>
</div>

<div class="form-section">
<label>
<input type="checkbox" name="existing-patient" id="existing-patient">
Existing Patient
<input type="checkbox" name="existing-patient" id="existing-patient" onchange="togglePatientID()">
Existing Patient?
</label>
<input type="text" id="patient-id" name="patient-id" placeholder="Patient ID" style="display:none;">
<input type="text" id="patient-id" name="patient-id" placeholder="Enter Patient ID" style="display:none;">
</div>

<button type="button" onclick="previewAppointment()">Preview Appointment</button>
</form>

<div id="preview-section" style="display:none;">
<h2>Preview Appointment Details</h2>
<h2>Appointment Details</h2>
<p id="preview-details"></p>
<button type="button" onclick="confirmAppointment()">Submit</button>
<button type="button" onclick="editAppointment()">Edit</button>
<button type="button" onclick="confirmAppointment()" style="display: inline;">Submit</button>
<button type="button" onclick="editAppointment()" style="display: inline;">Edit</button>
</div>
</main>

Expand Down
Loading

0 comments on commit 5a68ce5

Please sign in to comment.