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
15 changes: 15 additions & 0 deletions Task-01/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# FS-Task-

# For Any Doubt 💬

Reach out to *Naman* at *9149005205* Or *Parth* at *9559805577*.

## Week-1 Project Overview
Key Features: The initial version should include the following: <br>
o Feature 1: e.g., Home screen for your class timetable ( Using outlines atleast 2 teachers and subjects ) <br>
o Feature 2: e.g., Other pages like Contact Teacher and details of teacher on clicking the cell ( A new page must open ) <br>
o Feature 3: e.g., Improve UI and add ui interactions like hover, click etc <br>
Tech Stack and Tools
• Front-End: Html/Css/Bootstrap/JS, etc.

![image](https://github.com/user-attachments/assets/51ed2eea-253a-436a-b37a-25988ab6081f)
73 changes: 73 additions & 0 deletions Task-01/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 href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap" rel="stylesheet">
<link href="styles.css" rel="stylesheet">
</head>

<body class="bg-light">
<div class="container mt-5">
<h1 class="text-center mb-4 main-title">Class Timetable</h1>
<div class="table-responsive timetable-wrapper">
<table class="table table-bordered timetable">
<thead>
<tr>
<th></th>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
</tr>
</thead>
<tbody>
<tr>
<td class="hours" rowspan="5">
<div>Hours</div>
</td>
<td><a href="#" class="subject science" data-teacher="Dr. Sharma">Science</a></td>
<td><a href="#" class="subject maths" data-teacher="Mrs. Gupta">Maths</a></td>
<td><a href="#" class="subject science" data-teacher="Dr. Sharma">Science</a></td>
<td><a href="#" class="subject maths" data-teacher="Mrs. Gupta">Maths</a></td>
<td><a href="#" class="subject arts" data-teacher="Mr. Reddy">Arts</a></td>
</tr>
<tr>
<td><a href="#" class="subject social" data-teacher="Mrs. Desai">Social</a></td>
<td><a href="#" class="subject hindi" data-teacher="Mr. Patel">Hindi</a></td>
<td><a href="#" class="subject english" data-teacher="Ms. Kulkarni">English</a></td>
<td><a href="#" class="subject social" data-teacher="Mrs. Desai">Social</a></td>
<td><a href="#" class="subject sports" data-teacher="Mr. Singh">Sports</a></td>
</tr>
<tr>
<td colspan="5" class="lunch">Lunch Break</td>
</tr>
<tr>
<td><a href="#" class="subject science" data-teacher="Dr. Sharma">Science</a></td>
<td><a href="#" class="subject maths" data-teacher="Mrs. Gupta">Maths</a></td>
<td><a href="#" class="subject science" data-teacher="Dr. Sharma">Science</a></td>
<td><a href="#" class="subject maths" data-teacher="Mrs. Gupta">Maths</a></td>
<td rowspan="2" class="align-middle">
<a href="#" class="subject project" data-teacher="Mrs. Chatterjee">Project</a>
</td>
</tr>
<tr>
<td><a href="#" class="subject social" data-teacher="Mrs. Desai">Social</a></td>
<td><a href="#" class="subject hindi" data-teacher="Mr. Patel">Hindi</a></td>
<td><a href="#" class="subject english" data-teacher="Ms. Kulkarni">English</a></td>
<td><a href="#" class="subject social" data-teacher="Mrs. Desai">Social</a></td>
</tr>
</tbody>
</table>
</div>
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
<script src="script.js"></script>
</body>

</html>
51 changes: 51 additions & 0 deletions Task-01/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
document.addEventListener('DOMContentLoaded', function() {
const subjects = document.querySelectorAll('.subject');

subjects.forEach(subject => {
subject.addEventListener('click', function(e) {
e.preventDefault();
const teacher = this.getAttribute('data-teacher');
const subjectName = this.textContent;
showTeacherDetails(teacher, subjectName);
});
});
});

function showTeacherDetails(teacher, subject) {
const modalHtml = `
<div class="modal fade" id="teacherModal" tabindex="-1" aria-labelledby="teacherModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="teacherModalLabel">Teacher Details</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p><strong>Name:</strong> ${teacher}</p>
<p><strong>Subject:</strong> ${subject}</p>
<p><strong>Email:</strong> ${teacher.toLowerCase().replace(' ', '.')}@school.edu</p>
<p><strong>Phone:</strong> (91) 123456-7890</p>
</div>
</div>
</div>
</div>
`;

document.body.insertAdjacentHTML('beforeend', modalHtml);
const modal = new bootstrap.Modal(document.getElementById('teacherModal'));

modal.show();

const modalElement = document.querySelector('.modal-dialog');
modalElement.style.transform = 'scale(0.7)';
modalElement.style.opacity = '0';
setTimeout(() => {
modalElement.style.transform = 'scale(1)';
modalElement.style.opacity = '1';
modalElement.style.transition = 'all 0.3s ease-out';
}, 50);

document.getElementById('teacherModal').addEventListener('hidden.bs.modal', function () {
this.remove();
});
}
180 changes: 180 additions & 0 deletions Task-01/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
body {
font-family: 'Poppins', sans-serif;
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
min-height: 100vh;
}

.main-title {
font-weight: 600;
color: #2c3e50;
text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.timetable-wrapper {
background: white;
border-radius: 15px;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
overflow: hidden;
}

.timetable {
font-size: 0.9rem;
margin-bottom: 0;
}

.timetable th {
background-color: #3498db;
color: white;
font-weight: 600;
text-transform: uppercase;
padding: 15px;
text-align: center;
}

.timetable td {
padding: 15px;
transition: all 0.3s ease;
text-align: center;
}

.timetable tr:nth-child(even) {
background-color: #f8f9fa;
}

.timetable .hours {
width: 80px;
font-weight: 600;
background-color: #34495e;
color: white;
position: relative;
}

.timetable .hours div {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
writing-mode: vertical-rl;
text-orientation: mixed;
white-space: nowrap;
}

.timetable .lunch {
background-color: #ecf0f1;
font-weight: 600;
color: #34495e;
text-align: center;
}

.subject {
display: block;
padding: 10px;
border-radius: 5px;
color: white;
text-decoration: none;
transition: all 0.3s ease;
font-weight: 500;
}

.subject:hover {
transform: translateY(-3px);
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.science { background-color: #3498db; }
.maths { background-color: #2ecc71; }
.social { background-color: #e74c3c; }
.hindi { background-color: #f39c12; }
.english { background-color: #9b59b6; }
.arts { background-color: #1abc9c; }
.sports { background-color: #d35400; }
.project { background-color: #34495e; }

.modal-content {
border-radius: 15px;
overflow: hidden;
}

.modal-header {
background-color: #3498db;
color: white;
border-bottom: none;
}

.modal-body {
padding: 30px;
}

.modal-body p {
margin-bottom: 15px;
font-size: 1.1rem;
}

@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}

.timetable-wrapper {
animation: fadeIn 1s ease-out;
}


@media (min-width: 576px) {
.timetable {
font-size: 0.8rem;
}

.timetable td, .timetable th {
padding: 10px 5px;
}

.subject {
padding: 5px;
}
}


@media (min-width: 768px) {
.timetable {
font-size: 0.85rem;
}

.timetable td, .timetable th {
padding: 12px 8px;
}

.subject {
padding: 8px;
}
}


@media (min-width: 992px) {
.timetable {
font-size: 0.9rem;
}

.timetable td, .timetable th {
padding: 15px;
}

.subject {
padding: 10px;
}
}


@media (min-width: 1200px) {
.timetable {
font-size: 1rem;
}

.timetable td, .timetable th {
padding: 20px;
}

.subject {
padding: 12px;
}
}