File size: 12,057 Bytes
3c44004
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en" class="light">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Admin Dashboard | Examify</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/feather-icons/dist/feather.min.js"></script>
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: {
                            50: '#f0f9ff',
                            100: '#e0f2fe',
                            200: '#bae6fd',
                            300: '#7dd3fc',
                            400: '#38bdf8',
                            500: '#0ea5e9',
                            600: '#0284c7',
                            700: '#0369a1',
                            800: '#075985',
                            900: '#0c4a6e',
                        }
                    }
                }
            }
        }
    </script>
</head>
<body class="bg-gray-50 dark:bg-gray-900 min-h-screen">
    <!-- Navigation -->
    <nav class="bg-white dark:bg-gray-800 shadow-sm">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex justify-between h-16">
                <div class="flex items-center">
                    <div class="flex-shrink-0 flex items-center">
                        <i data-feather="book-open" class="h-8 w-8 text-primary-500"></i>
                        <span class="ml-2 text-xl font-bold text-gray-900 dark:text-white">Examify</span>
                    </div>
                    <div class="hidden sm:ml-6 sm:flex sm:space-x-8">
                        <a href="index.html" class="border-transparent text-gray-500 dark:text-gray-300 hover:border-gray-300 hover:text-gray-700 dark:hover:text-white inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
                            Home
                        </a>
                        <a href="admin.html" class="border-primary-500 text-gray-900 dark:text-white inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
                            Admin
                        </a>
                        <a href="testing.html" class="border-transparent text-gray-500 dark:text-gray-300 hover:border-gray-300 hover:text-gray-700 dark:hover:text-white inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
                            Testing
                        </a>
                        <a href="profile.html" class="border-transparent text-gray-500 dark:text-gray-300 hover:border-gray-300 hover:text-gray-700 dark:hover:text-white inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
                            Profile
                        </a>
                    </div>
                </div>
                <div class="hidden sm:ml-6 sm:flex sm:items-center">
                    <button type="button" class="p-1 rounded-full text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
                        <i data-feather="bell"></i>
                    </button>
                    <div class="ml-3 relative">
                        <div>
                            <button type="button" class="flex text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500" id="user-menu-button" aria-expanded="false" aria-haspopup="true">
                                <img class="h-8 w-8 rounded-full" src="http://static.photos/people/200x200/42" alt="User profile">
                            </button>
                        </div>
                    </div>
                    <button id="theme-toggle" type="button" class="ml-3 p-1 rounded-full text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
                        <i data-feather="moon" id="theme-icon"></i>
                    </button>
                </div>
            </div>
        </div>
    </nav>

    <!-- Admin Dashboard Content -->
    <div class="py-10">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <h1 class="text-3xl font-bold text-gray-900 dark:text-white">Admin Dashboard</h1>
            
            <div class="mt-8 grid gap-6 grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
                <!-- Stats Cards -->
                <div class="bg-white dark:bg-gray-800 shadow rounded-lg p-6">
                    <div class="flex items-center">
                        <div class="p-3 rounded-full bg-primary-100 dark:bg-primary-900 text-primary-500">
                            <i data-feather="users"></i>
                        </div>
                        <div class="ml-4">
                            <h3 class="text-gray-500 dark:text-gray-300 text-sm font-medium">Total Users</h3>
                            <p class="text-2xl font-bold text-gray-900 dark:text-white">1,234</p>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white dark:bg-gray-800 shadow rounded-lg p-6">
                    <div class="flex items-center">
                        <div class="p-3 rounded-full bg-primary-100 dark:bg-primary-900 text-primary-500">
                            <i data-feather="file-text"></i>
                        </div>
                        <div class="ml-4">
                            <h3 class="text-gray-500 dark:text-gray-300 text-sm font-medium">Total Exams</h3>
                            <p class="text-2xl font-bold text-gray-900 dark:text-white">567</p>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white dark:bg-gray-800 shadow rounded-lg p-6">
                    <div class="flex items-center">
                        <div class="p-3 rounded-full bg-primary-100 dark:bg-primary-900 text-primary-500">
                            <i data-feather="check-circle"></i>
                        </div>
                        <div class="ml-4">
                            <h3 class="text-gray-500 dark:text-gray-300 text-sm font-medium">Completed Tests</h3>
                            <p class="text-2xl font-bold text-gray-900 dark:text-white">8,901</p>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Recent Activity -->
            <div class="mt-8 bg-white dark:bg-gray-800 shadow rounded-lg p-6">
                <h2 class="text-xl font-bold text-gray-900 dark:text-white mb-4">Recent Activity</h2>
                <div class="space-y-4">
                    <div class="flex items-start">
                        <div class="flex-shrink-0">
                            <img class="h-10 w-10 rounded-full" src="http://static.photos/people/200x200/1" alt="User">
                        </div>
                        <div class="ml-3">
                            <p class="text-sm font-medium text-gray-900 dark:text-white">John Doe</p>
                            <p class="text-sm text-gray-500 dark:text-gray-300">Created new exam "Midterm Mathematics"</p>
                            <p class="text-xs text-gray-400 dark:text-gray-500">2 hours ago</p>
                        </div>
                    </div>
                    <div class="flex items-start">
                        <div class="flex-shrink-0">
                            <img class="h-10 w-10 rounded-full" src="http://static.photos/people/200x200/2" alt="User">
                        </div>
                        <div class="ml-3">
                            <p class="text-sm font-medium text-gray-900 dark:text-white">Jane Smith</p>
                            <p class="text-sm text-gray-500 dark:text-gray-300">Completed exam "History Final" with score 85%</p>
                            <p class="text-xs text-gray-400 dark:text-gray-500">5 hours ago</p>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Quick Actions -->
            <div class="mt-8">
                <h2 class="text-xl font-bold text-gray-900 dark:text-white mb-4">Quick Actions</h2>
                <div class="grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-4">
                    <a href="#" class="bg-white dark:bg-gray-800 shadow rounded-lg p-4 flex items-center justify-center flex-col hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
                        <div class="p-3 rounded-full bg-primary-100 dark:bg-primary-900 text-primary-500 mb-2">
                            <i data-feather="plus"></i>
                        </div>
                        <span class="text-sm font-medium text-gray-900 dark:text-white">Create Exam</span>
                    </a>
                    <a href="#" class="bg-white dark:bg-gray-800 shadow rounded-lg p-4 flex items-center justify-center flex-col hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
                        <div class="p-3 rounded-full bg-primary-100 dark:bg-primary-900 text-primary-500 mb-2">
                            <i data-feather="user-plus"></i>
                        </div>
                        <span class="text-sm font-medium text-gray-900 dark:text-white">Add User</span>
                    </a>
                    <a href="#" class="bg-white dark:bg-gray-800 shadow rounded-lg p-4 flex items-center justify-center flex-col hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
                        <div class="p-3 rounded-full bg-primary-100 dark:bg-primary-900 text-primary-500 mb-2">
                            <i data-feather="bar-chart-2"></i>
                        </div>
                        <span class="text-sm font-medium text-gray-900 dark:text-white">View Reports</span>
                    </a>
                    <a href="#" class="bg-white dark:bg-gray-800 shadow rounded-lg p-4 flex items-center justify-center flex-col hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
                        <div class="p-3 rounded-full bg-primary-100 dark:bg-primary-900 text-primary-500 mb-2">
                            <i data-feather="settings"></i>
                        </div>
                        <span class="text-sm font-medium text-gray-900 dark:text-white">Settings</span>
                    </a>
                </div>
            </div>
        </div>
    </div>

    <script>
        // Theme toggle functionality
        const themeToggle = document.getElementById('theme-toggle')
        const themeIcon = document.getElementById('theme-icon')
        const htmlEl = document.documentElement
        
        // Check for saved theme preference or use system preference
        if (localStorage.getItem('theme') === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
            htmlEl.classList.add('dark')
            themeIcon.setAttribute('data-feather', 'sun')
        } else {
            htmlEl.classList.remove('dark')
            themeIcon.setAttribute('data-feather', 'moon')
        }
        
        // Toggle theme on button click
        themeToggle.addEventListener('click', () => {
            if (htmlEl.classList.contains('dark')) {
                htmlEl.classList.remove('dark')
                localStorage.setItem('theme', 'light')
                themeIcon.setAttribute('data-feather', 'moon')
            } else {
                htmlEl.classList.add('dark')
                localStorage.setItem('theme', 'dark')
                themeIcon.setAttribute('data-feather', 'sun')
            }
            feather.replace()
        })

        // Initialize feather icons
        feather.replace()
    </script>
</body>
</html>