Files
yangxiangyuan db7648eb4d feat(mp, web, calendar): 新增微信收藏夹与日历批量生成功能
- 新增微信小程序版个人收藏夹全套功能,包含聚合首页、收藏列表、编辑、详情页面与配套后端API
- 新增web版时光助手门户与个人收藏夹工具,支持与小程序共享后端数据
- 优化日历提醒工具:替换本地bootstrap资源为公共CDN版本,新增批量生成循环提醒的前端界面与后端逻辑,新增数据库batch_id字段,更新鉴权配置文件
- 补充项目配置、站点地图、调试诊断脚本等配套文件
- 完善各模块的页面配置与样式文件
2026-09-02 22:20:37 +08:00

703 lines
13 KiB
CSS

:root {
--primary-color: #e74c3c;
--primary-hover: #c0392b;
--secondary-color: #3498db;
--success-color: #27ae60;
--warning-color: #f39c12;
--danger-color: #e74c3c;
--light-bg: #f8f9fa;
--border-color: #e9ecef;
--text-primary: #2c3e50;
--text-secondary: #7f8c8d;
--text-muted: #95a5a6;
--shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
--shadow-md: 0 4px 6px rgba(0,0,0,0.1);
--border-radius: 8px;
--grid-gap: 6px;
}
* {
box-sizing: border-box;
}
body {
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
color: var(--text-primary);
line-height: 1.6;
min-height: 100vh;
}
.navbar {
background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)) !important;
box-shadow: var(--shadow-md);
padding: 0.8rem 1rem;
}
.navbar-brand {
font-weight: 600;
font-size: 1.3rem;
}
.btn-light {
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.3);
color: white;
font-weight: 500;
}
.btn-light:hover {
background: rgba(255, 255, 255, 0.3);
border-color: rgba(255, 255, 255, 0.4);
color: white;
}
.container {
max-width: 1400px;
}
main {
padding-top: 1.5rem !important;
padding-bottom: 2rem !important;
}
/* 日历网格样式 */
.calendar-grid {
display: grid;
grid-template-columns: repeat(7, minmax(0, 1fr));
gap: var(--grid-gap);
background: white;
border-radius: var(--border-radius);
padding: 1rem;
box-shadow: var(--shadow-sm);
}
.calendar-weekday {
margin-bottom: 0.5rem;
display: grid;
grid-template-columns: repeat(7, minmax(0, 1fr));
gap: var(--grid-gap);
background: white;
border-radius: var(--border-radius);
padding: 0.8rem 1rem;
box-shadow: var(--shadow-sm);
}
.calendar-weekday > div {
text-align: center;
font-weight: 600;
color: var(--primary-color);
font-size: 0.95rem;
padding: 0.5rem 0;
}
.calendar-weekday > div:first-child,
.calendar-weekday > div:last-child {
color: var(--danger-color);
}
.calendar-cell {
background: white;
border: 2px solid var(--border-color);
border-radius: var(--border-radius);
min-height: auto;
height: auto;
padding: 0.8rem;
display: flex;
flex-direction: column;
transition: all 0.2s ease;
position: relative;
}
.calendar-cell:hover {
border-color: var(--primary-color);
box-shadow: var(--shadow-md);
transform: translateY(-1px);
}
.calendar-cell.is-today {
border-color: var(--primary-color);
background: linear-gradient(135deg, #fff8f8, #ffe6e6);
}
.calendar-cell.is-today .cell-header span {
background: var(--primary-color);
color: white;
}
.calendar-cell .cell-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.5rem;
}
.calendar-cell .cell-header span {
display: inline-block;
width: 28px;
height: 28px;
border-radius: 50%;
text-align: center;
line-height: 28px;
font-weight: 600;
font-size: 0.9rem;
background: var(--light-bg);
color: var(--text-secondary);
}
.calendar-cell .events {
flex: 1;
display: flex;
flex-direction: column;
gap: 0.4rem;
overflow: hidden;
}
/* 事件药丸样式优化 */
.event-pill {
font-size: 0.75rem;
line-height: 1.3;
background: linear-gradient(135deg, #e3f2fd, #bbdefb);
color: #1565c0;
border: 1px solid #90caf9;
border-radius: 12px;
padding: 0.3rem 0.6rem;
cursor: pointer;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
white-space: normal;
word-break: break-all;
transition: all 0.2s ease;
margin: 0.1rem 0;
}
.event-pill:hover {
background: linear-gradient(135deg, #bbdefb, #90caf9);
transform: translateX(2px);
box-shadow: var(--shadow-sm);
}
.event-pill.is-done {
background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
color: #2e7d32;
border-color: #81c784;
text-decoration-line: line-through;
text-decoration-thickness: 2px;
opacity: 0.8;
}
/* 卡片样式 */
.card {
border: none;
border-radius: var(--border-radius);
box-shadow: var(--shadow-md);
background: white;
}
.card-header {
background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
color: white;
font-weight: 600;
border: none;
padding: 1rem 1.2rem;
border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}
.card-body {
padding: 1.2rem;
}
/* 表单样式 */
.form-control, .form-select {
border: 2px solid var(--border-color);
border-radius: 6px;
padding: 0.6rem 0.8rem;
font-size: 0.9rem;
transition: all 0.2s ease;
}
.form-control:focus, .form-select:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.25);
}
.form-label {
font-weight: 600;
color: var(--text-primary);
margin-bottom: 0.4rem;
font-size: 0.9rem;
}
.btn-primary {
background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
border: none;
border-radius: 6px;
padding: 0.6rem 1.2rem;
font-weight: 600;
transition: all 0.2s ease;
}
.btn-primary:hover {
background: linear-gradient(135deg, var(--primary-hover), #a23526);
transform: translateY(-1px);
box-shadow: var(--shadow-md);
}
/* 右侧事件列表样式优化 */
#dayEvents {
padding-left: 0;
margin: 0;
}
#dayEvents .list-group-item {
border: 1px solid var(--border-color);
border-radius: 6px;
margin-bottom: 0.4rem;
padding: 0.6rem 0.8rem;
transition: all 0.2s ease;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
}
#dayEvents .list-group-item:hover {
background: rgba(255, 255, 255, 0.98);
border-color: var(--primary-color);
transform: translateX(2px);
}
#dayEvents .list-group-item.is-done {
background: linear-gradient(135deg, rgba(232, 245, 232, 0.95), rgba(200, 230, 201, 0.95));
color: #2e7d32;
border-color: #81c784;
text-decoration-line: line-through;
text-decoration-thickness: 2px;
}
/* 紧凑列表项内容 */
.event-list-content {
display: flex;
flex-direction: column;
gap: 0.2rem;
}
.event-list-title {
font-weight: 600;
font-size: 0.9rem;
color: var(--text-primary);
margin: 0;
line-height: 1.3;
}
.event-list-time {
font-size: 0.75rem;
color: var(--text-secondary);
margin: 0;
}
.event-list-desc {
font-size: 0.8rem;
color: var(--text-muted);
margin: 0;
line-height: 1.2;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
/* 响应式调整 */
@media (max-width: 768px) {
#dayEvents .list-group-item {
padding: 0.5rem 0.6rem;
margin-bottom: 0.3rem;
}
.event-list-title {
font-size: 0.85rem;
}
.event-list-time {
font-size: 0.7rem;
}
.event-list-desc {
font-size: 0.75rem;
-webkit-line-clamp: 1;
}
}
@media (max-width: 576px) {
#dayEvents .list-group-item {
padding: 0.4rem 0.5rem;
margin-bottom: 0.25rem;
}
.event-list-title {
font-size: 0.8rem;
}
.event-list-time {
font-size: 0.65rem;
}
.event-list-desc {
font-size: 0.7rem;
}
}
/* 响应式设计 */
@media (max-width: 1200px) {
.calendar-cell {
padding: 0.6rem;
}
.event-pill {
font-size: 0.7rem;
padding: 0.2rem 0.4rem;
}
}
@media (max-width: 992px) {
.calendar-grid {
grid-template-columns: repeat(7, minmax(80px, 1fr));
}
.calendar-cell .cell-header span {
width: 24px;
height: 24px;
line-height: 24px;
font-size: 0.8rem;
}
}
@media (max-width: 768px) {
.navbar-brand {
font-size: 1.1rem;
}
.calendar-grid {
grid-template-columns: repeat(7, minmax(70px, 1fr));
padding: 0.5rem;
}
.calendar-cell {
padding: 0.4rem;
}
.event-pill {
font-size: 0.65rem;
border-radius: 8px;
}
.card-body {
padding: 1rem;
}
}
@media (max-width: 576px) {
body {
background: white;
}
.navbar {
padding: 0.6rem 0.8rem;
}
main {
padding: 1rem 0.5rem !important;
}
.calendar-grid {
grid-template-columns: repeat(7, minmax(60px, 1fr));
gap: 3px;
}
.calendar-weekday {
padding: 0.5rem;
gap: 3px;
}
.calendar-weekday > div {
font-size: 0.8rem;
padding: 0.3rem 0;
}
.calendar-cell {
padding: 0.3rem;
border-width: 1px;
}
.calendar-cell .cell-header span {
width: 20px;
height: 20px;
line-height: 20px;
font-size: 0.7rem;
}
.event-pill {
font-size: 0.6rem;
padding: 0.1rem 0.3rem;
border-radius: 6px;
-webkit-line-clamp: 1;
}
.events {
gap: 0.2rem !important;
}
}
/* 高密度模式优化 */
.high-density .calendar-cell {
min-height: 60px;
}
.high-density .event-pill {
font-size: 0.6rem;
padding: 0.1rem 0.2rem;
margin: 0.05rem 0;
-webkit-line-clamp: 1;
}
/* 事件悬停提示框样式 */
.event-tooltip {
background: white;
border: 2px solid #dc3545;
border-radius: 12px;
padding: 1rem;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
max-width: 400px;
z-index: 10000;
backdrop-filter: blur(10px);
animation: tooltipFadeIn 0.2s ease-out;
}
@keyframes tooltipFadeIn {
from { opacity: 0; transform: translateY(10px) scale(0.95); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
.tooltip-header {
border-bottom: 2px solid #f8f9fa;
padding-bottom: 0.75rem;
margin-bottom: 0.75rem;
display: flex;
align-items: center;
justify-content: space-between;
}
.tooltip-header strong {
font-size: 1.1rem;
color: #dc3545;
flex: 1;
}
.tooltip-table {
width: 100%;
border-collapse: collapse;
font-size: 0.9rem;
}
.tooltip-table th,
.tooltip-table td {
padding: 0.5rem;
text-align: left;
vertical-align: top;
border-bottom: 1px solid #f8f9fa;
}
.tooltip-table th {
color: #6c757d;
font-weight: 600;
white-space: nowrap;
width: 80px;
}
.tooltip-table td {
color: #495057;
word-break: break-word;
}
.tooltip-table tr:last-child th,
.tooltip-table tr:last-child td {
border-bottom: none;
}
/* 移动端适配 */
@media (max-width: 768px) {
.event-tooltip {
max-width: 300px;
padding: 0.75rem;
font-size: 0.85rem;
}
.tooltip-table th,
.tooltip-table td {
padding: 0.4rem;
}
.tooltip-header strong {
font-size: 1rem;
}
}
@media (max-width: 576px) {
.event-tooltip {
max-width: 280px;
padding: 0.6rem;
}
.tooltip-table {
font-size: 0.8rem;
}
.tooltip-table th {
width: 70px;
}
}
.event-modal-backdrop {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.35);
z-index: 9998;
}
.event-modal {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #ffffff;
border: 2px solid #dc3545;
border-radius: 12px;
box-shadow: 0 12px 48px rgba(0,0,0,0.2);
z-index: 9999;
width: 90vw;
max-width: 520px;
max-height: 80vh;
display: flex;
flex-direction: column;
}
.event-modal .modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.8rem 1rem;
border-bottom: 1px solid #f1f3f5;
}
.event-modal .modal-title {
font-weight: 600;
color: #dc3545;
font-size: 1.05rem;
margin-right: 0.5rem;
}
.event-modal .modal-close {
appearance: none;
border: none;
background: transparent;
font-size: 1.2rem;
line-height: 1;
cursor: pointer;
color: #6c757d;
}
.event-modal .modal-close:hover {
color: #343a40;
}
.event-modal .modal-body {
padding: 1rem;
overflow: auto;
}
@media (max-width: 576px) {
.event-modal {
width: 92vw;
max-width: 480px;
max-height: 82vh;
}
.event-modal .modal-body {
padding: 0.8rem;
}
}
.calendar-cell .events::-webkit-scrollbar-track {
background: var(--light-bg);
border-radius: 2px;
}
.calendar-cell .events::-webkit-scrollbar-thumb {
background: var(--text-muted);
border-radius: 2px;
}
.calendar-cell .events::-webkit-scrollbar-thumb:hover {
background: var(--text-secondary);
}
/* 动画效果 */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.calendar-cell {
animation: fadeIn 0.3s ease;
}
.event-pill {
animation: fadeIn 0.2s ease;
}
/* 加载状态 */
.loading {
opacity: 0.6;
pointer-events: none;
}
.loading::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 20px;
height: 20px;
margin: -10px 0 0 -10px;
border: 2px solid var(--primary-color);
border-radius: 50%;
border-top-color: transparent;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Batch tool (批量生成) */
#btnOpenBatchTool { font-weight: 600; }
.mode-fieldset {
border: 1px solid #e9ecef;
border-radius: 10px;
padding: 12px 14px 6px;
background: #fbfcfd;
}
#batch_sqlText {
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 11px;
line-height: 1.45;
white-space: pre;
background: #1f2937;
color: #f8fafc;
border-color: #111827;
}
#batch_sampleTable { font-size: 12px; }
#batch_listTable .badge { font-size: 11px; }
.batch-detail-diag { margin-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }