Merge remote-tracking branch 'origin/master' into blog-content

This commit is contained in:
ClovertaTheTrilobita 2026-03-28 23:05:22 +02:00
commit 138c1410f5
17 changed files with 109 additions and 51 deletions

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 ClovertaTheTrilobita
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -62,3 +62,10 @@ For details, see: <b>[GithubActions-en.md](docs/GithubActions-en.md)</b>.
Upload the generated `dist/` directory to your server, and configure `NGINX` to point to `index.html`. Upload the generated `dist/` directory to your server, and configure `NGINX` to point to `index.html`.
<hr>
## ⚖️ License
The source code in this repository is licensed under the `MIT License`.
Unless otherwise stated, all blog posts and other original non-code content in this repository are licensed under `CC BY-NC-ND 4.0`.

View file

@ -62,3 +62,11 @@
#### 手动部署 #### 手动部署
将生成的`dist/`目录上传至你的服务器,使用`NGINX`指向index.html。 将生成的`dist/`目录上传至你的服务器,使用`NGINX`指向index.html。
<hr>
## ⚖️ 许可
本仓库中的源代码部分采用 `MIT License` 开源。
除非另有说明,本仓库中的博客文章、其他原创的非代码内容采用 `CC BY-NC-ND 4.0` 协议。

View file

@ -4,12 +4,16 @@
> [!NOTE] > [!NOTE]
> >
> This project's GitHub Actions workflow listens for `git push` operations in the `src/blog` and `src/friends` directories. If either directory is updated, the build pipeline will be triggered. > This project's GitHub Actions workflow listens for `git push` operations in the `src/blog` and `src/friends` directories on the `blog-content` branch. If either directory is updated, the build pipeline will be triggered.
> [!IMPORTANT] > [!IMPORTANT]
> >
> To use this feature, you need to fork this project into your own repository. The workflow can only run in your own repository. > To use this feature, you need to fork this project into your own repository. The workflow can only run in your own repository.
### 0. Create a New Branch
Create a new branch named <b>`blog-content`</b> based on the `master` branch. Please push new articles to this branch in the future.
### 1. Set up SSH keys ### 1. Set up SSH keys
In your repository, go to <b>`Settings > Secrets and variables > Actions`</b>, and add three `Repository secrets`: In your repository, go to <b>`Settings > Secrets and variables > Actions`</b>, and add three `Repository secrets`:

View file

@ -4,12 +4,16 @@
> [!NOTE] > [!NOTE]
> >
> 此项目的Github Actions监听`src/blog`和`src/friends`两个目录的`git push`操作,两个目录有更新则触发构建流水线。 > 此项目的Github Actions监听`blog-content`分支中`src/blog`和`src/friends`两个目录的`git push`操作,两个目录有更新则触发构建流水线。
> [!IMPORTANT] > [!IMPORTANT]
> >
> 需要使用这个功能请自行Fork一份代码到自己的仓库在你自己的仓库才能跑流水线。 > 需要使用这个功能请自行Fork一份代码到自己的仓库在你自己的仓库才能跑流水线。
### 零、新建一个分支
在`master`的基础上新建一个名为<b>`blog-content`</b>的分支,以后新的文章请推送到这个分支里。
### 一、设置SSH密钥 ### 一、设置SSH密钥
在仓库的<b>`Settings > Secrets and variables > Actions`</b>中,添加三个`Repository secrets`,分别为: 在仓库的<b>`Settings > Secrets and variables > Actions`</b>中,添加三个`Repository secrets`,分别为:

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 19 KiB

View file

