- CalendarPanel: 优化金色渐变标题效果 - InvestmentCalendar.less: 调整间距和边框样式 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
218 lines
4.7 KiB
Plaintext
218 lines
4.7 KiB
Plaintext
// src/views/Center/components/InvestmentCalendar.less
|
||
// 黑金主题日历样式
|
||
|
||
// ==================== 颜色变量 ====================
|
||
// 黑金主题主色
|
||
@gold-400: #D4AF37;
|
||
@gold-500: #B8960C;
|
||
@gold-gradient: linear-gradient(135deg, #D4AF37 0%, #F5E6A3 100%);
|
||
|
||
// 背景色
|
||
@bg-deep: #0A0A14;
|
||
@bg-primary: #0F0F1A;
|
||
@bg-elevated: #1A1A2E;
|
||
@bg-surface: #252540;
|
||
|
||
// 边框色
|
||
@line-subtle: rgba(212, 175, 55, 0.1);
|
||
@line-default: rgba(212, 175, 55, 0.2);
|
||
@line-emphasis: rgba(212, 175, 55, 0.4);
|
||
|
||
// 文字色
|
||
@text-primary: rgba(255, 255, 255, 0.95);
|
||
@text-secondary: rgba(255, 255, 255, 0.6);
|
||
@text-muted: rgba(255, 255, 255, 0.4);
|
||
|
||
// 今天高亮背景
|
||
@today-bg: rgba(212, 175, 55, 0.1);
|
||
|
||
// ==================== FullCalendar CSS Variables 覆盖 ====================
|
||
// FullCalendar v6 使用 CSS-in-JS,必须通过 CSS Variables 覆盖默认样式
|
||
.fc {
|
||
// 按钮颜色
|
||
--fc-button-text-color: @bg-deep;
|
||
--fc-button-bg-color: @gold-400;
|
||
--fc-button-border-color: @gold-400;
|
||
--fc-button-hover-bg-color: @gold-500;
|
||
--fc-button-hover-border-color: @gold-500;
|
||
--fc-button-active-bg-color: @gold-500;
|
||
--fc-button-active-border-color: @gold-500;
|
||
|
||
// 今天高亮
|
||
--fc-today-bg-color: @today-bg;
|
||
|
||
// 边框和背景
|
||
--fc-border-color: @line-default;
|
||
--fc-page-bg-color: transparent;
|
||
--fc-neutral-bg-color: rgba(212, 175, 55, 0.05);
|
||
|
||
// 事件颜色(可选)
|
||
--fc-event-bg-color: @gold-400;
|
||
--fc-event-border-color: @gold-400;
|
||
--fc-event-text-color: @bg-deep;
|
||
|
||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
|
||
}
|
||
|
||
// 工具栏布局
|
||
.fc .fc-toolbar.fc-header-toolbar {
|
||
justify-content: flex-start !important;
|
||
gap: 8px !important;
|
||
}
|
||
|
||
.fc .fc-toolbar-chunk:first-child {
|
||
display: flex !important;
|
||
gap: 4px !important;
|
||
}
|
||
|
||
// 标题金色渐变
|
||
.fc .fc-toolbar-title {
|
||
background: @gold-gradient;
|
||
-webkit-background-clip: text;
|
||
-webkit-text-fill-color: transparent;
|
||
background-clip: text;
|
||
font-weight: 700;
|
||
}
|
||
|
||
// 表格边框
|
||
.fc-theme-standard {
|
||
td, th {
|
||
border-color: @line-default;
|
||
}
|
||
}
|
||
|
||
// 导航按钮样式
|
||
.fc .fc-toolbar .fc-button-group .fc-button,
|
||
.fc .fc-button-primary {
|
||
background-color: @gold-400 !important;
|
||
border-color: @gold-400 !important;
|
||
color: @bg-deep !important;
|
||
font-weight: 600 !important;
|
||
transition: all 0.3s ease;
|
||
|
||
&:hover {
|
||
background-color: @gold-500 !important;
|
||
border-color: @gold-500 !important;
|
||
transform: translateY(-1px);
|
||
}
|
||
|
||
&:not(:disabled):active,
|
||
&:not(:disabled).fc-button-active {
|
||
background-color: @gold-500 !important;
|
||
border-color: @gold-500 !important;
|
||
}
|
||
}
|
||
|
||
// 今天按钮样式
|
||
.fc .fc-toolbar .fc-today-button {
|
||
background-color: @gold-400 !important;
|
||
border-color: @gold-400 !important;
|
||
color: @bg-deep !important;
|
||
font-weight: 600 !important;
|
||
|
||
&:hover {
|
||
background-color: @gold-500 !important;
|
||
border-color: @gold-500 !important;
|
||
}
|
||
|
||
// 选中状态(disabled 表示当前视图包含今天)
|
||
&:disabled {
|
||
background-color: @gold-500 !important;
|
||
border-color: @gold-500 !important;
|
||
opacity: 1 !important;
|
||
color: @bg-deep !important;
|
||
}
|
||
}
|
||
|
||
// 星期头
|
||
.fc-col-header-cell-cushion {
|
||
color: @text-secondary;
|
||
font-weight: 500;
|
||
}
|
||
|
||
// 日期数字
|
||
.fc-daygrid-day-number {
|
||
color: @text-primary;
|
||
font-weight: 500;
|
||
}
|
||
|
||
// 今天高亮
|
||
.fc-daygrid-day.fc-day-today {
|
||
background-color: @today-bg !important;
|
||
border: 2px solid @gold-400 !important;
|
||
}
|
||
|
||
// 事件样式
|
||
.fc-event {
|
||
border: none;
|
||
padding: 2px 6px;
|
||
font-size: 12px;
|
||
font-weight: 500;
|
||
border-radius: 4px;
|
||
transition: all 0.2s ease;
|
||
|
||
&:hover {
|
||
transform: scale(1.02);
|
||
box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
|
||
}
|
||
}
|
||
|
||
.fc-daygrid-event-dot {
|
||
display: none;
|
||
}
|
||
|
||
.fc-daygrid-day-events {
|
||
margin-top: 2px;
|
||
}
|
||
|
||
// 更多事件链接
|
||
.fc-daygrid-more-link {
|
||
color: @gold-400;
|
||
font-weight: 500;
|
||
|
||
&:hover {
|
||
color: @gold-500;
|
||
}
|
||
}
|
||
|
||
// 弹出层样式
|
||
.fc-popover {
|
||
background: @bg-elevated;
|
||
border: 1px solid @line-default;
|
||
border-radius: 8px;
|
||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
|
||
|
||
.fc-popover-header {
|
||
background: rgba(212, 175, 55, 0.1);
|
||
color: @gold-400;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.fc-popover-body {
|
||
background: @bg-elevated;
|
||
}
|
||
}
|
||
|
||
// ==================== 暗色模式支持 ====================
|
||
// 由于整体设计已是暗色,这里主要是对比度微调
|
||
@media (prefers-color-scheme: dark) {
|
||
.fc-theme-standard {
|
||
td, th {
|
||
border-color: @line-default;
|
||
}
|
||
}
|
||
|
||
.fc-daygrid-day-number {
|
||
color: @text-primary;
|
||
}
|
||
|
||
.fc-daygrid-day.fc-day-today {
|
||
background-color: @today-bg !important;
|
||
}
|
||
|
||
.fc-col-header-cell-cushion,
|
||
.fc-daygrid-day-number {
|
||
color: @text-primary;
|
||
}
|
||
}
|