File size: 2,800 Bytes
1c9424e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>{% block title %}Student Data Entry System{% endblock %}</title>
  <link rel="preconnect" href="https://fonts.googleapis.com" />
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
  <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap" rel="stylesheet" />
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" />
  <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}" />
</head>
<body>

{% if session.user %}
<!-- ── NAVBAR ── -->
<nav class="navbar">
  <div class="nav-brand">
    <span class="nav-logo"><i class="fas fa-graduation-cap"></i></span>
    <span class="nav-title">StudentMS</span>
  </div>

  <button class="nav-toggle" id="navToggle" aria-label="Menu">
    <i class="fas fa-bars"></i>
  </button>

  <ul class="nav-links" id="navLinks">
    <li><a href="{{ url_for('dashboard') }}"    class="{% if request.endpoint=='dashboard'    %}active{% endif %}"><i class="fas fa-chart-pie"></i> Dashboard</a></li>
    <li><a href="{{ url_for('add_student') }}"  class="{% if request.endpoint=='add_student'  %}active{% endif %}"><i class="fas fa-user-plus"></i> Add Student</a></li>
    <li><a href="{{ url_for('view_students') }}" class="{% if request.endpoint=='view_students' %}active{% endif %}"><i class="fas fa-table"></i> All Students</a></li>
    <li class="nav-divider"></li>
    <li>
      <a href="{{ url_for('logout') }}" class="btn-logout">
        <i class="fas fa-sign-out-alt"></i> Logout
      </a>
    </li>
  </ul>

  <div class="nav-user">
    <i class="fas fa-user-shield"></i>
    <span>{{ session.user }}</span>
  </div>
</nav>
{% endif %}

<!-- ── FLASH MESSAGES ── -->
<div class="flash-container">
  {% with messages = get_flashed_messages(with_categories=true) %}
    {% if messages %}
      {% for category, message in messages %}
        <div class="alert alert-{{ category }}">
          <i class="fas {% if category=='success' %}fa-circle-check{% elif category=='danger' %}fa-circle-exclamation{% elif category=='warning' %}fa-triangle-exclamation{% else %}fa-circle-info{% endif %}"></i>
          {{ message }}
          <button class="alert-close" onclick="this.parentElement.remove()">Γ—</button>
        </div>
      {% endfor %}
    {% endif %}
  {% endwith %}
</div>

<!-- ── PAGE CONTENT ── -->
<main class="{% if session.user %}main-content{% endif %}">
  {% block content %}{% endblock %}
</main>

<script src="{{ url_for('static', filename='js/script.js') }}"></script>
</body>
</html>