mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-blog.git
synced 2026-04-02 01:54:50 +00:00
fix performance issues possibly caused by font
This commit is contained in:
parent
865fa9a08c
commit
d500790d85
1 changed files with 51 additions and 27 deletions
|
|
@ -5,7 +5,6 @@ import { getLangFromUrl, getTranslations } from "@/i18n";
|
||||||
import "@/styles/global.css";
|
import "@/styles/global.css";
|
||||||
|
|
||||||
const { frontmatter, lang, postId } = Astro.props;
|
const { frontmatter, lang, postId } = Astro.props;
|
||||||
// const lang = getLangFromUrl(Astro.url);
|
|
||||||
const t = getTranslations(lang);
|
const t = getTranslations(lang);
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -14,6 +13,7 @@ const t = getTranslations(lang);
|
||||||
description={frontmatter.description}
|
description={frontmatter.description}
|
||||||
image={frontmatter.image?.url}
|
image={frontmatter.image?.url}
|
||||||
>
|
>
|
||||||
|
<article class="post-article">
|
||||||
<div class="post-header">
|
<div class="post-header">
|
||||||
<div class="post-meta">
|
<div class="post-meta">
|
||||||
<h1 class="post-title">{frontmatter.title}</h1>
|
<h1 class="post-title">{frontmatter.title}</h1>
|
||||||
|
|
@ -43,9 +43,12 @@ const t = getTranslations(lang);
|
||||||
|
|
||||||
<div class="post-divider"></div>
|
<div class="post-divider"></div>
|
||||||
|
|
||||||
|
<div class="post-content">
|
||||||
<slot />
|
<slot />
|
||||||
|
</div>
|
||||||
|
|
||||||
<Giscus term={postId} />
|
<Giscus term={postId} />
|
||||||
|
</article>
|
||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
|
|
||||||
<script
|
<script
|
||||||
|
|
@ -77,6 +80,27 @@ const t = getTranslations(lang);
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.post-content {
|
||||||
|
font-family:
|
||||||
|
system-ui,
|
||||||
|
-apple-system,
|
||||||
|
BlinkMacSystemFont,
|
||||||
|
"Segoe UI",
|
||||||
|
"PingFang SC",
|
||||||
|
"Hiragino Sans GB",
|
||||||
|
"Microsoft YaHei",
|
||||||
|
"Noto Sans CJK SC",
|
||||||
|
"Source Han Sans SC",
|
||||||
|
sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-content :global(code),
|
||||||
|
.post-content :global(pre),
|
||||||
|
.post-content :global(kbd),
|
||||||
|
.post-content :global(samp) {
|
||||||
|
font-family: "Maple Mono", "Maple Mono CN", monospace;
|
||||||
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: var(--post-link-color);
|
color: var(--post-link-color);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue