nex_design/src/pages/DocsPage.css

233 lines
3.8 KiB
CSS

/* 文档页面容器 */
.docs-page {
width: 100%;
height: 100vh;
overflow: hidden;
}
.docs-layout {
height: 100%;
background: #ffffff;
}
/* 左侧边栏 */
.docs-sider {
border-right: 1px solid #f0f0f0;
height: 100%;
overflow-y: auto;
}
.docs-sider-header {
padding: 24px 24px 16px;
border-bottom: 1px solid #f0f0f0;
}
.docs-sider-header h2 {
margin: 0;
font-size: 18px;
font-weight: 600;
color: rgba(0, 0, 0, 0.88);
}
.docs-menu {
border-right: none;
}
.docs-menu :global(.ant-menu-item) {
margin: 4px 8px;
border-radius: 6px;
}
.docs-menu :global(.ant-menu-submenu-title) {
margin: 4px 8px;
border-radius: 6px;
}
/* 右侧内容区 */
.docs-content {
height: 100%;
overflow-y: auto;
background: #ffffff;
}
.docs-content-wrapper {
max-width: 1200px;
margin: 0 auto;
padding: 40px 60px;
}
.docs-loading {
display: flex;
justify-content: center;
align-items: center;
min-height: 400px;
}
/* Markdown 内容样式 */
.markdown-body {
font-size: 15px;
line-height: 1.8;
color: rgba(0, 0, 0, 0.88);
}
/* 标题 */
.markdown-body h1 {
font-size: 32px;
font-weight: 600;
line-height: 1.3;
margin-bottom: 24px;
padding-bottom: 16px;
border-bottom: 2px solid #f0f0f0;
color: rgba(0, 0, 0, 0.88);
}
.markdown-body h2 {
font-size: 24px;
font-weight: 600;
line-height: 1.4;
margin-top: 48px;
margin-bottom: 16px;
padding-bottom: 8px;
border-bottom: 1px solid #f0f0f0;
color: rgba(0, 0, 0, 0.88);
}
.markdown-body h3 {
font-size: 20px;
font-weight: 600;
margin-top: 32px;
margin-bottom: 12px;
color: rgba(0, 0, 0, 0.88);
}
.markdown-body h4 {
font-size: 16px;
font-weight: 600;
margin-top: 24px;
margin-bottom: 8px;
color: rgba(0, 0, 0, 0.88);
}
/* 段落 */
.markdown-body p {
margin-bottom: 16px;
}
/* 列表 */
.markdown-body ul,
.markdown-body ol {
margin-bottom: 16px;
padding-left: 24px;
}
.markdown-body li {
margin-bottom: 8px;
}
/* 代码块 */
.markdown-body pre {
background: #f6f8fa;
border: 1px solid #e1e4e8;
border-radius: 6px;
padding: 16px;
margin: 16px 0;
overflow-x: auto;
font-size: 14px;
line-height: 1.6;
}
.markdown-body code {
background: #f6f8fa;
border: 1px solid #e1e4e8;
border-radius: 3px;
padding: 2px 6px;
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
font-size: 13px;
}
.markdown-body pre code {
background: transparent;
border: none;
padding: 0;
}
/* 表格 */
.markdown-body table {
width: 100%;
border-collapse: collapse;
margin: 16px 0;
font-size: 14px;
}
.markdown-body table thead {
background: #fafafa;
}
.markdown-body table th {
padding: 12px 16px;
text-align: left;
font-weight: 600;
border: 1px solid #f0f0f0;
color: rgba(0, 0, 0, 0.88);
}
.markdown-body table td {
padding: 12px 16px;
border: 1px solid #f0f0f0;
}
.markdown-body table tr:hover {
background: #fafafa;
}
/* 引用块 */
.markdown-body blockquote {
margin: 16px 0;
padding: 8px 16px;
border-left: 4px solid #1677ff;
background: #f0f7ff;
color: rgba(0, 0, 0, 0.65);
}
/* 链接 */
.markdown-body a {
color: #1677ff;
text-decoration: none;
}
.markdown-body a:hover {
text-decoration: underline;
}
/* 分隔线 */
.markdown-body hr {
margin: 32px 0;
border: none;
border-top: 1px solid #f0f0f0;
}
/* 图片 */
.markdown-body img {
max-width: 100%;
margin: 16px 0;
border-radius: 4px;
}
/* 滚动条样式 */
.docs-sider::-webkit-scrollbar,
.docs-content::-webkit-scrollbar {
width: 6px;
height: 6px;
}
.docs-sider::-webkit-scrollbar-thumb,
.docs-content::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.2);
border-radius: 3px;
}
.docs-sider::-webkit-scrollbar-thumb:hover,
.docs-content::-webkit-scrollbar-thumb:hover {
background: rgba(0, 0, 0, 0.3);
}