mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-blog.git
synced 2026-04-01 17:50:13 +00:00
Compare commits
14 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 62036d3e5b | |||
| d4be88097e | |||
| b60c207e4c | |||
| df778d1957 | |||
| 8aa077c506 | |||
| 38f8fe6597 | |||
| bfa18d6e17 | |||
| 8a398fbed0 | |||
| 4e406bb85b | |||
| 511e7b8e41 | |||
| a207b7284d | |||
| d6d0f529b8 | |||
|
|
dc177ec8c2 | ||
|
|
11222dec20 |
23 changed files with 44 additions and 74 deletions
|
|
@ -14,7 +14,13 @@
|
|||
|
||||
<br>
|
||||
|
||||
<img width="1670" height="889" alt="image" src="https://github.com/user-attachments/assets/e98092b4-c97c-48cc-b905-961b24874b2b" />
|
||||
<p align="center">
|
||||
<img
|
||||
src="./docs/preview-en.png"
|
||||
alt="preview-en"
|
||||
style="max-width: 700px; width: 100%; height: auto;"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,13 @@
|
|||
|
||||
<br>
|
||||
|
||||
<img width="1670" height="889" alt="image" src="https://github.com/user-attachments/assets/ded8f5ae-7f48-4b62-a79d-6b482fc77764" />
|
||||
<p align="center">
|
||||
<img
|
||||
src="./docs/preview-zh.png"
|
||||
alt="preview-zh"
|
||||
style="max-width: 700px; width: 100%; height: auto;"
|
||||
/>
|
||||
</p>
|
||||
|
||||
<br>
|
||||
|
||||
|
|
|
|||
BIN
docs/preview-en.png
Normal file
BIN
docs/preview-en.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 587 KiB |
BIN
docs/preview-zh.png
Normal file
BIN
docs/preview-zh.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 565 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 257 KiB After Width: | Height: | Size: 8.1 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -7,21 +7,21 @@ const t = getTranslations(lang);
|
|||
|
||||
<nav class="site-nav" aria-label="Site navigation">
|
||||
<div class="site-nav-desktop">
|
||||
<a href={`/${lang}`} data-astro-reload>{t.nav.home}</a>
|
||||
<a href={`/${lang}/about`}>{t.nav.about}</a>
|
||||
<a href={`/${lang}/tags`}>{t.nav.tags}</a>
|
||||
<a href={`/${lang}/timeline`}>{t.nav.timeline}</a>
|
||||
<a href={`/${lang}/friends`}>{t.nav.friends}</a>
|
||||
<a href={`/${lang}/`} data-astro-reload>{t.nav.home}</a>
|
||||
<a href={`/${lang}/about/`}>{t.nav.about}</a>
|
||||
<a href={`/${lang}/tags/`}>{t.nav.tags}</a>
|
||||
<a href={`/${lang}/timeline/`}>{t.nav.timeline}</a>
|
||||
<a href={`/${lang}/friends/`}>{t.nav.friends}</a>
|
||||
</div>
|
||||
|
||||
<details class="site-nav-mobile">
|
||||
<summary>☰ {lang === "zh" ? "导航栏" : "Menu"}</summary>
|
||||
<div class="dropdown-menu">
|
||||
<a href={`/${lang}`} data-astro-reload>{t.nav.home}</a>
|
||||
<a href={`/${lang}/about`}>{t.nav.about}</a>
|
||||
<a href={`/${lang}/tags`}>{t.nav.tags}</a>
|
||||
<a href={`/${lang}/timeline`}>{t.nav.timeline}</a>
|
||||
<a href={`/${lang}/friends`}>{t.nav.friends}</a>
|
||||
<a href={`/${lang}/`} data-astro-reload>{t.nav.home}</a>
|
||||
<a href={`/${lang}/about/`}>{t.nav.about}</a>
|
||||
<a href={`/${lang}/tags/`}>{t.nav.tags}</a>
|
||||
<a href={`/${lang}/timeline/`}>{t.nav.timeline}</a>
|
||||
<a href={`/${lang}/friends/`}>{t.nav.friends}</a>
|
||||
</div>
|
||||
</details>
|
||||
</nav>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ const data = Astro.props;
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<img src={data.img} alt={data.title} class="post-image" />
|
||||
<img src={data.img} alt={data.title} class="post-image" loading="lazy" />
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ const data = Astro.props;
|
|||
}
|
||||
|
||||
.post-title {
|
||||
font-family: "Recursive Mono", "Maple Mono CN";
|
||||
font-family: "Maple Mono", "Maple Mono CN";
|
||||
color: inherit;
|
||||
font-weight: 700;
|
||||
font-size: 1.34rem;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ export default {
|
|||
description: "All tags that have appeared across the blog are collected here. Click a tag to jump to the corresponding list of posts."
|
||||
},
|
||||
footer: {
|
||||
githubIntro: 'See more on <a href="https://www.github.com/ClovertaTheTrilobita">GitHub</a>!',
|
||||
repoIntro: 'This blog is fully open source at <a href="https://www.github.com/ClovertaTheTrilobita/SanYeCao-blog">ClovertaTheTrilobita/SanYeCao-blog</a>'
|
||||
githubIntro: 'See more on <a href="https://repo.cloverta.top/cloverta">Forgejo</a>!',
|
||||
repoIntro: 'This blog is fully open source at <a href="https://repo.cloverta.top/cloverta/SanYeCao-blog">ClovertaTheTrilobita/SanYeCao-blog</a>'
|
||||
}
|
||||
};
|
||||
|
|
@ -51,7 +51,7 @@ export default {
|
|||
description: "在这里收集着整篇博客出现过的标签,点击标签跳转对应的文章列表。",
|
||||
},
|
||||
footer: {
|
||||
githubIntro: '在 <a href="https://www.github.com/ClovertaTheTrilobita">GitHub</a> 查看更多!',
|
||||
repoIntro: '这个博客完全开源于 <a href="https://www.github.com/ClovertaTheTrilobita/SanYeCao-blog">ClovertaTheTrilobita/SanYeCao-blog</a>'
|
||||
githubIntro: '在 <a href="https://repo.cloverta.top/cloverta">Forgejo</a> 查看更多!',
|
||||
repoIntro: '这个博客完全开源于 <a href="https://repo.cloverta.top/cloverta/SanYeCao-blog">ClovertaTheTrilobita/SanYeCao-blog</a>'
|
||||
}
|
||||
};
|
||||
|
|
@ -4,17 +4,23 @@ import { getCollection } from 'astro:content';
|
|||
|
||||
export async function GET(context) {
|
||||
const posts = await getCollection("blog");
|
||||
|
||||
return rss({
|
||||
title: 'Cloverta的博客',
|
||||
description: '在这里,发现更多(雾)欢迎来到三叶的博客🥳',
|
||||
site: context.site,
|
||||
items: await pagesGlobToRssItems(import.meta.glob('./**/*.md')),
|
||||
items: posts.map((post) => ({
|
||||
title: post.data.title,
|
||||
pubDate: post.data.pubDate,
|
||||
description: post.data.description,
|
||||
link: `/posts/${post.id}/`,
|
||||
})),
|
||||
items: posts.map((post) => {
|
||||
const [postLang, ...slugParts] = post.id.split("/");
|
||||
const slug = slugParts.join("/");
|
||||
|
||||
return ({
|
||||
title: post.data.title,
|
||||
pubDate: post.data.pubDate,
|
||||
description: post.data.description,
|
||||
link: `/${postLang}/posts/${slug}/`,
|
||||
})
|
||||
}),
|
||||
customData: `<language>en-us</language>`,
|
||||
})
|
||||
}
|
||||
|
|
@ -2,30 +2,6 @@
|
|||
@import url("https://unpkg.com/@fontsource/maple-mono@5.2.6/400-italic.css");
|
||||
@import url("https://unpkg.com/@fontsource/maple-mono@5.2.6/700.css");
|
||||
|
||||
/* @font-face {
|
||||
font-family: "Maple Mono";
|
||||
src: url("/fonts/MapleMono-Regular.ttf.woff2") format("woff2");
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Maple Mono";
|
||||
src: url("/fonts/MapleMono-Italic.ttf.woff2") format("woff2");
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Maple Mono";
|
||||
src: url("/fonts/MapleMono-Bold.ttf.woff2") format("woff2");
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
} */
|
||||
|
||||
@font-face {
|
||||
font-family: "Maple Mono CN";
|
||||
src: url("/fonts/subset/MapleMono-CN-Regular.woff2") format("woff2");
|
||||
|
|
@ -50,30 +26,6 @@
|
|||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Recursive Mono";
|
||||
src: url("/fonts/RecursiveMonoCslSt-Bold.woff2") format("woff2");
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Recursive Mono";
|
||||
src: url("/fonts/RecursiveMonoCslSt-Regular.woff2") format("woff2");
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Recursive Mono";
|
||||
src: url("/fonts/RecursiveMonoCslSt-Italic.woff2") format("woff2");
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 1rem;
|
||||
border-radius: 0.5rem;
|
||||
|
|
@ -120,7 +72,7 @@ body::after {
|
|||
/* 按需调整大小 */
|
||||
height: 400px;
|
||||
/* 按需调整大小 */
|
||||
background-image: url("https://files.seeusercontent.com/2026/03/28/Zd0m/bc7e804dc2c8ecaf407c9d665414ff72.jpg");
|
||||
background-image: url("https://files.seeusercontent.com/2026/03/30/4Xfr/bc7e804dc2c8ecaf407c9d665414ff72.webp");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right bottom;
|
||||
background-size: contain;
|
||||
|
|
@ -130,7 +82,7 @@ body::after {
|
|||
}
|
||||
|
||||
html.dark body::after {
|
||||
background-image: url("https://files.seeusercontent.com/2026/03/28/nd1W/pasted-image-1774730083896.webp");
|
||||
background-image: url("https://files.seeusercontent.com/2026/03/30/vd8W/touhou___alice_margatroid_x_kiri.webp");
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue