Tim20121221 commited on
Commit
d5b75bf
·
verified ·
1 Parent(s): 62e778c

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +330 -19
  3. prompts.txt +2 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Moremore
3
- emoji: 📈
4
- colorFrom: yellow
5
- colorTo: pink
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: moremore
3
+ emoji: 🐳
4
+ colorFrom: red
5
+ colorTo: yellow
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,330 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Employee Attendance</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
9
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
10
+ <style>
11
+ :root {
12
+ --primary-color: #1a3a32;
13
+ --secondary-color: #2d5548;
14
+ --accent-color: #4caf7d;
15
+ --text-light: #f0f9f5;
16
+ --text-dark: #1a3a32;
17
+ }
18
+
19
+ body {
20
+ background-color: #f5f7f6;
21
+ font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
22
+ }
23
+
24
+ .month-selector {
25
+ scrollbar-width: none;
26
+ -ms-overflow-style: none;
27
+ }
28
+
29
+ .month-selector::-webkit-scrollbar {
30
+ display: none;
31
+ }
32
+
33
+ .attendance-chart-container {
34
+ position: relative;
35
+ width: 180px;
36
+ height: 180px;
37
+ margin: 0 auto;
38
+ }
39
+
40
+ .employee-card {
41
+ transition: all 0.2s ease;
42
+ }
43
+
44
+ .employee-card:hover {
45
+ transform: translateY(-2px);
46
+ box-shadow: 0 4px 12px rgba(0,0,0,0.08);
47
+ }
48
+
49
+ .action-btn {
50
+ transition: all 0.2s ease;
51
+ }
52
+
53
+ .action-btn:hover {
54
+ transform: translateY(-2px);
55
+ box-shadow: 0 4px 8px rgba(0,0,0,0.1);
56
+ }
57
+
58
+ .selected-month {
59
+ background-color: var(--primary-color);
60
+ color: white;
61
+ box-shadow: 0 2px 8px rgba(26, 58, 50, 0.3);
62
+ }
63
+ </style>
64
+ </head>
65
+ <body class="min-h-screen">
66
+ <div class="container mx-auto px-4 py-6 max-w-md">
67
+ <!-- Header -->
68
+ <header class="mb-6">
69
+ <h1 class="text-2xl font-bold text-[var(--text-dark)] mb-1">Attendance Dashboard</h1>
70
+ <p class="text-sm text-gray-500">Track and manage employee attendance</p>
71
+ </header>
72
+
73
+ <!-- Month Selector -->
74
+ <div class="mb-6">
75
+ <div class="month-selector flex overflow-x-auto pb-2 gap-2 scroll-smooth" id="month-selector">
76
+ <!-- Months will be added here by JavaScript -->
77
+ </div>
78
+ </div>
79
+
80
+ <!-- Attendance Rate Card -->
81
+ <div class="bg-white rounded-xl shadow-sm p-6 mb-6 border border-gray-100">
82
+ <div class="flex justify-between items-center mb-4">
83
+ <h2 class="text-lg font-semibold text-[var(--text-dark)]">Attendance Overview</h2>
84
+ <div class="text-xs px-2 py-1 rounded-full bg-[var(--primary-color)] text-white">
85
+ <span id="selected-month-text">June 2023</span>
86
+ </div>
87
+ </div>
88
+
89
+ <div class="flex flex-col md:flex-row items-center">
90
+ <div class="attendance-chart-container mb-4 md:mb-0">
91
+ <canvas id="attendanceChart"></canvas>
92
+ </div>
93
+ <div class="text-center md:text-left md:ml-6">
94
+ <div class="text-4xl font-bold text-[var(--primary-color)] mb-2" id="attendance-rate">85%</div>
95
+ <div class="grid grid-cols-2 gap-4">
96
+ <div class="text-left">
97
+ <div class="text-sm text-gray-500">Present</div>
98
+ <div class="text-xl font-semibold text-[var(--accent-color)]" id="present-days">21</div>
99
+ </div>
100
+ <div class="text-left">
101
+ <div class="text-sm text-gray-500">Absent</div>
102
+ <div class="text-xl font-semibold text-red-500" id="absent-days">4</div>
103
+ </div>
104
+ </div>
105
+ </div>
106
+ </div>
107
+ </div>
108
+
109
+ <!-- Action Buttons -->
110
+ <div class="grid grid-cols-3 gap-3 mb-6">
111
+ <button class="action-btn bg-[var(--primary-color)] text-white rounded-xl p-3 flex flex-col items-center">
112
+ <i class="fas fa-calendar-alt text-xl mb-2"></i>
113
+ <span class="text-xs font-medium">Shift Class</span>
114
+ </button>
115
+ <button class="action-btn bg-[var(--secondary-color)] text-white rounded-xl p-3 flex flex-col items-center">
116
+ <i class="fas fa-cog text-xl mb-2"></i>
117
+ <span class="text-xs font-medium">Rules</span>
118
+ </button>
119
+ <button class="action-btn bg-[var(--accent-color)] text-white rounded-xl p-3 flex flex-col items-center">
120
+ <i class="fas fa-user-edit text-xl mb-2"></i>
121
+ <span class="text-xs font-medium">Manual</span>
122
+ </button>
123
+ </div>
124
+
125
+ <!-- Employee List -->
126
+ <div class="bg-white rounded-xl shadow-sm overflow-hidden border border-gray-100">
127
+ <div class="px-6 py-4 border-b border-gray-100 flex justify-between items-center">
128
+ <h2 class="text-lg font-semibold text-[var(--text-dark)]">Employee Records</h2>
129
+ <div class="text-xs text-gray-500">Total: <span id="employee-count">5</span></div>
130
+ </div>
131
+ <div class="divide-y divide-gray-100" id="employee-list">
132
+ <!-- Employee items will be added here by JavaScript -->
133
+ </div>
134
+ </div>
135
+ </div>
136
+
137
+ <script>
138
+ // Set color theme
139
+ tailwind.config = {
140
+ theme: {
141
+ extend: {
142
+ colors: {
143
+ primary: '#1a3a32',
144
+ secondary: '#2d5548',
145
+ accent: '#4caf7d',
146
+ }
147
+ }
148
+ }
149
+ }
150
+
151
+ // Generate months data (current month and 5 previous months)
152
+ const months = [];
153
+ const currentDate = new Date();
154
+ for (let i = 5; i >= 0; i--) {
155
+ const date = new Date();
156
+ date.setMonth(currentDate.getMonth() - i);
157
+ months.push({
158
+ name: date.toLocaleString('default', { month: 'short' }),
159
+ year: date.getFullYear(),
160
+ fullName: date.toLocaleString('default', { month: 'long' }) + ' ' + date.getFullYear(),
161
+ isCurrent: i === 0
162
+ });
163
+ }
164
+
165
+ // Render month selector
166
+ const monthSelector = document.getElementById('month-selector');
167
+ months.forEach((month, index) => {
168
+ const monthElement = document.createElement('div');
169
+ monthElement.className = `flex-shrink-0 px-4 py-2 rounded-lg cursor-pointer transition-colors ${month.isCurrent ? 'selected-month' : 'bg-white text-gray-700'}`;
170
+ monthElement.innerHTML = `
171
+ <div class="text-center">
172
+ <div class="font-medium">${month.name}</div>
173
+ <div class="text-xs">${month.year}</div>
174
+ </div>
175
+ `;
176
+ monthElement.addEventListener('click', () => {
177
+ // Remove selected class from all months
178
+ document.querySelectorAll('#month-selector > div').forEach(el => {
179
+ el.classList.remove('selected-month');
180
+ el.classList.add('bg-white', 'text-gray-700');
181
+ });
182
+
183
+ // Add selected class to clicked month
184
+ monthElement.classList.add('selected-month');
185
+ monthElement.classList.remove('bg-white', 'text-gray-700');
186
+
187
+ // Update selected month text
188
+ document.getElementById('selected-month-text').textContent = month.fullName;
189
+
190
+ // In a real app, you would fetch data for the selected month here
191
+ updateAttendanceData(month);
192
+ });
193
+
194
+ monthSelector.appendChild(monthElement);
195
+ });
196
+
197
+ // Set initial selected month
198
+ document.getElementById('selected-month-text').textContent = months.find(m => m.isCurrent).fullName;
199
+
200
+ // Sample data - in a real app this would come from an API
201
+ function getAttendanceData(month) {
202
+ // This is just sample data - in a real app it would vary by month
203
+ const basePresent = 20 + Math.floor(Math.random() * 5);
204
+ const baseAbsent = 5 - Math.floor(Math.random() * 3);
205
+
206
+ return {
207
+ present: basePresent,
208
+ absent: baseAbsent,
209
+ rate: Math.round((basePresent / (basePresent + baseAbsent)) * 100)
210
+ };
211
+ }
212
+
213
+ // Update attendance display
214
+ function updateAttendanceData(month) {
215
+ const attendanceData = getAttendanceData(month);
216
+
217
+ document.getElementById('attendance-rate').textContent = attendanceData.rate + '%';
218
+ document.getElementById('present-days').textContent = attendanceData.present;
219
+ document.getElementById('absent-days').textContent = attendanceData.absent;
220
+
221
+ // Update chart
222
+ attendanceChart.data.datasets[0].data = [attendanceData.present, attendanceData.absent];
223
+ attendanceChart.update();
224
+
225
+ // Update employee list
226
+ updateEmployeeList(month);
227
+ }
228
+
229
+ // Create pie chart
230
+ const ctx = document.getElementById('attendanceChart').getContext('2d');
231
+ const attendanceChart = new Chart(ctx, {
232
+ type: 'doughnut',
233
+ data: {
234
+ labels: ['Present', 'Absent'],
235
+ datasets: [{
236
+ data: [21, 4], // Initial data
237
+ backgroundColor: [
238
+ '#4caf7d', // accent color
239
+ '#ef4444' // red
240
+ ],
241
+ borderWidth: 0,
242
+ cutout: '75%'
243
+ }]
244
+ },
245
+ options: {
246
+ responsive: true,
247
+ maintainAspectRatio: false,
248
+ plugins: {
249
+ legend: {
250
+ display: false
251
+ },
252
+ tooltip: {
253
+ enabled: false
254
+ }
255
+ },
256
+ elements: {
257
+ arc: {
258
+ borderRadius: 10
259
+ }
260
+ }
261
+ }
262
+ });
263
+
264
+ // Sample employee data
265
+ function getEmployeeData(month) {
266
+ // This is just sample data - in a real app it would vary by month
267
+ return [
268
+ { id: 1, name: 'Zhang San', position: 'Developer', present: 20 + Math.floor(Math.random() * 3), absent: 5 - Math.floor(Math.random() * 2), avatar: 'https://randomuser.me/api/portraits/men/1.jpg' },
269
+ { id: 2, name: 'Li Si', position: 'Designer', present: 22 + Math.floor(Math.random() * 2), absent: 3 - Math.floor(Math.random() * 1), avatar: 'https://randomuser.me/api/portraits/women/2.jpg' },
270
+ { id: 3, name: 'Wang Wu', position: 'Manager', present: 18 + Math.floor(Math.random() * 4), absent: 7 - Math.floor(Math.random() * 3), avatar: 'https://randomuser.me/api/portraits/men/3.jpg' },
271
+ { id: 4, name: 'Zhao Liu', position: 'Marketing', present: 23 + Math.floor(Math.random() * 2), absent: 2 - Math.floor(Math.random() * 1), avatar: 'https://randomuser.me/api/portraits/women/4.jpg' },
272
+ { id: 5, name: 'Qian Qi', position: 'HR', present: 21 + Math.floor(Math.random() * 3), absent: 4 - Math.floor(Math.random() * 2), avatar: 'https://randomuser.me/api/portraits/men/5.jpg' }
273
+ ];
274
+ }
275
+
276
+ // Render employee list
277
+ function updateEmployeeList(month) {
278
+ const employeeList = document.getElementById('employee-list');
279
+ employeeList.innerHTML = '';
280
+
281
+ const employees = getEmployeeData(month);
282
+ document.getElementById('employee-count').textContent = employees.length;
283
+
284
+ employees.forEach(employee => {
285
+ const rate = Math.round((employee.present / (employee.present + employee.absent)) * 100);
286
+
287
+ const employeeItem = document.createElement('div');
288
+ employeeItem.className = 'employee-card px-4 py-3';
289
+ employeeItem.innerHTML = `
290
+ <div class="flex items-center">
291
+ <div class="relative mr-3">
292
+ <img src="${employee.avatar}" alt="${employee.name}" class="w-10 h-10 rounded-full object-cover">
293
+ <div class="absolute -bottom-1 -right-1 w-4 h-4 rounded-full border-2 border-white ${rate >= 90 ? 'bg-green-500' : rate >= 70 ? 'bg-yellow-500' : 'bg-red-500'}"></div>
294
+ </div>
295
+ <div class="flex-1 min-w-0">
296
+ <h3 class="font-medium text-[var(--text-dark)] truncate">${employee.name}</h3>
297
+ <p class="text-xs text-gray-500 truncate">${employee.position}</p>
298
+ </div>
299
+ <div class="flex items-center space-x-3">
300
+ <div class="text-right">
301
+ <div class="text-sm font-medium ${rate >= 90 ? 'text-green-600' : rate >= 70 ? 'text-yellow-600' : 'text-red-600'}">
302
+ ${rate}%
303
+ </div>
304
+ <div class="text-xs text-gray-500 flex space-x-1">
305
+ <span class="text-green-500">${employee.present}P</span>
306
+ <span>/</span>
307
+ <span class="text-red-500">${employee.absent}A</span>
308
+ </div>
309
+ </div>
310
+ <i class="fas fa-chevron-right text-gray-400 text-xs"></i>
311
+ </div>
312
+ </div>
313
+ `;
314
+ employeeList.appendChild(employeeItem);
315
+ });
316
+ }
317
+
318
+ // Initialize with current month data
319
+ updateAttendanceData(months.find(m => m.isCurrent));
320
+
321
+ // Add click handlers for action buttons
322
+ document.querySelectorAll('.action-btn').forEach((btn, index) => {
323
+ btn.addEventListener('click', () => {
324
+ const actions = ['Shift Setup', 'Rules Setup', 'Manual Attendance'];
325
+ alert(`${actions[index]} clicked - this would open the ${actions[index]} screen`);
326
+ });
327
+ });
328
+ </script>
329
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Tim20121221/moremore" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
330
+ </html>
prompts.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ ###前提:我需要一个移动APP的页面设计,使用u-view和vue的前端框架。##目的:展示公司(小企业)的员工出勤统计.##内容:1.体现本月出勤率(饼图),2.需要操作按钮或者链接:班次设置,规则设置,手工考勤.3.展示所有员工列表(显示每个员工的出勤天数和缺勤天数)
2
+ ###前提:我需要一个移动APP的页面设计,使用u-view和vue的前端框架。##目的:展示公司(小企业)的员工出勤统计.##内容:1.体现本月出勤率(饼图),2.需要操作按钮或者链接:班次设置,规则设置,手工考勤.3.展示所有员工列表(显示每个员工的出勤天数和缺勤天数),需要能选择月份(多个月份横向排列,可以左右滑动选择)进行筛选所选月份的考勤统计,##风格要求:主色调使用墨绿色,界面更扁平化,色差对比强烈,显示出科技的高级感