498 lines
9.4 KiB
CSS
498 lines
9.4 KiB
CSS
/* Markdown 样式 */
|
|
.markdown-content {
|
|
font-size: 14px;
|
|
line-height: 1.6;
|
|
color: #374151;
|
|
overflow-wrap: break-word;
|
|
text-align: left;
|
|
/* 左对齐 */
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
/* 移除外边距 */
|
|
padding: 0;
|
|
/* 移除内边距 */
|
|
}
|
|
|
|
/* 移除Ant Design Typography组件的居中样式 */
|
|
.markdown-content .ant-typography {
|
|
margin: 0 !important;
|
|
text-align: left !important;
|
|
width: 100% !important;
|
|
}
|
|
|
|
/* 段落样式 - 减少边距 */
|
|
.markdown-content p,
|
|
.markdown-content .markdown-paragraph {
|
|
margin: 0 !important;
|
|
/* 移除段落边距 */
|
|
text-align: left;
|
|
line-height: 1.4;
|
|
/* 减少行高 */
|
|
padding: 0;
|
|
/* 移除内边距 */
|
|
}
|
|
|
|
/* 标题样式 - 减少边距 */
|
|
.markdown-content h1,
|
|
.markdown-content h2,
|
|
.markdown-content h3,
|
|
.markdown-content h4,
|
|
.markdown-content h5,
|
|
.markdown-content h6,
|
|
.markdown-content .markdown-heading {
|
|
margin: 0.5em 0 0.25em 0 !important;
|
|
/* 减少标题边距 */
|
|
font-weight: 600;
|
|
line-height: 1.2;
|
|
/* 减少行高 */
|
|
text-align: left;
|
|
}
|
|
|
|
.markdown-content h1,
|
|
.markdown-content .markdown-h1 {
|
|
font-size: 1.5em;
|
|
/* 减小字体 */
|
|
border-bottom: 1px solid #eaecef;
|
|
padding-bottom: 0.2em;
|
|
}
|
|
|
|
.markdown-content h2,
|
|
.markdown-content .markdown-h2 {
|
|
font-size: 1.3em;
|
|
/* 减小字体 */
|
|
border-bottom: 1px solid #eaecef;
|
|
padding-bottom: 0.2em;
|
|
}
|
|
|
|
.markdown-content h3,
|
|
.markdown-content .markdown-h3 {
|
|
font-size: 1.1em;
|
|
/* 减小字体 */
|
|
}
|
|
|
|
.markdown-content h4,
|
|
.markdown-content .markdown-h4 {
|
|
font-size: 1em;
|
|
}
|
|
|
|
/* 列表样式 */
|
|
.markdown-content ul,
|
|
.markdown-content ol,
|
|
.markdown-content .markdown-list {
|
|
margin-top: 0.5em;
|
|
margin-bottom: 0.5em;
|
|
padding-left: 1.5em;
|
|
text-align: left;
|
|
}
|
|
|
|
.markdown-content li,
|
|
.markdown-content .markdown-list-item {
|
|
margin: 0.3em 0;
|
|
text-align: left;
|
|
}
|
|
|
|
/* 代码样式 */
|
|
.markdown-content code,
|
|
.markdown-content .inline-code {
|
|
padding: 0.2em 0.4em;
|
|
margin: 0;
|
|
font-size: 85%;
|
|
background-color: rgba(175, 184, 193, 0.2);
|
|
border-radius: 3px;
|
|
font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
|
|
}
|
|
|
|
.markdown-content pre,
|
|
.markdown-content .code-block {
|
|
padding: 16px;
|
|
overflow: auto;
|
|
font-size: 85%;
|
|
line-height: 1.45;
|
|
background-color: #f6f8fa;
|
|
border-radius: 6px;
|
|
margin: 1em 0;
|
|
text-align: left;
|
|
}
|
|
|
|
.markdown-content pre code {
|
|
padding: 0;
|
|
margin: 0;
|
|
background-color: transparent;
|
|
border: 0;
|
|
word-break: normal;
|
|
white-space: pre;
|
|
}
|
|
|
|
/* 表格样式 */
|
|
.markdown-content table,
|
|
.markdown-content .markdown-table {
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
margin: 1em 0;
|
|
overflow: auto;
|
|
}
|
|
|
|
.markdown-content table th,
|
|
.markdown-content table td {
|
|
padding: 8px 16px;
|
|
border: 1px solid #dfe2e5;
|
|
text-align: left;
|
|
}
|
|
|
|
.markdown-content table th {
|
|
font-weight: 600;
|
|
background-color: #f6f8fa;
|
|
}
|
|
|
|
.markdown-content table tr:nth-child(2n) {
|
|
background-color: #f6f8fa;
|
|
}
|
|
|
|
/* 链接样式 */
|
|
.markdown-content a,
|
|
.markdown-content .markdown-link {
|
|
color: #0969da;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-content a:hover,
|
|
.markdown-content .markdown-link:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* 引用样式 */
|
|
.markdown-content blockquote,
|
|
.markdown-content .markdown-blockquote {
|
|
margin: 1em 0;
|
|
padding: 0 1em;
|
|
color: #6a737d;
|
|
border-left: 0.25em solid #dfe2e5;
|
|
}
|
|
|
|
/* 水平线样式 */
|
|
.markdown-content hr {
|
|
height: 0.25em;
|
|
padding: 0;
|
|
margin: 24px 0;
|
|
background-color: #e1e4e8;
|
|
border: 0;
|
|
}
|
|
|
|
/* 确保父容器Card的body支持左对齐并减少高度 */
|
|
.ant-card-body {
|
|
display: block !important;
|
|
text-align: left !important;
|
|
min-height: 20px !important;
|
|
padding: 12px 16px !important;
|
|
line-height: 1.4 !important;
|
|
}
|
|
|
|
/* 流式文本效果 */
|
|
.streaming-text {
|
|
position: relative;
|
|
}
|
|
|
|
.streaming-text::after {
|
|
content: '';
|
|
animation: blink 1s infinite;
|
|
color: #1890ff;
|
|
margin-left: 2px;
|
|
}
|
|
|
|
@keyframes blink {
|
|
|
|
0%,
|
|
50% {
|
|
opacity: 1;
|
|
}
|
|
|
|
51%,
|
|
100% {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
/* 响应指示器 */
|
|
.responding-indicator {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
color: #6b7280;
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* 建议问题 */
|
|
.suggested-questions {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.question-button {
|
|
margin-bottom: 8px;
|
|
margin-right: 8px;
|
|
white-space: normal;
|
|
height: auto;
|
|
padding: 8px 12px;
|
|
text-align: left;
|
|
border: 1px solid #d1d5db;
|
|
background: #f9fafb;
|
|
color: #374151;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.question-button:hover {
|
|
border-color: #1890ff;
|
|
background: #f0f9ff;
|
|
color: #1890ff;
|
|
}
|
|
|
|
/* 消息时间戳 */
|
|
.message-timestamp {
|
|
font-size: 12px;
|
|
color: #9ca3af;
|
|
margin-top: 8px;
|
|
display: flex;
|
|
gap: 12px;
|
|
}
|
|
|
|
/* 消息图片 */
|
|
.message-images {
|
|
margin-top: 12px;
|
|
}
|
|
|
|
.message-images .ant-image {
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 响应式设计 */
|
|
@media (max-width: 768px) {
|
|
.message-card {
|
|
max-width: 95%;
|
|
}
|
|
|
|
.message-card.user {
|
|
margin-right: 30px;
|
|
}
|
|
|
|
.message-card.assistant {
|
|
margin-left: 30px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.message-card {
|
|
max-width: 100%;
|
|
}
|
|
|
|
.message-card.user {
|
|
margin-right: 15px;
|
|
}
|
|
|
|
.message-card.assistant {
|
|
margin-left: 15px;
|
|
}
|
|
}
|
|
|
|
/* AI消息中的Markdown内容背景色 */
|
|
.message-card.assistant .markdown-content {
|
|
background-color: #a4e2ad;
|
|
max-width: 65vh;
|
|
}
|
|
|
|
/* ============================================================================ */
|
|
/* 引用来源样式 - 绿白主题配色 */
|
|
/* ============================================================================ */
|
|
|
|
/* 普通引用上标 */
|
|
.source-ref-plain {
|
|
color: #00684a;
|
|
font-size: 0.75em;
|
|
vertical-align: super;
|
|
cursor: default;
|
|
}
|
|
|
|
/* 引用来源面板外层容器 */
|
|
.sources-panel-wrapper {
|
|
padding-left: 8px;
|
|
margin-top: 4px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
/* 引用来源面板 - 更紧凑的设计 */
|
|
.sources-panel {
|
|
padding: 6px 10px;
|
|
background: transparent;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.sources-panel-header {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
color: #6b7280;
|
|
margin-right: 8px;
|
|
}
|
|
|
|
.sources-panel-header i {
|
|
font-size: 12px;
|
|
color: #00684a;
|
|
}
|
|
|
|
.sources-panel-list {
|
|
display: inline-flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
align-items: center;
|
|
}
|
|
|
|
/* 引用项 - 更小更紧凑 */
|
|
.source-item {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 2px 8px;
|
|
background: #fff;
|
|
border: 1px solid #d1e7dd;
|
|
border-radius: 12px;
|
|
font-size: 11px;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
max-width: 200px;
|
|
}
|
|
|
|
.source-item:hover {
|
|
border-color: #00684a;
|
|
background: #f0fdf4;
|
|
}
|
|
|
|
/* 引用编号 - 使用绿色主题 */
|
|
.source-item-number {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 14px;
|
|
height: 14px;
|
|
background: #00684a;
|
|
color: #fff;
|
|
border-radius: 50%;
|
|
font-size: 9px;
|
|
font-weight: 600;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.source-item-name {
|
|
color: #374151;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
flex: 1;
|
|
min-width: 0;
|
|
font-size: 11px;
|
|
}
|
|
|
|
/* 得分显示 - 使用绿色渐变 */
|
|
.source-item-score {
|
|
flex-shrink: 0;
|
|
font-size: 10px;
|
|
color: #00684a;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* 引用来源 Tooltip 样式 - 绿色半透明主题 */
|
|
.source-tooltip-overlay {
|
|
max-width: 480px !important;
|
|
}
|
|
|
|
.source-tooltip-overlay .ant-tooltip-inner {
|
|
padding: 12px 14px;
|
|
border-radius: 8px;
|
|
box-shadow: 0 4px 16px rgba(0, 104, 74, 0.25);
|
|
}
|
|
|
|
.source-tooltip {
|
|
max-width: 100%;
|
|
}
|
|
|
|
.source-tooltip-header {
|
|
margin-bottom: 10px;
|
|
padding-bottom: 8px;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: #fff;
|
|
}
|
|
|
|
.source-tooltip-content {
|
|
font-size: 12px;
|
|
line-height: 1.6;
|
|
color: rgba(255, 255, 255, 0.95);
|
|
margin-bottom: 10px;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
padding-right: 4px;
|
|
}
|
|
|
|
/* 自定义滚动条样式 */
|
|
.source-tooltip-content::-webkit-scrollbar {
|
|
width: 5px;
|
|
}
|
|
|
|
.source-tooltip-content::-webkit-scrollbar-track {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.source-tooltip-content::-webkit-scrollbar-thumb {
|
|
background: rgba(255, 255, 255, 0.35);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.source-tooltip-content::-webkit-scrollbar-thumb:hover {
|
|
background: rgba(255, 255, 255, 0.5);
|
|
}
|
|
|
|
.source-tooltip-meta {
|
|
font-size: 11px;
|
|
color: rgba(255, 255, 255, 0.7);
|
|
padding-top: 8px;
|
|
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
/* Ant Design X Sources 组件样式覆盖 - 使用绿色主题 */
|
|
.markdown-content .ant-x-sources {
|
|
display: inline;
|
|
}
|
|
|
|
.markdown-content .ant-x-sources-tag {
|
|
font-size: 11px;
|
|
padding: 0 3px;
|
|
cursor: pointer;
|
|
color: #00684a;
|
|
background: transparent;
|
|
border: none;
|
|
}
|
|
|
|
.markdown-content .ant-x-sources-tag:hover {
|
|
color: #005a3f;
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* 响应式调整 */
|
|
@media (max-width: 768px) {
|
|
.sources-panel-wrapper {
|
|
padding-left: 4px;
|
|
}
|
|
|
|
.sources-panel-list {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.source-item {
|
|
max-width: 180px;
|
|
}
|
|
} |