academy/resources/views/layouts/studentportalnav.blade.php

276 lines
8.0 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Responsive Student Portal</title>
<!-- Font Awesome Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
/* Global Root Variables */
:root {
--primary: #2c3e50;
--background: #f8f9fa;
--sidebar-width: 260px;
--text-color: #333;
--sidebar-bg: #744a68;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: var(--background);
color: var(--text-color);
display: flex;
min-height: 100vh;
overflow-x: hidden;
}
/* ---------- Sidebar Style ---------- */
.sidebar {
width: var(--sidebar-width);
height: 100vh;
background: var(--sidebar-bg);
color: #fff;
position: fixed;
top: 0;
left: 0;
padding: 24px 0;
transition: all 0.3s ease;
z-index: 1030;
display: flex;
flex-direction: column;
}
.sidebar .brand {
padding: 0 24px 24px;
font-weight: 700;
font-size: 1.2rem;
border-bottom: 1px solid rgba(255,255,255,.12);
margin-bottom: 12px;
display: flex;
align-items: center;
}
.sidebar .nav {
display: flex;
flex-direction: column;
flex-grow: 1;
overflow-y: auto; /* Enables scrolling inside sidebar if menu items overflow */
}
.sidebar .nav-link {
color: rgba(255,255,255,.75);
padding: 14px 24px;
font-size: .95rem;
display: flex;
align-items: center;
gap: 12px;
transition: .2s;
border-left: 3px solid transparent;
text-decoration: none;
}
.sidebar .nav-link i {
width: 20px;
text-align: center;
}
.sidebar .nav-link:hover {
background: rgba(255,255,255,.06);
color: #fff;
}
.sidebar .nav-link.active {
background: rgba(255,255,255,.1);
color: #fff;
border-left: 3px solid #fff;
font-weight: 600;
}
.sidebar .logout-link {
color: rgba(255,255,255,.6);
margin-top: auto;
}
.sidebar .logout-link:hover {
color: #fff;
background: rgba(220,53,69,.25);
}
/* ---------- Main Content Layout ---------- */
.main {
margin-left: var(--sidebar-width);
flex-grow: 1;
padding: 30px;
transition: all 0.3s ease;
min-height: 100vh;
width: calc(100% - var(--sidebar-width));
}
/* Mobile Header Toggle Bar */
.mobile-header {
display: none;
background: #fff;
padding: 15px 20px;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
align-items: center;
justify-content: space-between;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1020;
}
.sidebar-toggle {
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
color: var(--primary);
display: flex;
align-items: center;
justify-content: center;
}
.mobile-brand {
font-weight: 700;
font-size: 1.1rem;
}
/* Content container placeholder styling */
.content-body {
background: #fff;
padding: 24px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
/* Overlay Background when sidebar open on Mobile */
.sidebar-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.4);
z-index: 1025;
opacity: 0;
transition: opacity 0.3s ease;
}
.sidebar-overlay.show {
display: block;
opacity: 1;
}
/* ---------- Responsive Media Queries (Mobile & Tablets) ---------- */
@media (max-width: 991px) {
.sidebar {
left: calc(-1 * var(--sidebar-width));
}
.sidebar.show {
left: 0;
}
.main {
margin-left: 0;
padding: 90px 20px 20px 20px;
width: 100%;
}
.mobile-header {
display: flex;
}
}
</style>
</head>
<body>
<!-- Mobile Top Navigation Bar -->
<header class="mobile-header">
<button class="sidebar-toggle" id="toggleBtn" aria-label="Toggle Sidebar">
<i class="fa-solid fa-bars"></i>
</button>
<div class="mobile-brand">Student Portal</div>
<div style="width: 24px;"></div> <!-- Balancer for flex alignment -->
</header>
<!-- Overlay dim background element -->
<div class="sidebar-overlay" id="sidebarOverlay"></div>
<!-- Sidebar Navigation -->
<aside class="sidebar" id="sidebar">
<div class="brand">
<i class="fa-solid fa-graduation-cap"></i>&nbsp;&nbsp;Student Portal
</div>
<nav class="nav">
<a href="/Dashboard" class="nav-link active">
<i class="fa-solid fa-gauge"></i>Dashboard
</a>
<a href="/mycourse" class="nav-link">
<i class="fa-solid fa-book"></i>My Courses
</a>
<a href="/timetable" class="nav-link">
<i class="fa-solid fa-calendar-days"></i>Class Timetable
</a>
<a href="/Assignments" class="nav-link">
<i class="fa-solid fa-file-lines"></i>Assignments
</a>
<a href="/results" class="nav-link">
<i class="fa-solid fa-square-poll-vertical"></i>Exam Results
</a>
<a href="/Studentguidelines" class="nav-link">
<i class="fa-solid fa-credit-card"></i>Student Guidelines
</a>
<a href="/Feedback&Complain" class="nav-link">
<i class="fa-solid fa-credit-card"></i>Feedback & Complain
</a>
<a href="/StudentProfile" class="nav-link">
<i class="fa-solid fa-user"></i>Student Profile
</a>
<a href="student-portal-fixed.html" class="nav-link logout-link">
<i class="fa-solid fa-right-from-bracket"></i>Logout
</a>
</nav>
</aside>
<!-- Main Content Area -->
<main class="main">
<div class="content-body">
@yield('content')
</div>
</main>
<!-- Sidebar Toggle JavaScript -->
<script>
const toggleBtn = document.getElementById('toggleBtn');
const sidebar = document.getElementById('sidebar');
const overlay = document.getElementById('sidebarOverlay');
// Function to toggle sidebar view
toggleBtn.addEventListener('click', () => {
sidebar.classList.toggle('show');
overlay.classList.toggle('show');
});
// Close sidebar if user clicks outside of it (on the dim background overlay)
overlay.addEventListener('click', () => {
sidebar.classList.remove('show');
overlay.classList.remove('show');
});
</script>
</body>
</html>