diff --git a/index.html b/index.html index 6306420..67f6b76 100644 --- a/index.html +++ b/index.html @@ -83,6 +83,46 @@ Tailwind CDN 运行时注入的样式可能排在本文件之后,所以用 !important 压住单边颜色。 */ .cut-edge { border-bottom: 2px dashed rgba(148, 163, 184, .55) !important; } + /* ===== 日历格胶囊结构(第三轮) ===== + 班次与工时整合为紧凑胶囊,避免 hInt/hFrac 拆分小数导致的折行; + 左下实心属性点移除,仅保留右上状态点。 */ + .calendar-cell { + display: flex; flex-direction: column; + justify-content: space-between; align-items: center; + height: 56px; padding: 4px 2px; box-sizing: border-box; + } + .cell-top { + display: flex; justify-content: space-between; align-items: center; + width: 100%; padding: 0 4px; + } + .day-num { + font-size: 13px; font-weight: 500; color: #1f2937; + font-variant-numeric: tabular-nums; + } + .event-dot { + width: 5px; height: 5px; border-radius: 50%; background-color: #10b981; + } + .event-dot.rose { background-color: #f43f5e; } + .cell-bottom { + display: flex; justify-content: center; align-items: center; width: 100%; + } + .shift-pill { + display: inline-flex; align-items: baseline; justify-content: center; + gap: 1.5px; padding: 1px 4px; border-radius: 999px; + max-width: 96%; white-space: nowrap; /* 严禁折行:整数/小数都留在同一行 */ + } + .shift-pill .shift-type { font-size: 10px; font-weight: 600; line-height: 1; } + .shift-pill .shift-time { + font-size: 10px; font-weight: 600; line-height: 1; + font-variant-numeric: tabular-nums; + } + .shift-night { background-color: #eef2ff; color: #4f46e5; } + .shift-day { background-color: #fff7ed; color: #ea580c; } + .status-text { font-size: 11px; color: #9ca3af; } + .status-text.sky { color: #0ea5e9; } + .status-text.empty { color: #d1d5db; } + .status-text.rest { color: #9ca3af; } + /* 深色看板落影:带品牌色调(靛蓝),比中性黑更贴合渐变底, 让下方浅色卡片读起来像"从看板底下滑出"而不是被硬线切开。 */ .board-shadow { @@ -109,6 +149,11 @@ white-space: nowrap; } + /* 字重阶梯:标题 fw-7 / 数值 fw-6 / 辅助 fw-4,拉大对比 */ + .fw-7 { font-weight: 700; } + .fw-6 { font-weight: 600; } + .fw-4 { font-weight: 400; } + .drawer-enter-active, .drawer-leave-active { transition: transform .25s cubic-bezier(.16,1,.3,1), opacity .25s ease; } .drawer-enter-from, .drawer-leave-to { transform: translateY(100%); opacity: 0; } .fade-enter-active, .fade-leave-active { transition: opacity .15s ease; } @@ -164,8 +209,10 @@ {{ currentYear }}年{{ currentMonth + 1 }}月 - - {{ tab === 'calendar' ? '打卡' : '汇总' }} +
+ + +
@@ -217,42 +264,50 @@
-
- - {{ day }} - {{ day }} - - - - +
+ +
+ {{ day }} + {{ day }} + + + + +
+ +
+ + {{ getRecord(day).shift_type === 'day' ? '白' : '夜' }} + {{ fmt(getRecord(day).hours) }}h + + 休 + 假 + — +
- - - 休 - 假 - —
- -
- - - 线上 → 当月{{ settings.payDayA }}号发 - - · - 线下 → 次月{{ settings.payDayB }}号发 + + +
+
+ + + 线上 → 当月{{ settings.payDayA }}号发 + + · + 线下 → 次月{{ settings.payDayB }}号发 +
+

奖励与处罚统一在次月{{ settings.payDayB }}号结算

- -

奖励与处罚统一在次月{{ settings.payDayB }}号结算

@@ -683,6 +738,8 @@ createApp({ const selectedDay = ref(today.getDate()); const isDrawerOpen = ref(false); + const legendOpen = ref(false); + const settingsOpen = ref(false); const copied = ref(false); const dataCopied = ref(false); const toast = ref(''); @@ -838,9 +895,9 @@ createApp({ if (isCutEdge(day)) cls.push('cut-edge'); if (isToday(day)) cls.push('ring-2 ring-indigo-500/70'); if (!r) cls.push('bg-white border-slate-100'); - else if (r.status === 'work') cls.push(r.shift_type === 'night' ? 'bg-violet-50/70 border-violet-100' : 'bg-sky-50/70 border-sky-100'); + else if (r.status === 'work') cls.push(r.shift_type === 'night' ? 'bg-indigo-50/70 border-indigo-100' : 'bg-amber-50/70 border-amber-100'); else if (r.status === 'rest') cls.push('bg-slate-100/70 border-slate-200'); - else if (r.status === 'leave') cls.push('bg-amber-50/60 border-amber-100'); + else if (r.status === 'leave') cls.push('bg-sky-50/60 border-sky-100'); else cls.push('bg-white border-slate-100'); return cls; };