Files
diary-news/frontend/src/style.css

61 lines
1.5 KiB
CSS
Raw Normal View History

:root {
--max-width: 1200px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
line-height: 1.6;
color: #1f2328;
background: #fafbfc;
}
* { box-sizing: border-box; }
html, body, #app {
margin: 0;
padding: 0;
min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
a:hover { color: #2080f0; }
img { max-width: 100%; }
.n-card.article-card {
margin-bottom: 16px;
transition: box-shadow 0.15s;
}
.n-card.article-card:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
/* === 文章正文容器(项目级固定 CSS,排版版译文用)===
* 后端 enrichment 也会在容器 div 上内联同样的属性;这里做兜底,
* 万一 inline style sanitizer 剥掉,样式仍生效
* backend/app/services/llm/enrichment.py 里的常量保持一致
*/
.article-body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
font-size: 17px;
line-height: 1.7;
color: #3e3e3e;
}
.article-body p {
margin: 0 0 1.5em 0;
}
.article-body p:last-child {
margin-bottom: 0;
}
/* === 排版段落(.diary-para)兜底规则 ===
* 后端 enrichment._wrap_article_body 会内联 style <p class="diary-para">;
* 这里做兜底,保证 v-html 渲染时一定有合理的行距和段距
*/
.diary-para {
margin: 0 0 1.5em 0;
line-height: 1.7;
color: #3e3e3e;
}
.diary-para:last-child {
margin-bottom: 0;
}