Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
73 changes: 73 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Class Timetable</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1 class="title">Timetable</h1>
<table class="timetable">
<thead>
<tr>
<th>Time</th>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
</tr>
</thead>
<tbody>
<tr>
<td>9-10 AM</td>
<td onclick="showTeacher('PROGRAMMING BASICS')">Programming Basics</td>
<td onclick="showTeacher('DATABASE SYSTEMS')">Database Systems</td>
<td onclick="showTeacher('NETWORKING')">Networking</td>
<td onclick="showTeacher('WEB DEVELOPMENT')">Web Development</td>
<td onclick="showTeacher('SOFTWARE TESTING')">Software Testing</td>
</tr>
<tr>
<td>10-11 AM</td>
<td onclick="showTeacher('PROGRAMMING LAB')">Programming Lab</td>
<td onclick="showTeacher('DATABASE SYSTEMS LAB')">Database Systems Lab</td>
<td onclick="showTeacher('NETWORKING')">Networking</td>
<td onclick="showTeacher('WEB DEVELOPMENT LAB')">Web Development Lab</td>
<td onclick="showTeacher('SOFTWARE TESTING')">Software Testing</td>
</tr>
<tr>
<td>11-12 PM</td>
<td onclick="showTeacher('PROGRAMMING BASICS')">Programming Basics</td>
<td onclick="showTeacher('DATABASE SYSTEMS')">Database Systems</td>
<td onclick="showTeacher('NETWORKING LAB')">Networking Lab</td>
<td onclick="showTeacher('WEB DEVELOPMENT')">Web Development</td>
<td onclick="showTeacher('SOFTWARE TESTING')">Software Testing</td>
</tr>
<tr>
<td>12-1 PM</td>
<td onclick="showTeacher('Lunch')" colspan="5" class="lunch">Lunch Break</td>
</tr>
<tr>
<td>1-2 PM</td>
<td onclick="showTeacher('DATABASE SYSTEMS')">Database Systems</td>
<td onclick="showTeacher('PROGRAMMING BASICS')">Programming Basics</td>
<td onclick="showTeacher('SOFTWARE TESTING')">Software Testing</td>
<td onclick="showTeacher('WEB DEVELOPMENT')">Web Development</td>
<td onclick="showTeacher('NETWORKING')">Networking</td>
</tr>
</tbody>
</table>
</div>

<div id="teacher" class="modal">
<div class="content">
<span class="close" onclick="closeModal()">&times;</span>
<p id="details"></p>
</div>
</div>

<script src="script.js"></script>
</body>
</html>
28 changes: 28 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
function showTeacher(subject) {
const teacher = {
'PROGRAMMING BASICS': '<b>Prof. Ram Kumar</b><br>Email: ram_kumar@btech.edu<br>Room: B-101, Contact: 9991234567',
'DATABASE SYSTEMS': '<b>Prof. Shalini Mehta</b><br>Email: shalini_mehta@btech.edu<br>Room: B-102, Contact: 9987654321',
'NETWORKING': '<b>Prof. Amit Kumar</b><br>Email: amit_kumar@btech.edu<br>Room: B-103, Contact: 9976543210',
'WEB DEVELOPMENT': '<b>Prof. Nisha Gupta</b><br>Email: nisha_gupta@btech.edu<br>Room: B-104, Contact: 9965432109',
'SOFTWARE TESTING': '<b>Prof. Rakesh Sharma</b><br>Email: rakesh_sharma@btech.edu<br>Room: B-105, Contact: 9954321098',
'PROGRAMMING LAB': '<b>Prof. Anil Raj</b><br>Email: anil_raj@btech.edu<br>Lab: L-201, Contact: 9943210987',
'DATABASE SYSTEMS LAB': '<b>Prof. Priya Singh</b><br>Email: priya_singh@btech.edu<br>Lab: L-202, Contact: 9932109876',
'NETWORKING LAB': '<b>Prof. Sunil Kumar</b><br>Email: sunil_kumar@btech.edu<br>Lab: L-203, Contact: 9921098765',
'WEB DEVELOPMENT LAB': '<b>Prof. Seema Verma</b><br>Email: seema_verma@btech.edu<br>Lab: L-204, Contact: 9910987654',
'Lunch': '<b>Enjoy your Lunch Break!</b>'
};

document.getElementById('details').innerHTML = teacher[subject];
document.getElementById('teacher').style.display = 'flex';
}

function closeModal() {
document.getElementById('teacher').style.display = 'none';
}

window.onclick = function(event) {
const modal = document.getElementById('teacher');
if (event.target == modal) {
modal.style.display = 'none';
}
}
82 changes: 82 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
body {
background-color: #f0f4f8;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 0;
}

.container {
width: 80%;
margin: 50px auto;
padding: 20px;
background-color: #fefefe;
border-radius: 10px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.title {
text-align: center;
color: #2c3e50;
margin-bottom: 20px;
font-size: 28px;
}

.timetable {
width: 100%;
border-collapse: collapse;
font-size: 16px;
}

.timetable th {
background-color: #34495e;
color: #fff;
padding: 15px;
border: 1px solid #ddd;
}

.timetable td {
padding: 15px;
border: 1px solid #ddd;
text-align: center;
cursor: pointer;
}

.lunch {
background-color: #bdc3c7;
font-weight: bold;
}

.timetable tbody tr:hover td {
background-color: #ecf0f1;
}

.modal {
display: none;
position: fixed;
z-index: 1;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
justify-content: center;
align-items: center;
}

.content {
background-color: #fff;
padding: 20px;
border-radius: 10px;
width: 50%;
text-align: center;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.close {
position: absolute;
top: 10px;
right: 20px;
font-size: 24px;
cursor: pointer;
color: #e74c3c;
}