This commit is contained in:
toom1996
2025-07-15 17:44:54 +08:00
parent 30c9f29e06
commit ee8978d9fe

View File

@ -1,8 +1,6 @@
--- ---
import Layout from "../../layouts/Layout.astro"; import Layout from "../../layouts/Layout.astro";
import { getConfig } from '../../../utils/config' import { getConfig } from '../../../utils/config'
import '../../assets/css1/style.css'
import '../../assets/css1/style5.css'
import { newsDetail } from "../../../utils/rpc"; import { newsDetail } from "../../../utils/rpc";
const { slug } = Astro.params; const { slug } = Astro.params;
const config = getConfig(Astro) const config = getConfig(Astro)
@ -81,19 +79,24 @@ if (!data || code !== 0) {
</main> </main>
</Layout> </Layout>
<style is:inline> <style is:inline>
.news-content p { article p {
margin: 20px 0; margin: 1em 0; /* 每段之间留有适当的间距 */
color: #6f6f6f; color: #333; /* 深灰色,比黑色更柔和,减少眼睛疲劳 */
font-size: 18px; font-size: 18px; /* 合适的字体大小,适合大部分屏幕 */
line-height: 32px; line-height: 1.6; /* 行间距为字体的1.6倍,有助于行间的呼吸感 */
letter-spacing: 0.5px; /* 字间距适当加宽,增加可读性 */
font-family: 'Microsoft Yahei",Helvetica,Arial,sans-serif'; /* 常见的、现代的无衬线字体,增加可读性 */
} }
.news-content img { .news-content img {
max-width: 100%; max-width: 100%;
height: auto; height: auto;
} }
article h3 {
text-indent: unset !important;
}
</style> </style>
<style> <style>
.news-main { .news-main {
display: grid; display: grid;
flex-direction: row; flex-direction: row;