Meta Description" name="description" />
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Al-Shafay Dental Care Clinic</title>
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
</head>
<body>
<!-- Header -->
<header class="header">
<div class="header-content">
<div class="logo">
<i class="fas fa-tooth"></i>
<h1>Al-Shafay Dental Care</h1>
</div>
<p class="tagline">Your Smile, Our Priority</p>
</div>
</header>
<!-- Main Container -->
<div class="container">
<!-- Welcome Section -->
<div class="welcome-section">
<div class="welcome-card">
<i class="fas fa-user-md"></i>
<h2>Welcome to Al-Shafay Dental Care Clinic</h2>
<p>Complete Dental Solutions for Your Family</p>
</div>
</div>
<!-- Navigation Buttons -->
<div class="nav-grid">
<!-- Patient Record Button -->
<div class="nav-card" onclick="showSection('patientRecord')">
<div class="icon-circle blue">
<i class="fas fa-users"></i>
</div>
<h3>Patient Record</h3>
<p>Manage patient information</p>
</div>
<!-- Schedule Appointment Button -->
<div class="nav-card" onclick="showSection('appointment')">
<div class="icon-circle green">
<i class="fas fa-calendar-check"></i>
</div>
<h3>Schedule Appointment</h3>
<p>Book dental appointments</p>
</div>
<!-- Dental Details Button -->
<div class="nav-card" onclick="showSection('dentalDetails')">
<div class="icon-circle purple">
<i class="fas fa-clipboard-list"></i>
</div>
<h3>Dental Details</h3>
<p>Treatment and dental info</p>
</div>
<!-- Maps Button -->
<div class="nav-card" onclick="showSection('maps')">
<div class="icon-circle orange">
<i class="fas fa-map-marker-alt"></i>
</div>
<h3>Location Maps</h3>
<p>Find our clinic location</p>
</div>
<!-- Upload Patient File Button -->
<div class="nav-card" onclick="showSection('uploadFile')">
<div class="icon-circle red">
<i class="fas fa-file-upload"></i>
</div>
<h3>Upload Patient File</h3>
<p>Upload medical documents</p>
</div>
</div>
<!-- Sections -->
<div id="patientRecord" class="section">
<div class="section-header">
<h2><i class="fas fa-users"></i> Patient Record</h2>
<button class="btn-close" onclick="hideSections()">×</button>
</div>
<div class="form-container">
<form id="patientForm">
<div class="form-grid">
<input type="text" id="patientName" placeholder="Patient Name" required>
<input type="number" id="patientAge" placeholder="Age" required>
<input type="text" id="patientPhone" placeholder="Phone Number" required>
<input type="text" id="patientAddress" placeholder="Address">
</div>
<button type="submit" class="btn-submit">Add Patient</button>
</form>
<div id="patientList" class="list-container"></div>
</div>
</div>
<div id="appointment" class="section">
<div class="section-header">
<h2><i class="fas fa-calendar-check"></i> Schedule Appointment</h2>
<button class="btn-close" onclick="hideSections()">×</button>
</div>
<div class="form-container">
<form id="appointmentForm">
<div class="form-grid">
<input type="text" id="apptPatientName" placeholder="Patient Name" required>
<input type="tel" id="apptPhone" placeholder="Phone Number" required>
<input type="date" id="apptDate" required>
<select id="apptTime" required>
<option value="">Select Time</option>
<option value="09:00 AM">09:00 AM</option>
<option value="10:00 AM">10:00 AM</option>
<option value="11:00 AM">11:00 AM</option>
<option value="12:00 PM">12:00 PM</option>
<option value="02:00 PM">02:00 PM</option>
<option value="03:00 PM">03:00 PM</option>
<option value="04:00 PM">04:00 PM</option>
<option value="05:00 PM">05:00 PM</option>
</select>
<select id="apptDoctor" required>
<option value="">Select Doctor</option>
<option value="Dr. Ahmed Khan">Dr. Ahmed Khan</option>
<option value="Dr. Sara Ali">Dr. Sara Ali</option>
<option value="Dr. Muhammad Usman">Dr. Muhammad Usman</option>
</select>
</div>
<textarea id="apptReason" placeholder="Reason for visit (optional)"></textarea>
<button type="submit" class="btn-submit">Book Appointment</button>
</form>
<div id="appointmentList" class="list-container"></div>
</div>
</div>
<div id="dentalDetails" class="section">
<div class="section-header">
<h2><i class="fas fa-clipboard-list"></i> Dental Details</h2>
<button class="btn-close" onclick="hideSections()">×</button>
</div>
<div class="dental-info">
<div class="info-card">
<i class="fas fa-tooth"></i>
<h4>Dental Checkup</h4>
<p>Regular dental examination and cleaning</p>
</div>
<div class="info-card">
<i class="fas fa-teeth"></i>
<h4>Teeth Whitening</h4>
<p>Professional teeth whitening treatment</p>
</div>
<div class="info-card">
<i class="fas fa-braces"></i>
<h4>Orthodontics</h4>
<p>Braces and aligners for teeth straightening</p>
</div>
<div class="info-card">
<i class="fas fa-syringe"></i>
<h4>Root Canal</h4>
<p>Advanced root canal treatment</p>
</div>
<div class="info-card">
<i class="fas fa-crown"></i>
<h4>Crowns & Bridges</h4>
<p>Dental crowns and bridge work</p>
</div>
<div class="info-card">
<i class="fas fa-baby"></i>
<h4>Pediatric Dentistry</h4>
<p>Specialized dental care for children</p>
</div>
</div>
</div>
<div id="maps" class="section">
<div class="section-header">
<h2><i class="fas fa-map-marker-alt"></i> Clinic Location</h2>
<button class="btn-close" onclick="hideSections()">×</button>
</div>
<div class="map-container">
<iframe
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3400.0!2d74.35!3d31.52!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zMzHCsDMxJzEyLjAiTiA3NMKwMjEnMDAuMCJF!5e0!3m2!1sen!2s!4v1234567890"
width="100%"
height="400"
style="border:0;"
allowfullscreen=""
loading="lazy">
</iframe>
<div class="address-card">
<i class="fas fa-building"></i>
<h3>Al-Shafay Dental Care Clinic</h3>
<p><i class="fas fa-location-dot"></i> Main Boulevard, Lahore, Pakistan</p>
<p><i class="fas fa-phone"></i> +92-300-1234567</p>
<p><i class="fas fa-envelope"></i> info@alshafaydental.com</p>
</div>
</div>
</div>
<div id="uploadFile" class="section">
<div class="section-header">
<h2><i class="fas fa-file-upload"></i> Upload Patient File</h2>
<button class="btn-close" onclick="hideSections()">×</button>
</div>
<div class="upload-container">
<div class="upload-area" id="uploadArea">
<i class="fas fa-cloud-upload-alt"></i>
<h3>Drag & Drop Files Here</h3>
<p>or</p>
<button class="btn-upload" onclick="document.getElementById('fileInput').click()">
Browse Files
</button>
<input type="file" id="fileInput" multiple hidden>
</div>
<div id="fileList" class="list-container"></div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="footer">
<p>© 2024 Al-Shafay Dental Care Clinic. All Rights Reserved.</p>
</footer>
<script src="script.js"></script>
</body>
</html>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Poppins', sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
}
/* Header Styles */
.header {
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
color: white;
padding: 20px;
text-align: center;
box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.header-content {
max-width: 1200px;
margin: 0 auto;
}
.logo {
display: flex;
align-items: center;
justify-content: center;
gap: 15px;
margin-bottom: 10px;
}
.logo i {
font-size: 40px;
color: #ffd700;
}
.logo h1 {
font-size: 32px;
font-weight: 700;
}
.tagline {
font-size: 16px;
opacity: 0.9;
letter-spacing: 2px;
}
/* Container */
.container {
max-width: 1200px;
margin: 30px auto;
padding: 0 20px;
}
/* Welcome Section */
.welcome-section {
margin-bottom: 30px;
}
.welcome-card {
background: white;
border-radius: 15px;
padding: 30px;
text-align: center;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.welcome-card i {
font-size: 50px;
color: #2a5298;
margin-bottom: 15px;
}
.welcome-card h2 {
color: #333;
margin-bottom: 10px;
}
.welcome-card p {
color: #666;
}
/* Navigation Grid */
.nav-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
margin-bottom: 30px;
}
.nav-card {
background: white;
border-radius: 15px;
padding: 25px;
text-align: center;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.nav-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.icon-circle {
width: 70px;
height: 70px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 15px;
}
.icon-circle i {
font-size: 30px;
color: white;
}
.blue { background: linear-gradient(135deg, #667eea, #764ba2); }
.green { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.purple { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.orange { background: linear-gradient(135deg, #f093fb, #f5576c); }
.red { background: linear-gradient(135deg, #fa709a, #fee140); }
.nav-card h3 {
color: #333;
margin-bottom: 8px;
font-size: 18px;
}
.nav-card p {
color: #666;
font-size: 13px;
}
/* Sections */
.section {
display: none;
background: white;
border-radius: 15px;
padding: 30px;
margin-bottom: 30px;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
animation: slideIn 0.3s ease;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 25px;
padding-bottom: 15px;
border-bottom: 2px solid #f0f0f0;
}
.section-header h2 {
color: #2a5298;
}
.btn-close {
background: #f5576c;
color: white;
border: none;
width: 35px;
height: 35px;
border-radius: 50%;
font-size: 20px;
cursor: pointer;
transition: all 0.3s;
}
.btn-close:hover {
background: #e74c3c;
transform: rotate(90deg);
}
/* Form Styles */
.form-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px;
margin-bottom: 20px;
}
input, select, textarea {
padding: 12px;
border: 2px solid #e0e0e0;
border-radius: 8px;
font-size: 14px;
transition: all 0.3s;
}
input:focus, select:focus, textarea:focus {
outline: none;
border-color: #2a5298;
box-shadow: 0 0 0 3px rgba(42,82,152,0.1);
}
textarea {
width: 100%;
height: 100px;
margin-bottom: 20px;
resize: vertical;
}
.btn-submit {
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
border: none;
padding: 12px 30px;
border-radius: 8px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
}
.btn-submit:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}
/* List Container */
.list-container {
margin-top: 25px;
}
.list-item {
background: #f8f9fa;
border-left: 4px solid #2a5298;
padding: 15px;
margin-bottom: 10px;
border-radius: 5px;
display: flex;
justify-content: space-between;
align-items: center;
}
.list-item button {
background: #f5576c;
color: white;
border: none;
padding: 8px 15px;
border-radius: 5px;
cursor: pointer;
}
/* Dental Info */
.dental-info {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
}
.info-card {
background: #f8f9fa;
padding: 25px;
border-radius: 10px;
text-align: center;
transition: all 0.3s;
}
.info-card:hover {
background: #2a5298;
color: white;
transform: translateY(-5px);
}
.info-card i {
font-size: 40px;
margin-bottom: 15px;
color: #2a5298;
}
.info-card:hover i {
color: #ffd700;
}
/* Map Container */
.map-container {
position: relative;
}
.address-card {
background: #f8f9fa;
padding: 20px;
border-radius: 10px;
margin-top: 20px;
}
.address-card h3 {
color: #2a5298;
margin-bottom: 15px;
}
.address-card p {
margin-bottom: 10px;
color: #666;
}
.address-card i {
color: #2a5298;
margin-right: 8px;
}
/* Upload Container */
.upload-area {
border: 3px dashed #ccc;
border-radius: 15px;
padding: 50px 20px;
text-align: center;
transition: all 0.3s;
}
.upload-area:hover {
border-color: #2a5298;
background: #f8f9fa;
}
.upload-area i {
font-size: 60px;
color: #2a5298;
margin-bottom: 20px;
}
.btn-upload {
background: #2a5298;
color: white;
border: none;
padding: 12px 25px;
border-radius: 8px;
font-size: 16px;
cursor: pointer;
margin-top: 15px;
}
/* Footer */
.footer {
background: #1e3c72;
color: white;
text-align: center;
padding: 20px;
margin-top: 50px;
}
/* Responsive Design */
@media (max-width: 768px) {
.nav-grid {
grid-template-columns: repeat(2, 1fr);
}
.logo h1 {
font-size: 24px;
}
.form-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 480px) {
.nav-grid {
grid-template-columns: 1fr;
}
.container {
padding: 0 10px;
}
}
// Show/Hide Sections
function showSection(sectionId) {
// Hide all sections
const sections = document.querySelectorAll('.section');
sections.forEach(section => {
section.style.display = 'none';
});
// Show selected section
document.getElementById(sectionId).style.display = 'block';
// Scroll to section
document.getElementById(sectionId).scrollIntoView({
behavior: 'smooth'
});
}
function hideSections() {
const sections = document.querySelectorAll('.section');
sections.forEach(section => {
section.style.display = 'none';
});
}
// Patient Record Management
let patients = JSON.parse(localStorage.getItem('patients')) || [];
document.getElementById('patientForm').addEventListener('submit', function(e) {
e.preventDefault();
const patient = {
id: Date.now(),
name: document.getElementById('patientName').value,
age: document.getElementById('patientAge').value,
phone: document.getElementById('patientPhone').value,
address: document.getElementById('patientAddress').value,
date: new Date().toLocaleDateString()
};
patients.push(patient);
localStorage.setItem('patients', JSON.stringify(patients));
this.reset();
displayPatients();
alert('Patient added successfully!');
});
function displayPatients() {
const patientList = document.getElementById('patientList');
if (patients.length === 0) {
patientList.innerHTML = '<p style="text-align:center;color:#666;">No patients added yet.</p>';
return;
}
patientList.innerHTML = patients.map(patient => `
<div class="list-item">
<div>
<strong>${patient.name}</strong> (Age: ${patient.age})<br>
<small>📞 ${patient.phone} | 📍 ${patient.address || 'N/A'}</small>
<small> | 📅 ${patient.date}</small>
</div>
<button onclick="deletePatient(${patient.id})">Delete</button>
</div>
`).join('');
}
function deletePatient(id) {
patients = patients.filter(p => p.id !== id);
localStorage.setItem('patients', JSON.stringify(patients));
displayPatients();
}
// Appointment Management
let appointments = JSON.parse(localStorage.getItem('appointments')) || [];
document.getElementById('appointmentForm').addEventListener('submit', function(e) {
e.preventDefault();
const appointment = {
id: Date.now(),
patientName: document.getElementById('apptPatientName').value,
phone: document.getElementById('apptPhone').value,
date: document.getElementById('apptDate').value,
time: document.getElementById('apptTime').value,
doctor: document.getElementById('apptDoctor').value,
reason: document.getElementById('apptReason').value
};
appointments.push(appointment);
localStorage.setItem('appointments', JSON.stringify(appointments));
this.reset();
displayAppointments();
alert('Appointment booked successfully!');
});
function displayAppointments() {
const appointmentList = document.getElementById('appointmentList');
if (appointments.length === 0) {
appointmentList.innerHTML = '<p style="text-align:center;color:#666;">No appointments scheduled.</p>';
return;
}
appointmentList.innerHTML = appointments.map(appt => `
<div class="list-item">
<div>
<strong>${appt.patientName}</strong> - ${appt.doctor}<br>
<small>📅 ${appt.date} | ⏰ ${appt.time}</small>
<small> | 📞 ${appt.phone}</small>
${appt.reason ? `<br><small>📋 ${appt.reason}</small>` : ''}
</div>
<button onclick="deleteAppointment(${appt.id})">Delete</button>
</div>
`).join('');
}
function deleteAppointment(id) {
appointments = appointments.filter(a => a.id !== id);
localStorage.setItem('appointments', JSON.stringify(appointments));
displayAppointments();
}
// File Upload
let uploadedFiles = [];
document.getElementById('fileInput').addEventListener('change', function(e) {
const files = e.target.files;
for (let file of files) {
uploadedFiles.push({
name: file.name,
size: (file.size / 1024).toFixed(2) + ' KB',
type: file.type,
date: new Date().toLocaleDateString()
});
}
displayFiles();
});
function displayFiles() {
const fileList = document.getElementById('fileList');
if (uploadedFiles.length === 0) {
fileList.innerHTML = '<p style="text-align:center;color:#666;">No files uploaded.</p>';
return;
}
fileList.innerHTML = uploadedFiles.map((file, index) => `
<div class="list-item">
<div>
<strong>📄 ${file.name}</strong><br>
<small>Size: ${file.size} | Type: ${file.type} | Date: ${file.date}</small>
</div>
<button onclick="deleteFile(${index})">Delete</button>
</div>
`).join('');
}
function deleteFile(index) {
uploadedFiles.splice(index, 1);
displayFiles();
}
// Drag and Drop functionality
const uploadArea = document.getElementById('uploadArea');
uploadArea.addEventListener('dragover', function(e) {
e.preventDefault();
this.style.borderColor = '#2a5298';
this.style.background = '#f8f9fa';
});
uploadArea.addEventListener('dragleave', function(e) {
e.preventDefault();
this.style.borderColor = '#ccc';
this.style.background = 'white';
});
uploadArea.addEventListener('drop', function(e) {
e.preventDefault();
this.style.borderColor = '#ccc';
this.style.background = 'white';
const files = e.dataTransfer.files;
for (let file of files) {
uploadedFiles.push({
name: file.name,
size: (file.size / 1024).toFixed(2) + ' KB',
type: file.type,
date: new Date().toLocaleDateString()
});
}
displayFiles();
});
// Initialize on page load
window.onload = function() {
displayPatients();
displayAppointments();
displayFiles();
};57
7
882KB
2462KB
310.0ms
376.0ms
798.0ms