minearm-website 0.0.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +67 -0
- package/astro.config.ts +33 -0
- package/minearm.ts +174 -0
- package/package.json +64 -0
- package/public/13.jpg +0 -0
- package/public/1937daxue.png +0 -0
- package/public/3.png +0 -0
- package/public/404.png +0 -0
- package/public/5.jpg +0 -0
- package/public/BC.png +0 -0
- package/public/Chinese.png +0 -0
- package/public/avatar.avif +0 -0
- package/public/avatar.jpg +0 -0
- package/public/c++1.png +0 -0
- package/public/docker-hub.png +0 -0
- package/public/favicon.png +0 -0
- package/public/help1.png +0 -0
- package/public/heroimg.jpg +0 -0
- package/public/logo.png +0 -0
- package/public/mail.png +0 -0
- package/public/nahida.png +0 -0
- package/public/pojipao.avif +0 -0
- package/public/rust1.png +0 -0
- package/public/scripts/mdata.json +4 -0
- package/public/scripts/utils.js +190 -0
- package/public/xmrig.jpg +0 -0
- package/src/components/BodyInject.astro +5 -0
- package/src/components/HeadInject.astro +16 -0
- package/src/components/Search.astro +30 -0
- package/src/components/animation/bubbles.astro +82 -0
- package/src/components/animation/wave.astro +81 -0
- package/src/components/aside/announcement.astro +25 -0
- package/src/components/aside/aside.astro +32 -0
- package/src/components/aside/asideComps.astro +26 -0
- package/src/components/aside/authorInfo.astro +54 -0
- package/src/components/aside/blogToc.astro +26 -0
- package/src/components/aside/countScript.astro +18 -0
- package/src/components/aside/customCard.astro +23 -0
- package/src/components/aside/siteInfo.astro +51 -0
- package/src/components/client/searchCore.vue +77 -0
- package/src/components/client/themeControl.vue +77 -0
- package/src/components/footer/Footer.astro +32 -0
- package/src/components/header/Header.astro +40 -0
- package/src/components/header/HeaderButton.astro +59 -0
- package/src/components/header/HeaderItem.astro +63 -0
- package/src/components/header/heroWave.astro +19 -0
- package/src/components/header/searchBar.astro +21 -0
- package/src/components/icons/bilibili.astro +10 -0
- package/src/components/icons/c.astro +10 -0
- package/src/components/icons/code.astro +37 -0
- package/src/components/icons/computer.astro +4 -0
- package/src/components/icons/cube.astro +10 -0
- package/src/components/icons/game.astro +10 -0
- package/src/components/icons/getIcon.astro +64 -0
- package/src/components/icons/github.astro +10 -0
- package/src/components/icons/hardDriver.astro +10 -0
- package/src/components/icons/home.astro +14 -0
- package/src/components/icons/icon.ts +33 -0
- package/src/components/icons/icons.json +91961 -0
- package/src/components/icons/link.astro +4 -0
- package/src/components/icons/mail.astro +10 -0
- package/src/components/icons/paperPlane.astro +4 -0
- package/src/components/icons/pen.astro +14 -0
- package/src/components/icons/person.astro +14 -0
- package/src/components/icons/searchicon.astro +23 -0
- package/src/components/icons/tags.astro +10 -0
- package/src/components/icons/toTop.astro +10 -0
- package/src/components/icons/tools.astro +1 -0
- package/src/components/loading/loading.vue +185 -0
- package/src/components/postComment.astro +62 -0
- package/src/components/postlist/pagination.astro +40 -0
- package/src/components/postlist/postsList.astro +57 -0
- package/src/content/blog/default/Extended Search.md +50 -0
- package/src/content/blog/default/Mail.md +15 -0
- package/src/content/blog/default/history//345/205/254/345/205/203/345/211/215//347/247/246/345/247/213/347/232/207/347/273/237/344/270/200/345/205/255/345/233/275.md +40 -0
- package/src/content/blog/default/history//350/277/221/344/273/243/347/257/207//344/270/255/345/233/275/345/205/261/344/272/247/345/205/232/345/205/232/345/217/262.md +2361 -0
- package/src/content/blog/default/it/Rust/345/237/272/346/234/254/350/257/255/346/263/225.md +298 -0
- package/src/content/config.ts +38 -0
- package/src/env.d.ts +148 -0
- package/src/layouts/BaseLayout.astro +67 -0
- package/src/layouts/DefaultMdLayout.astro +46 -0
- package/src/layouts/HomeLayout.astro +27 -0
- package/src/layouts/PostLayout.astro +60 -0
- package/src/layouts/TagsLayout.astro +44 -0
- package/src/layouts/c.astro +42 -0
- package/src/layouts/h.astro +60 -0
- package/src/pages/404.md +10 -0
- package/src/pages/[...page].astro +46 -0
- package/src/pages/about/index.md +90 -0
- package/src/pages/blog/[...slug].astro +68 -0
- package/src/pages/categories/[category]/[...page].astro +45 -0
- package/src/pages/categories/index.astro +20 -0
- package/src/pages/friends/index.md +24 -0
- package/src/pages/rss.xml.js +20 -0
- package/src/pages/tags/[tag]/[...page].astro +42 -0
- package/src/pages/tags/index.astro +19 -0
- package/src/site_config.ts +15 -0
- package/src/styles/animation.scss +94 -0
- package/src/styles/blog/blog.scss +124 -0
- package/src/styles/blog/code.scss +111 -0
- package/src/styles/blog/directives.scss +356 -0
- package/src/styles/blog/index.scss +4 -0
- package/src/styles/blog/post.scss +474 -0
- package/src/styles/components/aside.scss +178 -0
- package/src/styles/components/footer.scss +74 -0
- package/src/styles/components/header.scss +421 -0
- package/src/styles/components/heroWave.scss +24 -0
- package/src/styles/components/main.scss +275 -0
- package/src/styles/components/page-content.scss +147 -0
- package/src/styles/components/pagination.scss +121 -0
- package/src/styles/components/search.scss +349 -0
- package/src/styles/custom.scss +21 -0
- package/src/styles/global.scss +167 -0
- package/src/styles/mixin.scss +17 -0
- package/src/styles/tags/tags.scss +83 -0
- package/src/theme_config.ts +178 -0
- package/src/utils/generateSearchData.ts +30 -0
- package/src/utils/md.ts +114 -0
- package/src/utils/processMd.ts +278 -0
- package/src/utils/utils.ts +87 -0
- package/tsconfig.json +32 -0
- package/vercel.json +26 -0
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
import PostsList from "@comp/postlist/postsList.astro";
|
3
|
+
import { ViewTransitions } from 'astro:transitions';
|
4
|
+
import Pagination from "@comp/postlist/pagination.astro";
|
5
|
+
import HomeLayout from "@layout/HomeLayout.astro";
|
6
|
+
import HeroWave from "@comp/header/heroWave.astro";
|
7
|
+
import { ThemeConfig } from "@src/theme_config";
|
8
|
+
interface Props {
|
9
|
+
page?: any;
|
10
|
+
baseurl: string;
|
11
|
+
tags: string[];
|
12
|
+
activeTag?: string;
|
13
|
+
}
|
14
|
+
|
15
|
+
const { tags, baseurl, activeTag, page } = Astro.props;
|
16
|
+
---
|
17
|
+
|
18
|
+
<HomeLayout asideDir={page ? "right" : false}>
|
19
|
+
<HeroWave slot="beforeContainer">
|
20
|
+
<div class="tags-wrap">
|
21
|
+
<div class:list={["tags", { "floating": ThemeConfig.tagsPage.floating }]}>
|
22
|
+
{
|
23
|
+
tags.map((tag) => (
|
24
|
+
<a class="tag" href={`${baseurl}${tag}`}>
|
25
|
+
<span class="tag-text">{tag}</span>
|
26
|
+
</a>
|
27
|
+
))
|
28
|
+
}
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</HeroWave>
|
32
|
+
<Fragment slot="inContainer">
|
33
|
+
{page && <PostsList posts={page.data} />}
|
34
|
+
{
|
35
|
+
page && page.lastPage > 1 && (
|
36
|
+
<Pagination
|
37
|
+
baseurl="/"
|
38
|
+
pageSize={page.lastPage}
|
39
|
+
activePage={page.currentPage}
|
40
|
+
/>
|
41
|
+
)
|
42
|
+
}
|
43
|
+
</Fragment>
|
44
|
+
</HomeLayout>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
import HeroWave from "@comp/header/heroWave.astro";
|
3
|
+
import PostLayout from "@src/layouts/h.astro";
|
4
|
+
import { ThemeConfig } from "@src/theme_config";
|
5
|
+
interface FrontMatter {
|
6
|
+
title: string;
|
7
|
+
description?: string;
|
8
|
+
heroColor?: string;
|
9
|
+
useComments?: boolean;
|
10
|
+
useToc?: boolean;
|
11
|
+
toc?: {
|
12
|
+
level: string;
|
13
|
+
id: string;
|
14
|
+
value: string;
|
15
|
+
}[];
|
16
|
+
file: string;
|
17
|
+
url: string;
|
18
|
+
}
|
19
|
+
|
20
|
+
interface Props {
|
21
|
+
frontmatter: FrontMatter;
|
22
|
+
}
|
23
|
+
|
24
|
+
const { frontmatter } = Astro.props;
|
25
|
+
---
|
26
|
+
|
27
|
+
<PostLayout
|
28
|
+
useComments={frontmatter.useComments && ThemeConfig.comments.type !== false}
|
29
|
+
toc={frontmatter.useToc ? frontmatter.toc : undefined}
|
30
|
+
desc={frontmatter.description}
|
31
|
+
>
|
32
|
+
<HeroWave
|
33
|
+
class="post-header"
|
34
|
+
slot="post-hero"
|
35
|
+
heroColor={frontmatter.heroColor}
|
36
|
+
>
|
37
|
+
<div class="post-info">
|
38
|
+
<h1 class="post-title">{frontmatter.title}</h1>
|
39
|
+
</div>
|
40
|
+
</HeroWave>
|
41
|
+
<slot />
|
42
|
+
</PostLayout>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
---
|
2
|
+
import "@style/blog/index.scss";
|
3
|
+
import BaseLayout from "@layout/BaseLayout.astro";
|
4
|
+
import BlogToc from "@comp/aside/blogToc.astro";
|
5
|
+
import Aside from "@comp/aside/aside.astro";
|
6
|
+
import PostComment from "@comp/postComment.astro";
|
7
|
+
import type { CollectionEntry } from "astro:content";
|
8
|
+
import { ThemeConfig } from "@src/theme_config";
|
9
|
+
|
10
|
+
interface Props {
|
11
|
+
postData?: CollectionEntry<"blog">["data"];
|
12
|
+
toc?: {
|
13
|
+
level: string;
|
14
|
+
id: string;
|
15
|
+
value: string;
|
16
|
+
}[];
|
17
|
+
useComments?: boolean;
|
18
|
+
desc?: string;
|
19
|
+
}
|
20
|
+
|
21
|
+
const { toc, useComments = true, postData, desc } = Astro.props;
|
22
|
+
---
|
23
|
+
|
24
|
+
<BaseLayout class="post-page" description={postData?.description || desc}>
|
25
|
+
<Fragment slot="head-end">
|
26
|
+
<script
|
27
|
+
is:inline
|
28
|
+
async
|
29
|
+
src="https://cdn.staticfile.org/fancyapps-ui/5.0.20/fancybox/fancybox.umd.min.js"
|
30
|
+
></script>
|
31
|
+
<link
|
32
|
+
rel="stylesheet"
|
33
|
+
href="https://cdn.staticfile.org/fancyapps-ui/5.0.20/fancybox/fancybox.min.css"
|
34
|
+
/>
|
35
|
+
</Fragment>
|
36
|
+
<slot name="post-hero" />
|
37
|
+
<article class="post-container">
|
38
|
+
<main class="post-main">
|
39
|
+
<slot />
|
40
|
+
{useComments && <PostComment />}
|
41
|
+
</main>
|
42
|
+
<Aside
|
43
|
+
comps={ThemeConfig.postPage.aside.comps}
|
44
|
+
stickyComps={ThemeConfig.postPage.aside.stickyComps}
|
45
|
+
class="post-aside"
|
46
|
+
>
|
47
|
+
{toc && <BlogToc toc={toc} />}
|
48
|
+
</Aside>
|
49
|
+
</article>
|
50
|
+
<Fragment slot="body-end">
|
51
|
+
<script is:inline>
|
52
|
+
Fancybox.bind("[data-fancybox]", {
|
53
|
+
closeButton: true,
|
54
|
+
Thumbs: {
|
55
|
+
type: "modern",
|
56
|
+
},
|
57
|
+
});
|
58
|
+
</script>
|
59
|
+
</Fragment>
|
60
|
+
</BaseLayout>
|
package/src/pages/404.md
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
import HomeLayout from "@src/layouts/HomeLayout.astro";
|
3
|
+
import PostsList from "@comp/postlist/postsList.astro";
|
4
|
+
import Pagination from "@comp/postlist/pagination.astro";
|
5
|
+
import { ThemeConfig } from "@src/theme_config";
|
6
|
+
import { ViewTransitions } from 'astro:transitions';
|
7
|
+
import { utils } from "@src/utils/utils";
|
8
|
+
import { type CollectionEntry, getCollection } from "astro:content";
|
9
|
+
export async function getStaticPaths({ paginate }: any) {
|
10
|
+
const posts: CollectionEntry<"blog">[] = (await getCollection("blog")).sort(
|
11
|
+
(a: { data: { pubDate: string; }; }, b: { data: { pubDate: string; }; }) => utils.compareDates(a.data.pubDate, b.data.pubDate)
|
12
|
+
);
|
13
|
+
return paginate(posts, { pageSize: 10 });
|
14
|
+
}
|
15
|
+
|
16
|
+
const { page } = Astro.props;
|
17
|
+
---
|
18
|
+
|
19
|
+
<HomeLayout>
|
20
|
+
{
|
21
|
+
ThemeConfig.homePage.heroShoot && (
|
22
|
+
<Fragment slot="beforeContainer">
|
23
|
+
<div class="hero-shoot">
|
24
|
+
<div
|
25
|
+
class="hero-img"
|
26
|
+
style={`background: url(${ThemeConfig.homePage.heroShoot}) center/cover no-repeat;`}
|
27
|
+
/>
|
28
|
+
<h1 class="hero-title">{ThemeConfig.homePage.heroTitle}</h1>
|
29
|
+
<p class="hero-desc">{ThemeConfig.homePage.heroDescription}</p>
|
30
|
+
</div>
|
31
|
+
</Fragment>
|
32
|
+
)
|
33
|
+
}
|
34
|
+
<Fragment slot="inContainer">
|
35
|
+
<PostsList posts={page.data} />
|
36
|
+
{
|
37
|
+
page.lastPage > 1 && (
|
38
|
+
<Pagination
|
39
|
+
baseurl="/"
|
40
|
+
pageSize={page.lastPage}
|
41
|
+
activePage={page.currentPage}
|
42
|
+
/>
|
43
|
+
)
|
44
|
+
}
|
45
|
+
</Fragment>
|
46
|
+
</HomeLayout>
|
@@ -0,0 +1,90 @@
|
|
1
|
+
---
|
2
|
+
layout: "../../layouts/DefaultMdLayout.astro"
|
3
|
+
title: about
|
4
|
+
description: ""
|
5
|
+
heroColor: "#007aff"
|
6
|
+
useComments: true
|
7
|
+
useToc: true
|
8
|
+
---
|
9
|
+
# Minearm & Website
|
10
|
+
Minearm是一个astro主题
|
11
|
+
# 本主题是从HusBlog改进而来的
|
12
|
+
url: https://github.com/KraHsu/HsuBlog.git
|
13
|
+
|
14
|
+
成品: www.minearm.org
|
15
|
+
|
16
|
+
# 文件结构
|
17
|
+
|
18
|
+
```bash
|
19
|
+
root@rsp4:/Minearm# tree -d
|
20
|
+
.
|
21
|
+
├── public
|
22
|
+
│ └── scripts
|
23
|
+
└── src
|
24
|
+
├── components
|
25
|
+
│ ├── animation
|
26
|
+
│ ├── aside
|
27
|
+
│ ├── client
|
28
|
+
│ ├── footer
|
29
|
+
│ ├── header
|
30
|
+
│ ├── icons
|
31
|
+
│ ├── loading
|
32
|
+
│ └── postlist
|
33
|
+
├── content
|
34
|
+
│ └── blog
|
35
|
+
│ └── default
|
36
|
+
│ ├── history
|
37
|
+
│ │ ├── 公元前
|
38
|
+
│ │ └── 近代篇
|
39
|
+
│ └── it
|
40
|
+
├── layouts
|
41
|
+
├── pages
|
42
|
+
│ ├── about
|
43
|
+
│ ├── blog
|
44
|
+
│ ├── categories
|
45
|
+
│ │ └── [category]
|
46
|
+
│ ├── friends
|
47
|
+
│ └── tags
|
48
|
+
│ └── [tag]
|
49
|
+
├── styles
|
50
|
+
│ ├── blog
|
51
|
+
│ │ └── dist
|
52
|
+
│ ├── components
|
53
|
+
│ │ └── dist
|
54
|
+
│ ├── dist
|
55
|
+
│ └── tags
|
56
|
+
└── utils
|
57
|
+
|
58
|
+
```
|
59
|
+
|
60
|
+
~~~bash
|
61
|
+
# 拉取minearm
|
62
|
+
git clone https://github.com/Minearm-RPM/minearm.git
|
63
|
+
|
64
|
+
~~~
|
65
|
+
|
66
|
+
~~~bash
|
67
|
+
# 安装依赖
|
68
|
+
npm install
|
69
|
+
# 后续更新
|
70
|
+
npm update
|
71
|
+
~~~
|
72
|
+
|
73
|
+
~~~bash
|
74
|
+
# 启动开发预览
|
75
|
+
npm run dev
|
76
|
+
~~~
|
77
|
+
|
78
|
+
~~~bash
|
79
|
+
# 构建和预览
|
80
|
+
npm run build
|
81
|
+
npm run preview
|
82
|
+
~~~
|
83
|
+
|
84
|
+
|
85
|
+
# 许可证
|
86
|
+
本项目在MIT许可证下授权,版权所有©2024
|
87
|
+
|
88
|
+
由Minearm-RPM构建的
|
89
|
+
|
90
|
+
# 转载时需标明出处!。
|
@@ -0,0 +1,68 @@
|
|
1
|
+
---
|
2
|
+
import { CollectionEntry, getCollection } from "astro:content";
|
3
|
+
import PostLayout from "@src/layouts/PostLayout.astro";
|
4
|
+
import HeroWave from "@comp/header/heroWave.astro";
|
5
|
+
import GetIcon from "@comp/icons/getIcon.astro";
|
6
|
+
import ThemeControl from "@comp/client/themeControl.vue";
|
7
|
+
import { ThemeConfig } from "@src/theme_config";
|
8
|
+
export async function getStaticPaths() {
|
9
|
+
const posts = await getCollection("blog");
|
10
|
+
return posts.map((post) => ({
|
11
|
+
params: { slug: post.data.abbrlink || post.slug },
|
12
|
+
props: post,
|
13
|
+
}));
|
14
|
+
}
|
15
|
+
type Props = CollectionEntry<"blog">;
|
16
|
+
|
17
|
+
const post = Astro.props;
|
18
|
+
const { Content, remarkPluginFrontmatter } = await post.render();
|
19
|
+
---
|
20
|
+
|
21
|
+
<PostLayout
|
22
|
+
postData={post.data}
|
23
|
+
toc={remarkPluginFrontmatter.toc}
|
24
|
+
useComments={ThemeConfig.comments.type !== false}
|
25
|
+
>
|
26
|
+
<HeroWave
|
27
|
+
class="post-header"
|
28
|
+
slot="post-hero"
|
29
|
+
heroColor={post.data.heroColor}
|
30
|
+
>
|
31
|
+
<div class="post-info">
|
32
|
+
<h1 class="post-title">{post.data.title}</h1>
|
33
|
+
<div class="post-metas">
|
34
|
+
<div class="post-meta post-meta-time">
|
35
|
+
<GetIcon
|
36
|
+
Icon="fa-solid fa-calendar-days"
|
37
|
+
class="publish-time meta-icon"
|
38
|
+
>
|
39
|
+
<span>发表于{post.data.pubDate}</span>
|
40
|
+
</GetIcon>
|
41
|
+
<GetIcon Icon="fa-solid fa-repeat" class="update-time meta-icon">
|
42
|
+
<span>
|
43
|
+
更新于{post.data.updatedDate || post.data.pubDate}
|
44
|
+
</span>
|
45
|
+
</GetIcon>
|
46
|
+
<GetIcon Icon="fa-solid fa-tags" class="category meta-icon">
|
47
|
+
<span>{post.data.category}</span>
|
48
|
+
</GetIcon>
|
49
|
+
</div>
|
50
|
+
<div class="post-meta post-meta-content">
|
51
|
+
<GetIcon Icon="fa-regular fa-clock" class="read-time meta-icon">
|
52
|
+
<span
|
53
|
+
>{
|
54
|
+
remarkPluginFrontmatter.minutesRead
|
55
|
+
.replace("min", "分钟")
|
56
|
+
.replace("read", "")
|
57
|
+
}</span
|
58
|
+
>
|
59
|
+
</GetIcon>
|
60
|
+
<GetIcon Icon="fa-solid fa-file-word" class="read-time meta-icon">
|
61
|
+
<span>{remarkPluginFrontmatter.numberOfWords} 字</span>
|
62
|
+
</GetIcon>
|
63
|
+
</div>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
</HeroWave>
|
67
|
+
<Content />
|
68
|
+
</PostLayout>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
---
|
2
|
+
import "@style/tags/tags.scss";
|
3
|
+
import TagsLayout from "@src/layouts/TagsLayout.astro";
|
4
|
+
import { getCollection, type CollectionEntry } from "astro:content";
|
5
|
+
import { utils } from "@src/utils/utils";
|
6
|
+
|
7
|
+
export async function getStaticPaths({ paginate }) {
|
8
|
+
const allPosts: CollectionEntry<"blog">[] = (
|
9
|
+
await getCollection("blog")
|
10
|
+
).sort((a, b) => utils.compareDates(a.data.pubDate, b.data.pubDate));
|
11
|
+
|
12
|
+
const uniqueCategories: string[] = [
|
13
|
+
...new Set(
|
14
|
+
allPosts
|
15
|
+
.flatMap((post) => post.data.category || [])
|
16
|
+
.filter((category) => typeof category === "string" && category !== "")
|
17
|
+
),
|
18
|
+
];
|
19
|
+
|
20
|
+
return uniqueCategories.flatMap((category) => {
|
21
|
+
const filteredPosts = allPosts.filter((post) =>
|
22
|
+
post.data.category?.includes(category)
|
23
|
+
);
|
24
|
+
return paginate(filteredPosts, {
|
25
|
+
params: { category: category },
|
26
|
+
props: { posts: filteredPosts, categories: uniqueCategories },
|
27
|
+
pageSize: 10,
|
28
|
+
});
|
29
|
+
});
|
30
|
+
}
|
31
|
+
|
32
|
+
const { category } = Astro.params;
|
33
|
+
const { page, categories } = Astro.props;
|
34
|
+
|
35
|
+
console.log("Category Params:", category);
|
36
|
+
console.log("Page Props:", page);
|
37
|
+
console.log("Categories Props:", categories);
|
38
|
+
|
39
|
+
---
|
40
|
+
<TagsLayout
|
41
|
+
page={page}
|
42
|
+
tags={categories}
|
43
|
+
activeTag={category}
|
44
|
+
baseurl="/categories/"
|
45
|
+
/>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
import "@style/tags/tags.scss";
|
3
|
+
import TagsLayout from "@src/layouts/TagsLayout.astro";
|
4
|
+
import { getCollection, type CollectionEntry } from "astro:content";
|
5
|
+
import { utils } from "@src/utils/utils";
|
6
|
+
|
7
|
+
const allPosts: CollectionEntry<"blog">[] = (await getCollection("blog")).sort(
|
8
|
+
(a: { data: { pubDate: string; }; }, b: { data: { pubDate: string; }; }) => utils.compareDates(a.data.pubDate, b.data.pubDate)
|
9
|
+
);
|
10
|
+
|
11
|
+
const categories: string[] = [
|
12
|
+
...new Set(
|
13
|
+
allPosts
|
14
|
+
.flatMap((post) => [post.data.category || ""])
|
15
|
+
.filter((category) => typeof category === "string" && category !== "")
|
16
|
+
),
|
17
|
+
];
|
18
|
+
---
|
19
|
+
|
20
|
+
<TagsLayout tags={categories} baseurl="/categories/" />
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
layout: ../../layouts/DefaultMdLayout.astro
|
3
|
+
title: Minearm盟友
|
4
|
+
description: ""
|
5
|
+
heroColor: "#007aff"
|
6
|
+
useComments: true
|
7
|
+
useToc: true
|
8
|
+
---
|
9
|
+
|
10
|
+
## Minearm-RPM的盟友
|
11
|
+
|
12
|
+
谁想成为盟友的来[这里](https://github.com/Minearm-RPM/minearm/issues/3)申请一下
|
13
|
+
|
14
|
+
:::links[The Autor of Minearm-RPM & Website]
|
15
|
+
|
16
|
+
::link[纳西妲]{logo="/nahida.png" desc="我会为世界上所有的美好而战" link="https://nahida.im"}
|
17
|
+
|
18
|
+
::link[B站破击]{logo="/pojipao.avif" desc="全互联网最中二的傻逼" link="https://space.bilibili.com/1598534390"}
|
19
|
+
|
20
|
+
::link[ღꦿlove.情绪℘]{logo="/13.jpg" desc="明天要被历史肘击😭" link="mailto:2939765322@qq.com"}
|
21
|
+
|
22
|
+
::link[三的根号]{logo="/3.png" desc="√3每日发疯" link="https://space.bilibili.com/1832902560"}
|
23
|
+
|
24
|
+
::link[智宇]{logo="https://zhiyuhub.top/upload/be2bb1bb-8d91-4e9b-8b4d-00d4c45774ae.png" desc="root@kali:/#" link="https://zhiyuhub.top/"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import rss from '@astrojs/rss';
|
2
|
+
import {
|
3
|
+
getCollection
|
4
|
+
} from 'astro:content';
|
5
|
+
import {
|
6
|
+
SiteConfig
|
7
|
+
} from '../site_config';
|
8
|
+
|
9
|
+
export async function get(context) {
|
10
|
+
const posts = await getCollection('blog');
|
11
|
+
return rss({
|
12
|
+
title: SiteConfig.title,
|
13
|
+
description: SiteConfig.description,
|
14
|
+
site: context.site,
|
15
|
+
items: posts.map((post) => ({
|
16
|
+
...post.data,
|
17
|
+
link: `/blog/${post.data.abbrlink || post.slug}/`,
|
18
|
+
})),
|
19
|
+
});
|
20
|
+
}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
import "@style/tags/tags.scss";
|
3
|
+
import TagsLayout from "@src/layouts/TagsLayout.astro";
|
4
|
+
import { getCollection, CollectionEntry } from "astro:content";
|
5
|
+
import { utils }from "@src/utils/utils";
|
6
|
+
|
7
|
+
export async function getStaticPaths({ paginate }: any) {
|
8
|
+
const allPosts: CollectionEntry<"blog">[] = (
|
9
|
+
await getCollection("blog")
|
10
|
+
).sort((a, b) => utils.compareDates(a.data.pubDate, b.data.pubDate));
|
11
|
+
|
12
|
+
const uniqueTags: string[] = [
|
13
|
+
...new Set(
|
14
|
+
allPosts
|
15
|
+
.flatMap((post) => post.data.tags || [])
|
16
|
+
.filter((tag) => typeof tag === "string" && tag !== "")
|
17
|
+
),
|
18
|
+
];
|
19
|
+
|
20
|
+
return uniqueTags.flatMap((tag) => {
|
21
|
+
const filteredPosts = allPosts.filter((post) =>
|
22
|
+
post.data.tags?.includes(tag)
|
23
|
+
);
|
24
|
+
return paginate(filteredPosts, {
|
25
|
+
params: { tag: tag },
|
26
|
+
props: { posts: filteredPosts, tags: uniqueTags },
|
27
|
+
pageSize: 10,
|
28
|
+
});
|
29
|
+
});
|
30
|
+
}
|
31
|
+
|
32
|
+
const { tag } = Astro.params;
|
33
|
+
const { page, tags } = Astro.props;
|
34
|
+
|
35
|
+
|
36
|
+
console.log("Tag Params:", tag);
|
37
|
+
console.log("Page Props:", page);
|
38
|
+
console.log("Tags Props:", tags);
|
39
|
+
|
40
|
+
---
|
41
|
+
|
42
|
+
<TagsLayout page={page} tags={tags} activeTag={tag} baseurl="/tags/" />
|
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
import "@style/tags/tags.scss";
|
3
|
+
import TagsLayout from "@src/layouts/TagsLayout.astro";
|
4
|
+
import { getCollection, type CollectionEntry } from "astro:content";
|
5
|
+
import { utils } from "@src/utils/utils";
|
6
|
+
const allPosts: CollectionEntry<"blog">[] = (await getCollection("blog")).sort(
|
7
|
+
(a: { data: { pubDate: string; }; }, b: { data: { pubDate: string; }; }) => utils.compareDates(a.data.pubDate, b.data.pubDate)
|
8
|
+
);
|
9
|
+
|
10
|
+
const uniqueTags: string[] = [
|
11
|
+
...new Set(
|
12
|
+
allPosts
|
13
|
+
.flatMap((post) => post.data.tags || [])
|
14
|
+
.filter((tag) => typeof tag === "string" && tag !== "")
|
15
|
+
),
|
16
|
+
];
|
17
|
+
---
|
18
|
+
|
19
|
+
<TagsLayout tags={uniqueTags} baseurl="/tags/" />
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export const SiteConfig: SiteConfig = {
|
2
|
+
site: "https://ww2.minearm.org/",
|
3
|
+
title: "Minearm-RPM & Website",
|
4
|
+
description: "This is a Minearm-RPM & Website",
|
5
|
+
localSearch: true,
|
6
|
+
markdownMath: false,
|
7
|
+
};
|
8
|
+
|
9
|
+
interface SiteConfig {
|
10
|
+
site: string;
|
11
|
+
title: string;
|
12
|
+
description: string;
|
13
|
+
localSearch: boolean;
|
14
|
+
markdownMath: "Katex" | "Mathjax" | true;
|
15
|
+
}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
@use "sass:math";
|
2
|
+
|
3
|
+
@keyframes blink {
|
4
|
+
0%,
|
5
|
+
100% {
|
6
|
+
background: transparent;
|
7
|
+
}
|
8
|
+
50% {
|
9
|
+
background: yellow;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
$keyframes-count: 20; // 创建20个关键帧
|
14
|
+
|
15
|
+
@keyframes shake-hard {
|
16
|
+
@for $i from 1 through $keyframes-count {
|
17
|
+
#{percentage(math.div($i, $keyframes-count))} {
|
18
|
+
transform: translateX(#{random(8) - 4}px)
|
19
|
+
translateY(#{random(8) - 4}px)
|
20
|
+
rotate(#{random(20) - 10}deg);
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
@keyframes darken {
|
26
|
+
0% {
|
27
|
+
filter: brightness(1);
|
28
|
+
}
|
29
|
+
100% {
|
30
|
+
filter: brightness(0.8);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
@keyframes appear_blur {
|
35
|
+
0% {
|
36
|
+
opacity: 0;
|
37
|
+
|
38
|
+
backdrop-filter: blur(0);
|
39
|
+
}
|
40
|
+
100% {
|
41
|
+
opacity: 1;
|
42
|
+
|
43
|
+
backdrop-filter: blur(10px);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
@keyframes appear_rise {
|
48
|
+
0% {
|
49
|
+
transform: translateY(60px);
|
50
|
+
|
51
|
+
opacity: 0;
|
52
|
+
}
|
53
|
+
100% {
|
54
|
+
transform: translateY(0);
|
55
|
+
|
56
|
+
opacity: 1;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
@keyframes disappear_blur {
|
61
|
+
0% {
|
62
|
+
opacity: 1;
|
63
|
+
|
64
|
+
backdrop-filter: blur(10px);
|
65
|
+
}
|
66
|
+
100% {
|
67
|
+
opacity: 0;
|
68
|
+
|
69
|
+
backdrop-filter: blur(0);
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
@keyframes disappear_fall {
|
74
|
+
0% {
|
75
|
+
transform: translateY(0);
|
76
|
+
|
77
|
+
opacity: 1;
|
78
|
+
}
|
79
|
+
100% {
|
80
|
+
transform: translateY(60px);
|
81
|
+
|
82
|
+
opacity: 0;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
@keyframes floating {
|
87
|
+
0%,
|
88
|
+
100% {
|
89
|
+
transform: translateY(0);
|
90
|
+
}
|
91
|
+
50% {
|
92
|
+
transform: translateY(-8px);
|
93
|
+
}
|
94
|
+
}
|