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

✔️Enhanced "Complete UI Design and Alignment" of the "Appointment" Page! #828

Merged
merged 6 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
124 changes: 115 additions & 9 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,138 @@ 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,
select {
width: 100%;
width: 90%;
padding: 10px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}



input[type="date"]
{
width: 60%;
padding: 9px;
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 +182,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
Binary file added assets/img/favi-Appoint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.