@ -13,15 +13,39 @@ const t = getTranslations(lang);
</div> </div>
<nav class="header-nav"> <nav class="header-nav">
<h1> <div class="banner">
<a href="/" data-astro-reload>{t.banner.title}</a> <a
</h1> href={`/${lang}/`}
data-astro-reload
class="banner-link"
aria-label="banner"
>
<span class="banner-logo"></span>
</a>
</div>
<Navigation /> <Navigation />
</nav> </nav>
</header> </header>
<style> <style>
.header-nav h1 a { .banner-link {
display: inline-block;
}
.banner-logo {
display: block;
height: 55px; /* 按你的 banner 比例改 */
background-color: #1f2328;
-webkit-mask: url("/images/banner-black.svg") no-repeat left / contain;
mask: url("/images/banner-black.svg") no-repeat left / contain;
}
:global(html.dark .banner-logo) {
background-color: #e6e6e6;
}
.header-nav .banner a {
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
display: block; display: block;
@ -45,13 +69,13 @@ const t = getTranslations(lang);
gap: 1rem; gap: 1rem;
} }
.header-nav h1 { .header-nav .banner {
margin: 0; margin: 0;
font-style: italic; font-style: italic;
line-height: 1.1; line-height: 1.1;
/* 给右上角 ThemeIcon 留空间 */ /* 给右上角 ThemeIcon 留空间 */
max-width: calc(100% - 4rem); max-width: calc(100% - 7rem);
/* 桌面正常,手机自动缩小 */ /* 桌面正常,手机自动缩小 */
font-size: clamp(1.6rem, 6vw, 2.5rem); font-size: clamp(1.6rem, 6vw, 2.5rem);

View file

@ -1,7 +1,7 @@
export default { export default {
banner: { banner: {
title: "Cloverta's Blog", title: "Cloverta's Blog",
subtitle: "" subtitle: "More to explore here (kinda) — welcome to Cloverta's blog 🥳"
}, },
nav: { nav: {
home: "Home", home: "Home",

View file

@ -1,7 +1,7 @@
export default { export default {
banner: { banner: {
title: "Cloverta的博客", title: "Cloverta的博客",
subtitle: "" subtitle: "在这里,发现更多(雾)欢迎来到三叶的博客🥳"
}, },
nav: { nav: {
home: "首页", home: "首页",

View file

@ -21,11 +21,10 @@ const {
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
<meta name="generator" content={Astro.generator} /> <meta name="generator" content={Astro.generator} />
<title>{pageTitle}</title> <title>{pageTitle}</title>
<ClientRouter />
</head> </head>
<body> <body>
<Header /> <Header />
<main class="page-content" transition:name="page"> <main class="page-content">
<slot /> <slot />
</main> </main>
<Footer /> <Footer />
@ -39,36 +38,4 @@ const {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
::view-transition-old(page),
::view-transition-new(page) {
animation-duration: 0.05s;
animation-timing-function: ease;
}
::view-transition-old(page) {
animation-name: fade-out;
}
::view-transition-new(page) {
animation-name: fade-in;
}
@keyframes fade-out {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
</style> </style>

View file

@ -9,7 +9,7 @@ const t = getTranslations(lang);
--- ---
<BaseLayout <BaseLayout
pageTitle={frontmatter.title} pageTitle=`${frontmatter.title} - ${t.banner.title}`
description={frontmatter.description} description={frontmatter.description}
image={frontmatter.image?.url} image={frontmatter.image?.url}
> >

View file

@ -13,7 +13,7 @@ const pageTitle = t.about.title;
--- ---
<BaseLayout <BaseLayout
pageTitle={pageTitle} pageTitle=`${pageTitle} - ${t.banner.title}`
image={t.about.profilePicture} image={t.about.profilePicture}
> >
<main class="about"> <main class="about">

View file

@ -13,6 +13,6 @@ const t = getTranslations(lang);
const headerTitle = lang === "zh" ? "友情链接" : "Friends"; const headerTitle = lang === "zh" ? "友情链接" : "Friends";
--- ---
<BaseLayout pageTitle={headerTitle}> <BaseLayout pageTitle=`${headerTitle} - ${t.banner.title}`>
<FriendlyLinkList /> <FriendlyLinkList />
</BaseLayout> </BaseLayout>

View file

@ -15,7 +15,7 @@ const headerTitle = lang === "zh" ? "Cloverta的博客" : "Cloverta's blog";
const pageTitle = t.home.title; const pageTitle = t.home.title;
--- ---
<BaseLayout pageTitle={headerTitle}> <BaseLayout pageTitle=`${headerTitle} - ${t.banner.subtitle}`>
<h1 class="page-title"> <h1 class="page-title">
<span>{pageTitle}</span> <span>{pageTitle}</span>
<a <a

View file

@ -15,7 +15,7 @@ const tags = [...new Set(allPosts.map((post: any) => post.data.tags).flat())];
const pageTitle = lang === "zh" ? "标签索引" : "Tag Index"; const pageTitle = lang === "zh" ? "标签索引" : "Tag Index";
--- ---
<BaseLayout pageTitle={pageTitle}> <BaseLayout pageTitle=`${pageTitle} - ${t.banner.title}` `>
<h1>{t.tags.title}</h1> <h1>{t.tags.title}</h1>
<p>{t.tags.description}</p> <p>{t.tags.description}</p>

View file

@ -13,7 +13,7 @@ const t = getTranslations(lang);
const headerTitle = lang === "zh" ? "时间轴" : "Timeline"; const headerTitle = lang === "zh" ? "时间轴" : "Timeline";
--- ---
<BaseLayout pageTitle={headerTitle}> <BaseLayout pageTitle=`${headerTitle} - ${t.banner.title}` `>
<h1>{t.nav.timeline}</h1> <h1>{t.nav.timeline}</h1>
<PostTimeline /> <PostTimeline />
</BaseLayout> </BaseLayout>

View file

@ -111,6 +111,28 @@ body {
line-height: 1.7; line-height: 1.7;
} }
body::after {
content: "";
position: fixed;
right: 0;
bottom: 0;
width: 400px;
/* 按需调整大小 */
height: 400px;
/* 按需调整大小 */
background-image: url("https://files.seeusercontent.com/2026/03/28/Zd0m/bc7e804dc2c8ecaf407c9d665414ff72.jpg");
background-repeat: no-repeat;
background-position: right bottom;
background-size: contain;
opacity: 0.35;
pointer-events: none;
z-index: -1;
}
html.dark body::after {
background-image: url("https://files.seeusercontent.com/2026/03/28/nd1W/pasted-image-1774730083896.webp");
}
* { * {
box-sizing: border-box; box-sizing: border-box;
} }
@ -123,7 +145,7 @@ h1 {
a { a {
color: #7fb3ff; color: #416bd6;
font-weight: 700; font-weight: 700;
text-decoration: none; text-decoration: none;
} }