File size: 10,150 Bytes
9eb790f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>EduSync Pro - Dashboard</title>
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
</head>
<body class="bg-gray-100">
    <div class="flex">
        <!-- Sidebar -->
        <div class="w-64 bg-blue-800 text-white min-h-screen p-4">
            <div class="flex items-center space-x-2 mb-8">
                <i data-feather="book-open" class="text-yellow-300"></i>
                <h1 class="text-xl font-bold">EduSync Pro</h1>
            </div>
            <nav>
                <ul class="space-y-2">
                    <li>
                        <a href="dashboard.html" class="flex items-center space-x-2 bg-blue-700 p-2 rounded">
                            <i data-feather="home"></i>
                            <span>Dashboard</span>
                        </a>
                    </li>
                    <li>
                        <a href="courses.html" class="flex items-center space-x-2 hover:bg-blue-700 p-2 rounded">
                            <i data-feather="book"></i>
                            <span>Courses</span>
                        </a>
                    </li>
                    <li>
                        <a href="attendance.html" class="flex items-center space-x-2 hover:bg-blue-700 p-2 rounded">
                            <i data-feather="calendar"></i>
                            <span>Attendance</span>
                        </a>
                    </li>
                    <li>
                        <a href="grades.html" class="flex items-center space-x-2 hover:bg-blue-700 p-2 rounded">
                            <i data-feather="award"></i>
                            <span>Grades</span>
                        </a>
                    </li>
                    <li>
                        <a href="messages.html" class="flex items-center space-x-2 hover:bg-blue-700 p-2 rounded">
                            <i data-feather="mail"></i>
                            <span>Messages</span>
                        </a>
                    </li>
                    <li>
                        <a href="settings.html" class="flex items-center space-x-2 hover:bg-blue-700 p-2 rounded">
                            <i data-feather="settings"></i>
                            <span>Settings</span>
                        </a>
                    </li>
                </ul>
            </nav>
        </div>

        <!-- Main Content -->
        <div class="flex-1 p-8">
            <header class="flex justify-between items-center mb-8">
                <h1 class="text-2xl font-bold text-gray-800">Dashboard Overview</h1>
                <div class="flex items-center space-x-4">
                    <div class="relative">
                        <i data-feather="bell" class="text-gray-600"></i>
                        <span class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-4 w-4 flex items-center justify-center">3</span>
                    </div>
                    <div class="flex items-center space-x-2">
                        <img src="http://static.photos/people/200x200/42" alt="User" class="w-8 h-8 rounded-full">
                        <span class="font-medium">Professor Smith</span>
                    </div>
                </div>
            </header>

            <!-- Stats Cards -->
            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
                <div class="bg-white p-6 rounded-lg shadow">
                    <div class="flex items-center justify-between">
                        <div>
                            <p class="text-gray-500">Active Courses</p>
                            <h3 class="text-2xl font-bold">5</h3>
                        </div>
                        <div class="p-3 bg-blue-100 rounded-full text-blue-600">
                            <i data-feather="book"></i>
                        </div>
                    </div>
                </div>
                <div class="bg-white p-6 rounded-lg shadow">
                    <div class="flex items-center justify-between">
                        <div>
                            <p class="text-gray-500">Students</p>
                            <h3 class="text-2xl font-bold">142</h3>
                        </div>
                        <div class="p-3 bg-green-100 rounded-full text-green-600">
                            <i data-feather="users"></i>
                        </div>
                    </div>
                </div>
                <div class="bg-white p-6 rounded-lg shadow">
                    <div class="flex items-center justify-between">
                        <div>
                            <p class="text-gray-500">Pending Assignments</p>
                            <h3 class="text-2xl font-bold">23</h3>
                        </div>
                        <div class="p-3 bg-yellow-100 rounded-full text-yellow-600">
                            <i data-feather="file-text"></i>
                        </div>
                    </div>
                </div>
                <div class="bg-white p-6 rounded-lg shadow">
                    <div class="flex items-center justify-between">
                        <div>
                            <p class="text-gray-500">Messages</p>
                            <h3 class="text-2xl font-bold">7</h3>
                        </div>
                        <div class="p-3 bg-purple-100 rounded-full text-purple-600">
                            <i data-feather="mail"></i>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Charts -->
            <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
                <div class="bg-white p-6 rounded-lg shadow">
                    <h3 class="font-bold text-lg mb-4">Attendance Overview</h3>
                    <canvas id="attendanceChart"></canvas>
                </div>
                <div class="bg-white p-6 rounded-lg shadow">
                    <h3 class="font-bold text-lg mb-4">Grade Distribution</h3>
                    <canvas id="gradeChart"></canvas>
                </div>
            </div>

            <!-- Recent Activity -->
            <div class="bg-white p-6 rounded-lg shadow">
                <h3 class="font-bold text-lg mb-4">Recent Activity</h3>
                <div class="space-y-4">
                    <div class="flex items-start space-x-3">
                        <div class="p-2 bg-blue-100 rounded-full text-blue-600">
                            <i data-feather="check-circle"></i>
                        </div>
                        <div>
                            <p class="font-medium">Assignment graded - CS101</p>
                            <p class="text-sm text-gray-500">15 minutes ago</p>
                        </div>
                    </div>
                    <div class="flex items-start space-x-3">
                        <div class="p-2 bg-green-100 rounded-full text-green-600">
                            <i data-feather="user-plus"></i>
                        </div>
                        <div>
                            <p class="font-medium">New student registered</p>
                            <p class="text-sm text-gray-500">2 hours ago</p>
                        </div>
                    </div>
                    <div class="flex items-start space-x-3">
                        <div class="p-2 bg-purple-100 rounded-full text-purple-600">
                            <i data-feather="message-square"></i>
                        </div>
                        <div>
                            <p class="font-medium">New message from John Doe</p>
                            <p class="text-sm text-gray-500">5 hours ago</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        feather.replace();
        
        // Attendance Chart
        const attendanceCtx = document.getElementById('attendanceChart').getContext('2d');
        const attendanceChart = new Chart(attendanceCtx, {
            type: 'bar',
            data: {
                labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May'],
                datasets: [{
                    label: 'Attendance Rate',
                    data: [85, 79, 91, 87, 94],
                    backgroundColor: 'rgba(59, 130, 246, 0.5)',
                    borderColor: 'rgba(59, 130, 246, 1)',
                    borderWidth: 1
                }]
            },
            options: {
                scales: {
                    y: {
                        beginAtZero: true
                    }
                }
            }
        });

        // Grade Chart
        const gradeCtx = document.getElementById('gradeChart').getContext('2d');
        const gradeChart = new Chart(gradeCtx, {
            type: 'pie',
            data: {
                labels: ['A', 'B', 'C', 'D', 'F'],
                datasets: [{
                    data: [25, 35, 20, 15, 5],
                    backgroundColor: [
                        'rgba(16, 185, 129, 0.5)',
                        'rgba(59, 130, 246, 0.5)',
                        'rgba(245, 158, 11, 0.5)',
                        'rgba(249, 115, 22, 0.5)',
                        'rgba(239, 68, 68, 0.5)'
                    ],
                    borderColor: [
                        'rgba(16, 185, 129, 1)',
                        'rgba(59, 130, 246, 1)',
                        'rgba(245, 158, 11, 1)',
                        'rgba(249, 115, 22, 1)',
                        'rgba(239, 68, 68, 1)'
                    ],
                    borderWidth: 1
                }]
            }
        });
    </script>
</body>
</html>