301 lines
5.5 KiB
CSS
301 lines
5.5 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;
|
|
} |