Add 2 files
Browse files- README.md +6 -4
- index.html +242 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
colorTo: green
|
| 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: dd
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: red
|
| 5 |
colorTo: green
|
| 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,242 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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N">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Pomodoro Pro - 专注番茄钟</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 |
+
.progress-ring__circle {
|
| 12 |
+
transition: stroke-dashoffset 0.35s;
|
| 13 |
+
transform: rotate(-90deg);
|
| 14 |
+
transform-origin: 50% 50%;
|
| 15 |
+
}
|
| 16 |
+
.task-item:hover .task-actions {
|
| 17 |
+
opacity: 1;
|
| 18 |
+
}
|
| 19 |
+
.fade-in {
|
| 20 |
+
animation: fadeIn 0.3s ease-in-out;
|
| 21 |
+
}
|
| 22 |
+
@keyframes fadeIn {
|
| 23 |
+
from { opacity: 0; }
|
| 24 |
+
to { opacity: 1; }
|
| 25 |
+
}
|
| 26 |
+
.pulse {
|
| 27 |
+
animation: pulse 1.5s infinite;
|
| 28 |
+
}
|
| 29 |
+
@keyframes pulse {
|
| 30 |
+
0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
|
| 31 |
+
70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
|
| 32 |
+
100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
|
| 33 |
+
}
|
| 34 |
+
</style>
|
| 35 |
+
</head>
|
| 36 |
+
<body class="bg-gray-50 text-gray-800 min-h-screen">
|
| 37 |
+
<div class="container mx-auto px-4 py-8 max-w-6xl">
|
| 38 |
+
<!-- 头部 -->
|
| 39 |
+
<header class="flex justify-between items-center mb-8">
|
| 40 |
+
<h1 class="text-3xl font-bold text-indigo-700 flex items-center">
|
| 41 |
+
<i class="fas fa-clock mr-2"></i> Pomodoro Pro
|
| 42 |
+
</h1>
|
| 43 |
+
<div class="flex space-x-4">
|
| 44 |
+
<button id="statsBtn" class="px-4 py-2 bg-indigo-100 text-indigo-700 rounded-lg hover:bg-indigo-200 transition">
|
| 45 |
+
<i class="fas fa-chart-bar mr-2"></i>统计
|
| 46 |
+
</button>
|
| 47 |
+
<button id="settingsBtn" class="px-4 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition">
|
| 48 |
+
<i class="fas fa-cog mr-2"></i>设置
|
| 49 |
+
</button>
|
| 50 |
+
</div>
|
| 51 |
+
</header>
|
| 52 |
+
|
| 53 |
+
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
| 54 |
+
<!-- 左侧面板 - 计时器 -->
|
| 55 |
+
<div class="lg:col-span-2 space-y-8">
|
| 56 |
+
<!-- 计时器 -->
|
| 57 |
+
<div class="bg-white rounded-xl shadow-md p-6">
|
| 58 |
+
<div class="flex justify-between items-center mb-6">
|
| 59 |
+
<h2 class="text-xl font-semibold">专注计时器</h2>
|
| 60 |
+
<div class="flex space-x-2">
|
| 61 |
+
<button id="shortBreakBtn" class="px-3 py-1 text-sm bg-gray-100 rounded hover:bg-gray-200">短休息</button>
|
| 62 |
+
<button id="longBreakBtn" class="px-3 py-1 text-sm bg-gray-100 rounded hover:bg-gray-200">长休息</button>
|
| 63 |
+
</div>
|
| 64 |
+
</div>
|
| 65 |
+
|
| 66 |
+
<div class="flex flex-col items-center">
|
| 67 |
+
<div class="relative w-64 h-64 mb-6">
|
| 68 |
+
<svg class="w-full h-full" viewBox="0 0 100 100">
|
| 69 |
+
<circle class="text-gray-200" stroke-width="8" stroke="currentColor" fill="transparent" r="40" cx="50" cy="50" />
|
| 70 |
+
<circle id="progressCircle" class="progress-ring__circle text-indigo-500" stroke-width="8" stroke-linecap="round" stroke="currentColor" fill="transparent" r="40" cx="50" cy="50" />
|
| 71 |
+
</svg>
|
| 72 |
+
<div class="absolute inset-0 flex items-center justify-center flex-col">
|
| 73 |
+
<div id="timeDisplay" class="text-4xl font-bold">25:00</div>
|
| 74 |
+
<div id="timerState" class="text-gray-500 mt-2">准备开始</div>
|
| 75 |
+
</div>
|
| 76 |
+
</div>
|
| 77 |
+
|
| 78 |
+
<div class="flex space-x-4">
|
| 79 |
+
<button id="startBtn" class="px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition flex items-center">
|
| 80 |
+
<i class="fas fa-play mr-2"></i>开始
|
| 81 |
+
</button>
|
| 82 |
+
<button id="pauseBtn" class="px-6 py-3 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition flex items-center hidden">
|
| 83 |
+
<i class="fas fa-pause mr-2"></i>暂停
|
| 84 |
+
</button>
|
| 85 |
+
<button id="resetBtn" class="px-6 py-3 bg-red-100 text-red-600 rounded-lg hover:bg-red-200 transition flex items-center">
|
| 86 |
+
<i class="fas fa-redo mr-2"></i>重置
|
| 87 |
+
</button>
|
| 88 |
+
</div>
|
| 89 |
+
</div>
|
| 90 |
+
</div>
|
| 91 |
+
|
| 92 |
+
<!-- 任务列表 -->
|
| 93 |
+
<div class="bg-white rounded-xl shadow-md p-6">
|
| 94 |
+
<div class="flex justify-between items-center mb-4">
|
| 95 |
+
<h2 class="text-xl font-semibold">任务列表</h2>
|
| 96 |
+
<button id="addTaskBtn" class="px-3 py-1 bg-indigo-600 text-white rounded hover:bg-indigo-700 text-sm flex items-center">
|
| 97 |
+
<i class="fas fa-plus mr-1"></i> 添加任务
|
| 98 |
+
</button>
|
| 99 |
+
</div>
|
| 100 |
+
|
| 101 |
+
<div id="taskInputContainer" class="mb-4 hidden">
|
| 102 |
+
<div class="flex space-x-2">
|
| 103 |
+
<input type="text" id="taskInput" placeholder="输入任务内容..." class="flex-1 px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500">
|
| 104 |
+
<button id="saveTaskBtn" class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700">保存</button>
|
| 105 |
+
<button id="cancelTaskBtn" class="px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300">取消</button>
|
| 106 |
+
</div>
|
| 107 |
+
</div>
|
| 108 |
+
|
| 109 |
+
<div id="taskList" class="space-y-2">
|
| 110 |
+
<!-- 任务项将通过JS动态添加 -->
|
| 111 |
+
<div class="text-center py-4 text-gray-500" id="emptyTaskMessage">
|
| 112 |
+
暂无任务,点击"添加任务"按钮开始
|
| 113 |
+
</div>
|
| 114 |
+
</div>
|
| 115 |
+
</div>
|
| 116 |
+
</div>
|
| 117 |
+
|
| 118 |
+
<!-- 右侧面板 - 统计和今日摘要 -->
|
| 119 |
+
<div class="space-y-8">
|
| 120 |
+
<!-- 今日摘要 -->
|
| 121 |
+
<div class="bg-white rounded-xl shadow-md p-6">
|
| 122 |
+
<h2 class="text-xl font-semibold mb-4">今日摘要</h2>
|
| 123 |
+
<div class="space-y-4">
|
| 124 |
+
<div class="flex justify-between items-center">
|
| 125 |
+
<div class="text-gray-600">已完成番茄钟</div>
|
| 126 |
+
<div class="font-semibold"><span id="todayCompleted">0</span>个</div>
|
| 127 |
+
</div>
|
| 128 |
+
<div class="flex justify-between items-center">
|
| 129 |
+
<div class="text-gray-600">专注时间</div>
|
| 130 |
+
<div class="font-semibold"><span id="todayFocusTime">0</span>分钟</div>
|
| 131 |
+
</div>
|
| 132 |
+
<div class="flex justify-between items-center">
|
| 133 |
+
<div class="text-gray-600">完成任务</div>
|
| 134 |
+
<div class="font-semibold"><span id="todayTasksCompleted">0</span>个</div>
|
| 135 |
+
</div>
|
| 136 |
+
<div class="pt-4 border-t border-gray-100">
|
| 137 |
+
<div class="text-gray-600 mb-2">今日效率</div>
|
| 138 |
+
<div class="w-full bg-gray-200 rounded-full h-2.5">
|
| 139 |
+
<div id="todayEfficiencyBar" class="bg-indigo-600 h-2.5 rounded-full" style="width: 0%"></div>
|
| 140 |
+
</div>
|
| 141 |
+
<div class="text-right text-sm text-gray-500 mt-1"><span id="todayEfficiency">0</span>%</div>
|
| 142 |
+
</div>
|
| 143 |
+
</div>
|
| 144 |
+
</div>
|
| 145 |
+
|
| 146 |
+
<!-- 本周趋势 -->
|
| 147 |
+
<div class="bg-white rounded-xl shadow-md p-6">
|
| 148 |
+
<h2 class="text-xl font-semibold mb-4">本周趋势</h2>
|
| 149 |
+
<canvas id="weeklyChart" height="200"></canvas>
|
| 150 |
+
</div>
|
| 151 |
+
|
| 152 |
+
<!-- 最佳时段 -->
|
| 153 |
+
<div class="bg-white rounded-xl shadow-md p-6">
|
| 154 |
+
<h2 class="text-xl font-semibold mb-4">最佳专注时段</h2>
|
| 155 |
+
<canvas id="bestTimeChart" height="200"></canvas>
|
| 156 |
+
</div>
|
| 157 |
+
</div>
|
| 158 |
+
</div>
|
| 159 |
+
</div>
|
| 160 |
+
|
| 161 |
+
<!-- 统计模态框 -->
|
| 162 |
+
<div id="statsModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
| 163 |
+
<div class="bg-white rounded-xl p-6 w-full max-w-4xl max-h-[90vh] overflow-y-auto">
|
| 164 |
+
<div class="flex justify-between items-center mb-6">
|
| 165 |
+
<h2 class="text-2xl font-bold text-indigo-700">详细统计</h2>
|
| 166 |
+
<button id="closeStatsModal" class="text-gray-500 hover:text-gray-700">
|
| 167 |
+
<i class="fas fa-times"></i>
|
| 168 |
+
</button>
|
| 169 |
+
</div>
|
| 170 |
+
|
| 171 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
|
| 172 |
+
<div class="bg-indigo-50 p-4 rounded-lg">
|
| 173 |
+
<h3 class="font-semibold text-indigo-800 mb-2">总专注时间</h3>
|
| 174 |
+
<div class="text-3xl font-bold text-indigo-600"><span id="totalFocusTime">0</span>小时</div>
|
| 175 |
+
<div class="text-sm text-indigo-500 mt-1">自<span id="statsStartDate">2023年1月1日</span>以来</div>
|
| 176 |
+
</div>
|
| 177 |
+
<div class="bg-green-50 p-4 rounded-lg">
|
| 178 |
+
<h3 class="font-semibold text-green-800 mb-2">完成任务</h3>
|
| 179 |
+
<div class="text-3xl font-bold text-green-600"><span id="totalTasksCompleted">0</span>个</div>
|
| 180 |
+
<div class="text-sm text-green-500 mt-1">平均每天<span id="avgTasksPerDay">0</span>个</div>
|
| 181 |
+
</div>
|
| 182 |
+
</div>
|
| 183 |
+
|
| 184 |
+
<div class="mb-8">
|
| 185 |
+
<h3 class="text-lg font-semibold mb-4">月度趋势</h3>
|
| 186 |
+
<canvas id="monthlyChart" height="300"></canvas>
|
| 187 |
+
</div>
|
| 188 |
+
|
| 189 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 190 |
+
<div>
|
| 191 |
+
<h3 class="text-lg font-semibold mb-4">任务类型分布</h3>
|
| 192 |
+
<canvas id="taskTypeChart" height="250"></canvas>
|
| 193 |
+
</div>
|
| 194 |
+
<div>
|
| 195 |
+
<h3 class="text-lg font-semibold mb-4">专注时段分布</h3>
|
| 196 |
+
<canvas id="focusTimeDistributionChart" height="250"></canvas>
|
| 197 |
+
</div>
|
| 198 |
+
</div>
|
| 199 |
+
</div>
|
| 200 |
+
</div>
|
| 201 |
+
|
| 202 |
+
<!-- 设置模态框 -->
|
| 203 |
+
<div id="settingsModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
| 204 |
+
<div class="bg-white rounded-xl p-6 w-full max-w-md">
|
| 205 |
+
<div class="flex justify-between items-center mb-6">
|
| 206 |
+
<h2 class="text-2xl font-bold text-indigo-700">设置</h2>
|
| 207 |
+
<button id="closeSettingsModal" class="text-gray-500 hover:text-gray-700">
|
| 208 |
+
<i class="fas fa-times"></i>
|
| 209 |
+
</button>
|
| 210 |
+
</div>
|
| 211 |
+
|
| 212 |
+
<div class="space-y-6">
|
| 213 |
+
<div>
|
| 214 |
+
<h3 class="font-semibold mb-3">计时器设置</h3>
|
| 215 |
+
<div class="space-y-4">
|
| 216 |
+
<div class="flex items-center justify-between">
|
| 217 |
+
<label for="focusTime" class="text-gray-700">专注时间 (分钟)</label>
|
| 218 |
+
<input type="number" id="focusTime" min="1" max="60" value="25" class="w-20 px-3 py-2 border border-gray-300 rounded-lg">
|
| 219 |
+
</div>
|
| 220 |
+
<div class="flex items-center justify-between">
|
| 221 |
+
<label for="shortBreakTime" class="text-gray-700">短休息 (分钟)</label>
|
| 222 |
+
<input type="number" id="shortBreakTime" min="1" max="30" value="5" class="w-20 px-3 py-2 border border-gray-300 rounded-lg">
|
| 223 |
+
</div>
|
| 224 |
+
<div class="flex items-center justify-between">
|
| 225 |
+
<label for="longBreakTime" class="text-gray-700">长休息 (分钟)</label>
|
| 226 |
+
<input type="number" id="longBreakTime" min="1" max="60" value="15" class="w-20 px-3 py-2 border border-gray-300 rounded-lg">
|
| 227 |
+
</div>
|
| 228 |
+
<div class="flex items-center justify-between">
|
| 229 |
+
<label for="longBreakInterval" class="text-gray-700">长休息间隔 (番茄钟)</label>
|
| 230 |
+
<input type="number" id="longBreakInterval" min="1" max="10" value="4" class="w-20 px-3 py-2 border border-gray-300 rounded-lg">
|
| 231 |
+
</div>
|
| 232 |
+
</div>
|
| 233 |
+
</div>
|
| 234 |
+
|
| 235 |
+
<div>
|
| 236 |
+
<h3 class="font-semibold mb-3">通知设置</h3>
|
| 237 |
+
<div class="space-y-2">
|
| 238 |
+
<div class="flex items-center">
|
| 239 |
+
<input type="checkbox" id="enableSound" class="mr-2" checked>
|
| 240 |
+
<label for="enableSound">启用提示音</label>
|
| 241 |
+
|
| 242 |
+
</html>
|