Files
wxserver/pages/index/index.wxss
T
yuming 3965e542fc
部署到群晖 / deploy (push) Failing after 6m22s
接入自建后端 + Gitea CI/CD
- 新增 server/:Node + Express + SQLite + node-cron 实现登录、纪念日 CRUD 和定时订阅消息推送
- 新增 .gitea/workflows/deploy.yml:推送即触发群晖 Docker 部署,监听 15002
- utils/api.js:自动按 envVersion 切换本地/线上 BASE_URL
- app.js 与 add-anniversary.js 移除 wx.cloud 调用,改走自建后端
- cloudfunctions/ 暂保留以便回滚
- 一并提交此前未入库的首页 / 设置页 / 日历 / 万年历等改造

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-01 15:44:09 +08:00

411 lines
6.5 KiB
Plaintext

/* index.wxss */
page {
background: #f1f4f9;
}
.page {
display: flex;
flex-direction: column;
height: 100vh;
background: #f1f4f9;
}
/* ───── Header ───── */
.header {
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
padding: 48rpx 36rpx 40rpx;
flex-shrink: 0;
}
.header-top {
display: flex;
align-items: flex-start;
justify-content: space-between;
margin-bottom: 32rpx;
}
.header-left {
display: flex;
flex-direction: column;
}
.header-title {
font-size: 44rpx;
font-weight: 700;
color: #fff;
line-height: 1.2;
letter-spacing: 2rpx;
}
.header-date {
font-size: 26rpx;
color: rgba(255, 255, 255, 0.7);
margin-top: 8rpx;
}
.header-icon {
font-size: 64rpx;
opacity: 0.9;
}
.stats-row {
display: flex;
align-items: center;
background: rgba(255, 255, 255, 0.15);
border-radius: 20rpx;
padding: 20rpx 32rpx;
backdrop-filter: blur(8rpx);
}
.stat-item {
display: flex;
align-items: baseline;
gap: 8rpx;
flex: 1;
justify-content: center;
}
.stat-num {
font-size: 48rpx;
font-weight: 700;
color: #fff;
line-height: 1;
}
.stat-num-urgent {
color: #fbbf24;
}
.stat-label {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.75);
}
.stat-sep {
width: 2rpx;
height: 48rpx;
background: rgba(255, 255, 255, 0.25);
flex-shrink: 0;
}
/* ───── Search ───── */
.search-wrap {
padding: 24rpx 24rpx 12rpx;
flex-shrink: 0;
}
.search-box {
display: flex;
align-items: center;
background: #fff;
border-radius: 48rpx;
padding: 20rpx 28rpx;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.07);
}
.search-icon {
font-size: 32rpx;
margin-right: 16rpx;
opacity: 0.6;
}
.search-input {
flex: 1;
font-size: 28rpx;
color: #1e293b;
line-height: 1.5;
}
.search-placeholder {
color: #94a3b8;
}
/* ───── Filter ───── */
.filter-scroll {
flex-shrink: 0;
white-space: nowrap;
}
.filter-bar {
display: flex;
padding: 16rpx 24rpx 20rpx;
gap: 16rpx;
}
.filter-tab {
display: inline-flex;
align-items: center;
padding: 14rpx 28rpx;
border-radius: 48rpx;
font-size: 26rpx;
color: #64748b;
background: #fff;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
white-space: nowrap;
transition: all 0.2s ease;
flex-shrink: 0;
}
.tab-active {
background: #6366f1;
color: #fff;
box-shadow: 0 4rpx 16rpx rgba(99, 102, 241, 0.4);
}
/* ───── List ───── */
.list {
flex: 1;
overflow: hidden;
padding: 0 24rpx;
}
/* ───── Card ───── */
.card {
display: flex;
align-items: center;
background: #fff;
border-radius: 20rpx;
padding: 28rpx 28rpx 28rpx 24rpx;
margin-bottom: 20rpx;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
border-left: 6rpx solid #e2e8f0;
transition: transform 0.15s ease, box-shadow 0.15s ease;
position: relative;
overflow: hidden;
}
.card:active {
transform: scale(0.985);
box-shadow: 0 1rpx 6rpx rgba(0, 0, 0, 0.05);
}
.card-urgent {
border-left-color: #f97316;
}
.card-today {
border-left-color: #ef4444;
}
/* ───── Avatar ───── */
.avatar-wrap {
width: 96rpx;
height: 96rpx;
border-radius: 50%;
margin-right: 24rpx;
flex-shrink: 0;
overflow: hidden;
}
.avatar-img {
width: 100%;
height: 100%;
border-radius: 50%;
}
.avatar-placeholder {
width: 100%;
height: 100%;
border-radius: 50%;
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
display: flex;
align-items: center;
justify-content: center;
}
.avatar-initial {
font-size: 40rpx;
font-weight: 700;
color: #fff;
}
/* ───── Card body ───── */
.card-body {
flex: 1;
min-width: 0;
}
.card-row-top {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12rpx;
}
.name-group {
display: flex;
align-items: center;
gap: 12rpx;
min-width: 0;
flex: 1;
margin-right: 16rpx;
}
.card-name {
font-size: 32rpx;
font-weight: 600;
color: #1e293b;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.card-nickname {
font-size: 22rpx;
color: #94a3b8;
background: #f1f5f9;
padding: 4rpx 12rpx;
border-radius: 20rpx;
white-space: nowrap;
flex-shrink: 0;
}
/* ───── Badge ───── */
.badge {
display: inline-flex;
align-items: center;
padding: 6rpx 18rpx;
border-radius: 24rpx;
flex-shrink: 0;
}
.badge-text {
font-size: 22rpx;
font-weight: 600;
white-space: nowrap;
}
.badge-today {
background: #fee2e2;
}
.badge-today .badge-text {
color: #ef4444;
}
.badge-hot {
background: #ffedd5;
}
.badge-hot .badge-text {
color: #f97316;
}
.badge-soon {
background: #fef9c3;
}
.badge-soon .badge-text {
color: #ca8a04;
}
.badge-month {
background: #ede9fe;
}
.badge-month .badge-text {
color: #7c3aed;
}
.badge-normal {
background: #f1f5f9;
}
.badge-normal .badge-text {
color: #64748b;
}
/* ───── Anniversary row ───── */
.card-row-ann {
display: flex;
align-items: center;
gap: 8rpx;
}
.ann-icon {
font-size: 26rpx;
flex-shrink: 0;
}
.ann-info {
font-size: 26rpx;
color: #475569;
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.muted {
color: #94a3b8;
}
.ann-more {
font-size: 22rpx;
color: #6366f1;
background: #ede9fe;
padding: 4rpx 12rpx;
border-radius: 20rpx;
flex-shrink: 0;
}
/* ───── Empty state ───── */
.empty {
display: flex;
flex-direction: column;
align-items: center;
padding: 160rpx 40rpx 80rpx;
}
.empty-icon {
font-size: 120rpx;
margin-bottom: 32rpx;
}
.empty-title {
font-size: 32rpx;
font-weight: 600;
color: #475569;
margin-bottom: 16rpx;
}
.empty-hint {
font-size: 26rpx;
color: #94a3b8;
background: #fff;
padding: 14rpx 32rpx;
border-radius: 40rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
}
/* ───── List bottom padding ───── */
.list-bottom {
height: 180rpx;
}
/* ───── FAB ───── */
.fab {
position: fixed;
bottom: 120rpx;
right: 40rpx;
width: 112rpx;
height: 112rpx;
border-radius: 50%;
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 12rpx 40rpx rgba(99, 102, 241, 0.5);
z-index: 100;
transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.fab:active {
transform: scale(0.9);
box-shadow: 0 6rpx 20rpx rgba(99, 102, 241, 0.4);
}
.fab-icon {
font-size: 64rpx;
color: #fff;
font-weight: 300;
line-height: 1;
margin-top: -4rpx;
}