File size: 10,444 Bytes
488c39e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
aac65db
 
 
 
488c39e
 
 
 
aac65db
 
 
 
 
488c39e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
229
230
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Admin Dashboard - Christmas Photos</title>
<script src="https://cdn.tailwindcss.com"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <style>
        .participant-card {
            transition: all 0.2s ease;
        }
        .participant-card:hover {
            transform: translateY(-2px);
        }
    </style>
</head>
<body class="bg-gray-100">
    <div class="flex min-h-screen">
        <!-- Sidebar -->
        <aside class="w-64 bg-primary text-white p-4 hidden md:block">
            <div class="flex items-center mb-8 px-2">
                <i data-feather="camera" class="w-6 h-6 mr-2"></i>
                <h1 class="text-xl font-bold">Santa's Photo Workshop</h1>
</div>
            <nav>
                <a href="#" class="flex items-center px-2 py-3 bg-primary-700 rounded-md mb-1">
                    <i data-feather="home" class="w-5 h-5 mr-3"></i>
                    <span>Dashboard</span>
                </a>
                <a href="index.php" class="flex items-center px-2 py-3 hover:bg-primary-700 rounded-md mb-1">
                    <i data-feather="image" class="w-5 h-5 mr-3"></i>
                    <span>Photo Selection</span>
                </a>
                <a href="#" class="flex items-center px-2 py-3 hover:bg-primary-700 rounded-md mb-1">
                    <i data-feather="users" class="w-5 h-5 mr-3"></i>
                    <span>Participants</span>
                </a>
                <a href="confirmation.php" class="flex items-center px-2 py-3 hover:bg-primary-700 rounded-md mb-1">
                    <i data-feather="check-circle" class="w-5 h-5 mr-3"></i>
                    <span>Confirmations</span>
                </a>
<a href="#" class="flex items-center px-2 py-3 hover:bg-primary-700 rounded-md mb-1">
                    <i data-feather="settings" class="w-5 h-5 mr-3"></i>
                    <span>Settings</span>
                </a>
            </nav>
        </aside>

        <!-- Main Content -->
        <main class="flex-1 p-6">
            <!-- Header -->
            <header class="flex justify-between items-center mb-8">
                <h1 class="text-2xl font-bold text-gray-800">Christmas Photos Dashboard</h1>
<div class="flex items-center">
                    <i data-feather="bell" class="w-5 h-5 text-gray-600 mr-4 cursor-pointer"></i>
                    <div class="flex items-center">
                        <img src="http://static.photos/people/200x200/1" alt="Admin" class="w-8 h-8 rounded-full mr-2">
                        <span class="text-gray-700">Admin</span>
                    </div>
                </div>
            </header>

            <!-- Stats Cards -->
            <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
                <div class="bg-white rounded-lg shadow p-6">
                    <div class="flex justify-between items-center">
                        <div>
                            <p class="text-gray-500">Total Participants</p>
                            <h3 class="text-2xl font-bold">200</h3>
                        </div>
                        <div class="p-3 rounded-full bg-blue-100 text-primary">
                            <i data-feather="users" class="w-6 h-6"></i>
                        </div>
                    </div>
                </div>
                <div class="bg-white rounded-lg shadow p-6">
                    <div class="flex justify-between items-center">
                        <div>
                            <p class="text-gray-500">Responses Received</p>
                            <h3 class="text-2xl font-bold">147</h3>
                        </div>
                        <div class="p-3 rounded-full bg-green-100 text-secondary">
                            <i data-feather="check-circle" class="w-6 h-6"></i>
                        </div>
                    </div>
                </div>
                <div class="bg-white rounded-lg shadow p-6">
                    <div class="flex justify-between items-center">
                        <div>
                            <p class="text-gray-500">Completion Rate</p>
                            <h3 class="text-2xl font-bold">73.5%</h3>
                        </div>
                        <div class="p-3 rounded-full bg-purple-100 text-purple-500">
                            <i data-feather="bar-chart-2" class="w-6 h-6"></i>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Charts Section -->
            <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
                <div class="bg-white rounded-lg shadow p-6">
                    <h3 class="text-lg font-semibold mb-4">Portrait Selection Distribution</h3>
                    <canvas id="selectionChart" height="250"></canvas>
                </div>
                <div class="bg-white rounded-lg shadow p-6">
                    <h3 class="text-lg font-semibold mb-4">Response Timeline</h3>
                    <canvas id="timelineChart" height="250"></canvas>
                </div>
            </div>

            <!-- Recent Participants -->
            <div class="bg-white rounded-lg shadow overflow-hidden">
                <div class="p-6 border-b">
                    <div class="flex justify-between items-center">
                        <h3 class="text-lg font-semibold">Recent Responses</h3>
                        <button class="text-primary hover:text-primary-700 text-sm font-medium">
                            View All
                        </button>
                    </div>
                </div>
                <div class="divide-y">
                    <!-- Participant Row -->
                    <div class="participant-card p-4 hover:bg-gray-50 cursor-pointer flex items-center justify-between">
                        <div class="flex items-center">
                            <img src="http://static.photos/people/200x200/2" alt="Participant" class="w-10 h-10 rounded-full mr-4">
                            <div>
                                <h4 class="font-medium">Participant #42</h4>
                    <p class="text-sm text-gray-500">Basic Package (2 additional)</p>
</div>
                        </div>
                        <div class="flex items-center">
                            <span class="text-sm text-gray-500 mr-4">10 mins ago</span>
                            <i data-feather="chevron-right" class="w-4 h-4 text-gray-400"></i>
                        </div>
                    </div>
                    
                    <!-- More participants... -->
                    <div class="participant-card p-4 hover:bg-gray-50 cursor-pointer flex items-center justify-between">
                        <div class="flex items-center">
                            <img src="http://static.photos/people/200x200/3" alt="Participant" class="w-10 h-10 rounded-full mr-4">
                            <div>
                                <h4 class="font-medium">Participant #87</h4>
                                <p class="text-sm text-gray-500">Selected Option 1</p>
                            </div>
                        </div>
                        <div class="flex items-center">
                            <span class="text-sm text-gray-500 mr-4">25 mins ago</span>
                            <i data-feather="chevron-right" class="w-4 h-4 text-gray-400"></i>
                        </div>
                    </div>
                    
                    <div class="participant-card p-4 hover:bg-gray-50 cursor-pointer flex items-center justify-between">
                        <div class="flex items-center">
                            <img src="http://static.photos/people/200x200/4" alt="Participant" class="w-10 h-10 rounded-full mr-4">
                            <div>
                                <h4 class="font-medium">Participant #156</h4>
                                <p class="text-sm text-gray-500">Selected Option 3</p>
                            </div>
                        </div>
                        <div class="flex items-center">
                            <span class="text-sm text-gray-500 mr-4">1 hour ago</span>
                            <i data-feather="chevron-right" class="w-4 h-4 text-gray-400"></i>
                        </div>
                    </div>
                </div>
            </div>
        </main>
    </div>

    <script>
        // Initialize feather icons
        feather.replace();

        // Initialize charts
        const selectionCtx = document.getElementById('selectionChart').getContext('2d');
        const selectionChart = new Chart(selectionCtx, {
            type: 'doughnut',
            data: {
                labels: ['Basic Package', 'Premium Package'],
                datasets: [{
                    data: [120, 80],
backgroundColor: [
                        '#3B82F6',
                        '#10B981',
                        '#6366F1'
                    ],
                    borderWidth: 0
                }]
            },
            options: {
                responsive: true,
                plugins: {
                    legend: {
                        position: 'bottom',
                    }
                }
            }
        });

        const timelineCtx = document.getElementById('timelineChart').getContext('2d');
        const timelineChart = new Chart(timelineCtx, {
            type: 'line',
            data: {
                labels: ['9:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00'],
                datasets: [{
                    label: 'Responses',
                    data: [12, 19, 23, 28, 39, 45, 53],
                    backgroundColor: 'rgba(59, 130, 246, 0.1)',
                    borderColor: '#3B82F6',
                    borderWidth: 2,
                    tension: 0.3,
                    fill: true
                }]
            },
            options: {
                responsive: true,
                scales: {
                    y: {
                        beginAtZero: true
                    }
                }
            }
        });
    </script>
</body>
</html>