huge update
This commit is contained in:
1 parent
8072284990
commit
f2c72885a6
123 files changed
+25119
-4984
No files matched your search
@@ -1,373 +0,0 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script>
|
||||
// Force cache clear for JavaScript files
|
||||
if (window.location.href.indexOf('cache=clear') === -1) {
|
||||
// Only run once to avoid redirect loop
|
||||
const allScripts = document.querySelectorAll('script[src]');
|
||||
for (const script of allScripts) {
|
||||
if (script.src.indexOf('static/js/') !== -1) {
|
||||
const originalSrc = script.src;
|
||||
script.src = originalSrc + '?v=' + new Date().getTime();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes">
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
||||
<meta http-equiv="Pragma" content="no-cache">
|
||||
<meta http-equiv="Expires" content="0">
|
||||
<title>{% block title %}Student Management System{% endblock %}</title>
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/x-icon" href="{% static 'img/favicon.ico' %}">
|
||||
|
||||
<!-- Bootstrap CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Font Awesome -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Base CSS -->
|
||||
<link rel="stylesheet" href="{% static 'css/base.css' %}">
|
||||
<!-- Custom Dashboard CSS -->
|
||||
<link href="{% static 'css/dashboard.css' %}" rel="stylesheet">
|
||||
|
||||
<!-- Common Responsive Styles -->
|
||||
<style>
|
||||
/* Base responsive styles */
|
||||
html {
|
||||
font-size: 16px;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
width: 100%;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* Responsive typography */
|
||||
@media (max-width: 768px) {
|
||||
html {
|
||||
font-size: 14px;
|
||||
}
|
||||
h1 { font-size: 1.8rem; }
|
||||
h2 { font-size: 1.5rem; }
|
||||
h3 { font-size: 1.3rem; }
|
||||
h4 { font-size: 1.1rem; }
|
||||
h5 { font-size: 1rem; }
|
||||
h6 { font-size: 0.9rem; }
|
||||
}
|
||||
|
||||
/* Responsive containers and spacing */
|
||||
@media (max-width: 768px) {
|
||||
.container, .container-fluid {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.row {
|
||||
margin-left: -10px;
|
||||
margin-right: -10px;
|
||||
}
|
||||
.col-md-6, .col-lg-3 {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.card {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.table-responsive {
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.welcome-section h2 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
.summary-card .card-body {
|
||||
padding: 0.75rem;
|
||||
}
|
||||
.bottom-nav {
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
}
|
||||
|
||||
/* Small screen optimizations */
|
||||
@media (max-width: 576px) {
|
||||
html {
|
||||
font-size: 13px;
|
||||
}
|
||||
.container-fluid {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.col-md-6, .col-lg-3 {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
.row {
|
||||
margin-left: -5px;
|
||||
margin-right: -5px;
|
||||
}
|
||||
.card {
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
.btn {
|
||||
padding: 0.375rem 0.75rem;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
.form-control {
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
.table th, .table td {
|
||||
padding: 0.5rem;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
.modal-dialog {
|
||||
margin: 0.5rem;
|
||||
}
|
||||
.toast {
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Responsive navigation */
|
||||
@media (max-width: 768px) {
|
||||
.navbar-nav {
|
||||
padding: 1rem 0;
|
||||
}
|
||||
.navbar-toggler {
|
||||
padding: 0.25rem 0.5rem;
|
||||
}
|
||||
.dropdown-menu {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Responsive forms */
|
||||
@media (max-width: 576px) {
|
||||
.form-group {
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
.form-label {
|
||||
font-size: 0.875rem;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
.form-control {
|
||||
height: calc(1.5em + 0.5rem + 2px);
|
||||
}
|
||||
}
|
||||
|
||||
/* Responsive images and media */
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* Profile picture responsive styles */
|
||||
.profile-picture-container {
|
||||
position: relative;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
background-color: #f5f5f5;
|
||||
border: 2px solid #3F51B5;
|
||||
margin-right: 1rem;
|
||||
flex-shrink: 0;
|
||||
aspect-ratio: 1;
|
||||
}
|
||||
|
||||
.profile-picture {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* Profile picture sizes */
|
||||
.profile-picture-container.profile-lg {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
}
|
||||
|
||||
.profile-picture-container.profile-md {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.profile-picture-container.profile-sm {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
/* Mobile optimizations for profile pictures */
|
||||
@media (max-width: 576px) {
|
||||
.profile-picture-container {
|
||||
border-width: 1.5px;
|
||||
}
|
||||
.profile-picture-container.profile-lg {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
.profile-picture-container.profile-md {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
.profile-picture-container.profile-sm {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Responsive embed containers */
|
||||
.embed-responsive {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.embed-responsive::before {
|
||||
display: block;
|
||||
content: "";
|
||||
}
|
||||
.embed-responsive .embed-responsive-item,
|
||||
.embed-responsive iframe,
|
||||
.embed-responsive embed,
|
||||
.embed-responsive object,
|
||||
.embed-responsive video {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0;
|
||||
}
|
||||
.embed-responsive-16by9::before {
|
||||
padding-top: 56.25%;
|
||||
}
|
||||
|
||||
/* Touch device optimizations */
|
||||
@media (hover: none) {
|
||||
.btn, .nav-link, .dropdown-item {
|
||||
padding: 0.75rem 1rem; /* Larger touch targets */
|
||||
}
|
||||
.form-control, .form-select {
|
||||
padding: 0.75rem 1rem; /* Larger input fields */
|
||||
}
|
||||
}
|
||||
|
||||
/* High contrast mode support */
|
||||
@media (prefers-contrast: high) {
|
||||
.btn, .nav-link, .dropdown-item {
|
||||
border: 2px solid currentColor;
|
||||
}
|
||||
.form-control, .form-select {
|
||||
border: 2px solid currentColor;
|
||||
}
|
||||
}
|
||||
|
||||
/* Reduced motion support */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
* {
|
||||
animation-duration: 0.01ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
scroll-behavior: auto !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{% block extrahead %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{% if messages %}
|
||||
<div class="position-fixed top-0 end-0 p-3" style="z-index: 11">
|
||||
{% for message in messages %}
|
||||
<div class="toast show" role="alert" aria-live="assertive" aria-atomic="true">
|
||||
<div class="toast-header {% if message.tags == 'error' %}bg-danger text-white{% elif message.tags == 'success' %}bg-success text-white{% else %}bg-info text-white{% endif %}">
|
||||
<strong class="me-auto">{% if message.tags == 'error' %}Error{% elif message.tags == 'success' %}Success{% else %}Info{% endif %}</strong>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="toast-body">
|
||||
{{ message }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
<!-- Bootstrap Bundle with Popper -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
<!-- Firebase SDK -->
|
||||
<script src="https://www.gstatic.com/firebasejs/9.22.0/firebase-app-compat.js"></script>
|
||||
<script src="https://www.gstatic.com/firebasejs/9.22.0/firebase-messaging-compat.js"></script>
|
||||
|
||||
<!-- Firebase Initialization -->
|
||||
<script src="{% static 'js/firebase-init.js' %}"></script>
|
||||
|
||||
<!-- Custom Dashboard Components - No type="module" -->
|
||||
<script src="{% static 'js/rating.js' %}?v={% now 'U' %}"></script>
|
||||
<script src="{% static 'js/tabs.js' %}?v={% now 'U' %}"></script>
|
||||
<script src="{% static 'js/bootstrap-init.js' %}?v={% now 'U' %}"></script>
|
||||
<script src="{% static 'js/notifications.js' %}?v={% now 'U' %}"></script>
|
||||
<script src="{% static 'js/form-validation.js' %}?v={% now 'U' %}"></script>
|
||||
<!-- Navigation JS -->
|
||||
<script src="{% static 'js/navigation.js' %}?v={% now 'U' %}"></script>
|
||||
<!-- Main Dashboard JS - Must come after all supporting scripts -->
|
||||
<script src="{% static 'js/dashboard.js' %}?v={% now 'U' %}"></script>
|
||||
|
||||
<!-- Common Modal Functions -->
|
||||
<script>
|
||||
function openLeaveModal() {
|
||||
document.getElementById('customLeaveModal').style.display = 'block';
|
||||
document.body.style.overflow = 'hidden';
|
||||
}
|
||||
|
||||
function closeLeaveModal() {
|
||||
document.getElementById('customLeaveModal').style.display = 'none';
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
|
||||
function openProfileModal() {
|
||||
document.getElementById('profileModal').style.display = 'block';
|
||||
document.body.style.overflow = 'hidden';
|
||||
}
|
||||
|
||||
function closeProfileModal() {
|
||||
document.getElementById('profileModal').style.display = 'none';
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
|
||||
function openPasswordModal() {
|
||||
document.getElementById('passwordModal').style.display = 'block';
|
||||
document.body.style.overflow = 'hidden';
|
||||
}
|
||||
|
||||
function closePasswordModal() {
|
||||
document.getElementById('passwordModal').style.display = 'none';
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
|
||||
// Auto-hide toasts
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var toasts = document.querySelectorAll('.toast');
|
||||
toasts.forEach(function(toast) {
|
||||
setTimeout(function() {
|
||||
var bsToast = new bootstrap.Toast(toast);
|
||||
bsToast.hide();
|
||||
}, 5000); // Hide after 5 seconds
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{% block extrajs %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user