Initial commit
This commit is contained in:
277
src/views/Community/components/InvestmentCalendar.css
Normal file
277
src/views/Community/components/InvestmentCalendar.css
Normal file
@@ -0,0 +1,277 @@
|
||||
/* --- 全局与通用增强 --- */
|
||||
|
||||
/* 为交互元素增加平滑的过渡效果,提升用户体验 */
|
||||
.ant-btn, .ant-tag, .ant-picker-cell {
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
/* --- 投资日历卡片与日历本身 --- */
|
||||
|
||||
.investment-calendar .ant-card-body {
|
||||
/* 为紧凑型日历减少内边距,使其不那么空旷 */
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.investment-calendar .ant-picker-calendar-date {
|
||||
position: relative; /* 保持相对定位,为角标提供定位锚点 */
|
||||
}
|
||||
|
||||
/* 日历单元格上的事件指示器 */
|
||||
.investment-calendar .calendar-events {
|
||||
position: absolute;
|
||||
bottom: 2px;
|
||||
right: 2px;
|
||||
pointer-events: none; /* 避免阻止点击事件 */
|
||||
}
|
||||
|
||||
.investment-calendar .event-indicators {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.investment-calendar .event-dot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.investment-calendar .event-count {
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
||||
min-width: 12px;
|
||||
text-align: center;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
/* 当事件数量很多时,调整样式 */
|
||||
.investment-calendar .event-count.many-events {
|
||||
background-color: rgba(255, 255, 255, 0.9);
|
||||
border-radius: 8px;
|
||||
padding: 1px 3px;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
/* 响应式设计 - 在小屏幕上调整指示器大小 */
|
||||
@media (max-width: 768px) {
|
||||
.investment-calendar .event-dot {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
.investment-calendar .event-count {
|
||||
font-size: 9px;
|
||||
min-width: 10px;
|
||||
}
|
||||
|
||||
.investment-calendar .ant-picker-cell-in-view .ant-picker-calendar-date {
|
||||
min-height: 28px;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 增强可访问性 - 为有事件的日期添加更明显的视觉提示 */
|
||||
.investment-calendar .ant-picker-cell-in-view:has(.calendar-events) .ant-picker-calendar-date {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.investment-calendar .ant-picker-cell-in-view:has(.calendar-events) .ant-picker-calendar-date::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border: 1px solid rgba(24, 144, 255, 0.3);
|
||||
border-radius: 4px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* 优化日历单元格的布局和显示 */
|
||||
.investment-calendar .ant-picker-cell-in-view .ant-picker-calendar-date {
|
||||
transition: background-color 0.3s;
|
||||
min-height: 32px; /* 确保有足够空间显示日期和事件指示器 */
|
||||
display: flex;
|
||||
align-items: flex-start; /* 日期数字置顶显示 */
|
||||
justify-content: flex-start;
|
||||
padding: 4px 6px; /* 适当的内边距 */
|
||||
}
|
||||
|
||||
/* 日期数字样式优化 */
|
||||
.investment-calendar .ant-picker-calendar-date-value {
|
||||
font-weight: 500;
|
||||
z-index: 1; /* 确保日期数字在最上层 */
|
||||
}
|
||||
|
||||
.investment-calendar .ant-picker-cell-selected .ant-picker-calendar-date {
|
||||
background-color: #e6f7ff;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #1890ff;
|
||||
}
|
||||
|
||||
.investment-calendar .ant-picker-cell:hover .ant-picker-calendar-date {
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* 有事件的日期单元格特殊样式 */
|
||||
.investment-calendar .ant-picker-cell-in-view .ant-picker-calendar-date:has(.calendar-events) {
|
||||
background-color: rgba(24, 144, 255, 0.05); /* 淡蓝色背景提示有事件 */
|
||||
}
|
||||
|
||||
/* 突出显示“今天”的单元格 */
|
||||
.investment-calendar .ant-picker-calendar-date-today {
|
||||
border: 1px solid #1890ff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
|
||||
/* --- 事件与股票弹窗 (Modal) --- */
|
||||
|
||||
/* 为弹窗内的Tabs内容区增加一些上边距 */
|
||||
.ant-modal-body .ant-tabs-content-holder {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
/* --- 表格 (Table) 统一样式 --- */
|
||||
|
||||
/* 为表格行增加悬停背景色,提供清晰的视觉反馈 */
|
||||
.ant-table-tbody > tr.ant-table-row:hover > td {
|
||||
background: #fafafa !important;
|
||||
}
|
||||
|
||||
/* 默认将所有单元格内容垂直居中,使表格看起来更整洁 */
|
||||
.ant-table-cell {
|
||||
vertical-align: middle !important;
|
||||
}
|
||||
|
||||
/* --- 事件表格列的特定样式 --- */
|
||||
|
||||
/* 将“重要度”列的表头和内容都居中对齐 */
|
||||
.ant-table-thead th:nth-child(2).ant-table-cell,
|
||||
.ant-table-tbody td:nth-child(2).ant-table-cell {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* --- 股票表格列的特定样式 --- */
|
||||
|
||||
/* 美化“相关度”进度条 */
|
||||
.ant-table-tbody td:nth-child(6) > .ant-tooltip > div { /* 进度条外层容器 */
|
||||
height: 16px !important;
|
||||
background: #f0f2f5 !important;
|
||||
border-radius: 8px !important;
|
||||
overflow: hidden; /* 确保内层进度条圆角不溢出 */
|
||||
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.ant-table-tbody td:nth-child(6) .ant-tooltip > div > div { /* 进度条内层填充 */
|
||||
border-radius: 8px !important;
|
||||
/* 增加渐变和细微阴影,使其更具质感 */
|
||||
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
|
||||
background-size: 40px 40px;
|
||||
box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.1);
|
||||
/* 让宽度变化的动画更平滑 */
|
||||
transition: width 0.5s cubic-bezier(0.23, 1, 0.32, 1) !important;
|
||||
}
|
||||
|
||||
/* 将“K线图”操作列居中 */
|
||||
.ant-table-thead th:nth-child(7).ant-table-cell,
|
||||
.ant-table-tbody td:nth-child(7).ant-table-cell {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
/* --- 内容详情抽屉 (Drawer) --- */
|
||||
/* (您提供的Markdown样式已经很完善,这里保留并整合) */
|
||||
|
||||
.markdown-content {
|
||||
font-size: 14px;
|
||||
line-height: 1.8;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.markdown-content h1,
|
||||
.markdown-content h2,
|
||||
.markdown-content h3,
|
||||
.markdown-content h4,
|
||||
.markdown-content h5,
|
||||
.markdown-content h6 {
|
||||
margin-top: 24px;
|
||||
margin-bottom: 16px;
|
||||
font-weight: 600;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.markdown-content h1 { font-size: 24px; }
|
||||
.markdown-content h2 { font-size: 20px; border-bottom: 1px solid #eee; padding-bottom: 8px; }
|
||||
.markdown-content h3 { font-size: 18px; }
|
||||
.markdown-content h4 { font-size: 16px; }
|
||||
|
||||
.markdown-content p {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.markdown-content ul,
|
||||
.markdown-content ol {
|
||||
padding-left: 24px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.markdown-content li {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.markdown-content blockquote {
|
||||
padding: 12px 20px;
|
||||
margin: 16px 0;
|
||||
border-left: 4px solid #1890ff;
|
||||
background-color: #f6f8fa;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.markdown-content code {
|
||||
padding: 3px 6px;
|
||||
margin: 0 2px;
|
||||
font-size: 13px;
|
||||
background-color: #f0f2f5;
|
||||
border-radius: 4px;
|
||||
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
||||
}
|
||||
|
||||
.markdown-content pre {
|
||||
padding: 16px;
|
||||
overflow: auto;
|
||||
font-size: 13px;
|
||||
line-height: 1.45;
|
||||
background-color: #2d2d2d; /* 暗色背景代码块 */
|
||||
color: #f8f8f2;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.markdown-content pre code {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background-color: transparent;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.markdown-content table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.markdown-content th,
|
||||
.markdown-content td {
|
||||
padding: 8px 12px;
|
||||
border: 1px solid #dfe2e5;
|
||||
}
|
||||
|
||||
.markdown-content th {
|
||||
background-color: #f6f8fa;
|
||||
font-weight: 600;
|
||||
}
|
||||
Reference in New Issue
Block a user