minearm-website 0.1.2 → 0.2.0
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/.hintrc +16 -0
- package/LICENSE.md +21 -21
- package/README.md +11 -7
- package/astro.config.ts +37 -37
- package/package.json +64 -63
- package/public/13.jpg +0 -0
- package/public/scripts/mdata.json +2 -2
- package/public/scripts/searchData.json +47 -0
- package/src/components/Search.astro +1 -1
- package/src/components/icons/bilibili.astro +1 -2
- package/src/components/icons/c.astro +1 -2
- package/src/components/icons/cube.astro +1 -2
- package/src/components/icons/hardDriver.astro +1 -2
- package/src/components/icons/home.astro +1 -2
- package/src/components/loading/loading.vue +1 -13
- package/src/components/postlist/pagination.astro +39 -25
- package/src/components/postlist/postsList.astro +1 -1
- package/src/content/blog/Extended Search.md +50 -0
- package/src/content/blog/Mail.md +15 -0
- package/src/content/blog/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 +1 -0
- package/src/content/blog/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 +99 -100
- package/src/content/blog/it/Rust/345/237/272/346/234/254/350/257/255/346/263/225.md +14 -0
- package/src/pages/404.md +1 -2
- package/src/pages/[...page].astro +13 -10
- package/src/pages/about/index.md +11 -7
- package/src/pages/blog/[...slug].astro +1 -1
- package/src/pages/categories/index.astro +2 -2
- package/src/pages/tags/index.astro +3 -2
- package/src/styles/blog/dist/blog.css +59 -0
- package/src/styles/blog/dist/code.css +59 -0
- package/src/styles/blog/dist/index.css +1 -0
- package/src/styles/blog/dist/post.css +246 -0
- package/src/styles/components/aside.scss +1 -1
- package/src/styles/components/dist/footer.css +29 -0
- package/src/styles/components/dist/index.css +1 -0
- package/src/styles/components/dist/page-content.css +60 -0
- package/src/styles/components/header.scss +1 -1
- package/src/styles/components/main.scss +1 -1
- package/src/styles/dist/animation.css +8 -0
- package/src/styles/dist/custom.css +10 -0
- package/src/styles/dist/global.css +1095 -0
- package/src/styles/dist/mixin.css +0 -0
- package/src/styles/global.scss +2 -2
- package/src/styles/tags/tags.scss +13 -23
- package/src/theme_config.ts +5 -6
- package/src/components/icons/game.astro +0 -10
- package/src/lib/posts.js +0 -21
@@ -23,6 +23,7 @@ category: 'Rust'
|
|
23
23
|
这些基础概念将存在于每个 Rust 程序中,及早学习它们将使你以最快的速度学习 Rust 的使用。
|
24
24
|
|
25
25
|
# 变量
|
26
|
+
|
26
27
|
首先必须说明,Rust 是强类型语言,但具有自动判断变量类型的能力。这很容易让人与弱类型语言产生混淆。
|
27
28
|
|
28
29
|
默认情况下,Rust 中的变量是不可变的,除非使用 mut 关键字声明为可变变量。
|
@@ -110,6 +111,7 @@ fn add(a: i32, b: i32) -> i32 {
|
|
110
111
|
如果函数没有返回值,类型默认为 ()(即空元组)。
|
111
112
|
|
112
113
|
**控制流**
|
114
|
+
|
113
115
|
# if 表达式
|
114
116
|
|
115
117
|
- 实例
|
@@ -121,6 +123,7 @@ if number < 5 {
|
|
121
123
|
println!("大于等于 5");
|
122
124
|
}
|
123
125
|
```
|
126
|
+
|
124
127
|
# loop 循环
|
125
128
|
|
126
129
|
loop 是 Rust 中的无限循环,可以使用 break 退出循环。
|
@@ -155,7 +158,9 @@ for number in 1..4 {
|
|
155
158
|
println!("{}!", number);
|
156
159
|
}
|
157
160
|
```
|
161
|
+
|
158
162
|
# 所有权
|
163
|
+
|
159
164
|
Rust 中的所有权是独特的内存管理机制,核心概念包括所有权 (ownership)、借用 (borrowing) 和引用 (reference)。
|
160
165
|
|
161
166
|
所有权规则:
|
@@ -168,8 +173,11 @@ let s1 = String::from("hello");
|
|
168
173
|
let s2 = s1; // s1 的所有权被转移给了 s2
|
169
174
|
// println!("{}", s1); // 此处编译会报错,因为 s1 已不再拥有该值
|
170
175
|
```
|
176
|
+
|
171
177
|
# 借用和引用
|
178
|
+
|
172
179
|
借用允许引用数据而不获取所有权,通过 & 符号实现。
|
180
|
+
|
173
181
|
```rust
|
174
182
|
fn main() {
|
175
183
|
let s = String::from("hello");
|
@@ -181,6 +189,7 @@ fn calculate_length(s: &String) -> usize {
|
|
181
189
|
s.len()
|
182
190
|
}
|
183
191
|
```
|
192
|
+
|
184
193
|
# 结构体
|
185
194
|
|
186
195
|
结构体用于创建自定义类型,字段可以包含多种数据类型。
|
@@ -201,6 +210,7 @@ let user1 = User {
|
|
201
210
|
active: true,
|
202
211
|
};
|
203
212
|
```
|
213
|
+
|
204
214
|
# 枚举
|
205
215
|
|
206
216
|
枚举允许定义可能的几种数据类型中的一种。
|
@@ -215,7 +225,9 @@ enum IpAddrKind {
|
|
215
225
|
let four = IpAddrKind::V4;
|
216
226
|
let six = IpAddrKind::V6;
|
217
227
|
```
|
228
|
+
|
218
229
|
# 模式匹配
|
230
|
+
|
219
231
|
match 是 Rust 中强大的控制流工具,类似于 switch 语句。
|
220
232
|
|
221
233
|
- 实例
|
@@ -236,6 +248,7 @@ fn value_in_cents(coin: Coin) -> u8 {
|
|
236
248
|
}
|
237
249
|
}
|
238
250
|
```
|
251
|
+
|
239
252
|
# 错误处理
|
240
253
|
|
241
254
|
Rust 有两种主要的错误处理方式:Result<T, E> 和 Option<T>。
|
@@ -282,6 +295,7 @@ fn longest<'a>(x: &'a str, y: &'a str) -> &'a str {
|
|
282
295
|
}
|
283
296
|
}
|
284
297
|
```
|
298
|
+
|
285
299
|
# 重影
|
286
300
|
|
287
301
|
重影的概念与其他面向对象语言里的"重写"(Override)或"重载"(Overload)是不一样的。重影就是刚才讲述的所谓"重新绑定",之所以加引号就是为了在没有介绍这个概念的时候代替一下概念。
|
package/src/pages/404.md
CHANGED
@@ -6,11 +6,14 @@ import { ThemeConfig } from "@src/theme_config";
|
|
6
6
|
import { utils } from "@src/utils/utils";
|
7
7
|
import { type CollectionEntry, getCollection } from "astro:content";
|
8
8
|
|
9
|
-
export async function getStaticPaths({ paginate }
|
10
|
-
const posts
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
export async function getStaticPaths({ paginate }) {
|
10
|
+
const posts = await getCollection("blog");
|
11
|
+
|
12
|
+
// 根据 pubDate 排序文章
|
13
|
+
const sortedPosts = posts.sort((a, b) => utils.compareDates(a.data.pubDate, b.data.pubDate));
|
14
|
+
|
15
|
+
// 使用 paginate 生成分页路径,每页 10 篇文章
|
16
|
+
return paginate(sortedPosts, { pageSize: 8 });
|
14
17
|
}
|
15
18
|
|
16
19
|
const { page } = Astro.props;
|
@@ -39,11 +42,11 @@ if (!page || !page.data) {
|
|
39
42
|
<PostsList posts={page.data} />
|
40
43
|
{
|
41
44
|
page.lastPage > 1 && (
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
45
|
+
<Pagination
|
46
|
+
baseurl=""
|
47
|
+
currentPage={page.currentPage}
|
48
|
+
totalPages={page.lastPage}
|
49
|
+
/>
|
47
50
|
)
|
48
51
|
}
|
49
52
|
</Fragment>
|
package/src/pages/about/index.md
CHANGED
@@ -8,10 +8,10 @@ useToc: true
|
|
8
8
|
---
|
9
9
|
# Minearm & Website
|
10
10
|
# 本主题是从[HusBlog](https://github.com/KraHsu/HsuBlog.git)改进而来的
|
11
|
-
最新的正式版是0.
|
11
|
+
最新的正式版是0.2.0
|
12
12
|
最新的测试版是0.0.3-beta.4
|
13
13
|
|
14
|
-
但是Minearm & Website做出了很大的改变,比如修复了scss警告和升级astro版本到5.
|
14
|
+
但是Minearm & Website做出了很大的改变,比如修复了scss警告和升级astro版本到5.1.10
|
15
15
|
|
16
16
|
# 效果
|
17
17
|

|
@@ -61,34 +61,38 @@ root
|
|
61
61
|
~~~bash
|
62
62
|
# 安装主题
|
63
63
|
npm i minearm-website
|
64
|
+
git clone https://github.com/Minearm-RPM/Minearm.git node_modules/
|
64
65
|
~~~
|
65
66
|
|
66
67
|
# 进入astro目录
|
67
|
-
~~~
|
68
|
+
~~~bash
|
68
69
|
cd node_modules/minearm-website
|
70
|
+
# 或者(对应上面两种方法)
|
71
|
+
cd node_modules/
|
69
72
|
~~~
|
70
73
|
|
71
|
-
~~~
|
74
|
+
~~~bash
|
72
75
|
# 安装依赖
|
73
76
|
npm install
|
74
77
|
# 更新
|
75
78
|
npm update
|
76
79
|
~~~
|
77
80
|
|
78
|
-
~~~
|
81
|
+
~~~bash
|
79
82
|
# 启动开发预览
|
80
83
|
npm run dev
|
81
84
|
~~~
|
82
85
|
|
83
|
-
~~~
|
86
|
+
~~~bash
|
84
87
|
# 构建和预览
|
85
88
|
npm run build
|
86
89
|
npm run preview
|
87
90
|
~~~
|
88
91
|
|
89
92
|
# 许可证
|
93
|
+
|
90
94
|
本项目在MIT许可证下授权,版权所有©2024
|
91
95
|
|
92
96
|
由Minearm-RPM构建的
|
93
97
|
|
94
|
-
#
|
98
|
+
# 转载时需标明出处
|
@@ -1,5 +1,5 @@
|
|
1
1
|
---
|
2
|
-
import {
|
2
|
+
import { CollectionEntry, getCollection } from "astro:content";
|
3
3
|
import PostLayout from "@src/layouts/PostLayout.astro";
|
4
4
|
import HeroWave from "@comp/header/heroWave.astro";
|
5
5
|
import GetIcon from "@comp/icons/getIcon.astro";
|
@@ -1,11 +1,11 @@
|
|
1
1
|
---
|
2
2
|
import "@style/tags/tags.scss";
|
3
3
|
import TagsLayout from "@src/layouts/TagsLayout.astro";
|
4
|
-
import { getCollection,
|
4
|
+
import { getCollection, CollectionEntry } from "astro:content";
|
5
5
|
import { utils } from "@src/utils/utils";
|
6
6
|
|
7
7
|
const allPosts: CollectionEntry<"blog">[] = (await getCollection("blog")).sort(
|
8
|
-
(a
|
8
|
+
(a, b) => utils.compareDates(a.data.pubDate, b.data.pubDate)
|
9
9
|
);
|
10
10
|
|
11
11
|
const categories: string[] = [
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
2
|
import "@style/tags/tags.scss";
|
3
3
|
import TagsLayout from "@src/layouts/TagsLayout.astro";
|
4
|
-
import { getCollection,
|
4
|
+
import { getCollection, CollectionEntry } from "astro:content";
|
5
5
|
import { utils } from "@src/utils/utils";
|
6
|
+
|
6
7
|
const allPosts: CollectionEntry<"blog">[] = (await getCollection("blog")).sort(
|
7
|
-
(a
|
8
|
+
(a, b) => utils.compareDates(a.data.pubDate, b.data.pubDate)
|
8
9
|
);
|
9
10
|
|
10
11
|
const uniqueTags: string[] = [
|
@@ -0,0 +1,59 @@
|
|
1
|
+
.post-header {
|
2
|
+
width: 100%;
|
3
|
+
padding-top: calc(var(--header-nav-height) + 2rem);
|
4
|
+
font-family: var(--heading-font-family);
|
5
|
+
user-select: none;
|
6
|
+
display: flex;
|
7
|
+
flex-direction: column;
|
8
|
+
justify-content: center;
|
9
|
+
align-items: center;
|
10
|
+
background: linear-gradient(var(--theme-color), var(--body-background-color));
|
11
|
+
}
|
12
|
+
.post-header .post-header-waves-area {
|
13
|
+
position: relative;
|
14
|
+
bottom: 0;
|
15
|
+
margin-top: 2rem;
|
16
|
+
margin-bottom: -10px;
|
17
|
+
}
|
18
|
+
.post-header .post-info .post-title {
|
19
|
+
font-size: 50px;
|
20
|
+
color: var(--font-white-black);
|
21
|
+
}
|
22
|
+
.post-header .post-info .post-metas {
|
23
|
+
display: flex;
|
24
|
+
flex-direction: column;
|
25
|
+
align-items: center;
|
26
|
+
}
|
27
|
+
.post-header .post-info .post-metas .post-meta {
|
28
|
+
display: flex;
|
29
|
+
margin: 0.3rem 0;
|
30
|
+
}
|
31
|
+
.post-header .post-info .post-metas .post-meta .meta-icon {
|
32
|
+
font-size: 18px;
|
33
|
+
margin: 0 0.3rem;
|
34
|
+
color: var(--font-white-black);
|
35
|
+
}
|
36
|
+
.post-container {
|
37
|
+
margin-top: 2rem;
|
38
|
+
max-width: 1400px;
|
39
|
+
width: 100%;
|
40
|
+
display: flex;
|
41
|
+
}
|
42
|
+
.post-container .post-main {
|
43
|
+
margin: 1rem 1rem;
|
44
|
+
border-radius: 15px;
|
45
|
+
background: white;
|
46
|
+
}
|
47
|
+
.post-container .post-aside {
|
48
|
+
border-radius: 15px;
|
49
|
+
}
|
50
|
+
.post-container .post-main {
|
51
|
+
flex: 4;
|
52
|
+
order: 2;
|
53
|
+
padding: 1rem 2rem;
|
54
|
+
@card-style ();
|
55
|
+
}
|
56
|
+
.post-container .post-aside {
|
57
|
+
flex: 1;
|
58
|
+
order: 1;
|
59
|
+
}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
[data-theme=dark]:root {
|
2
|
+
--astro-code-color-background: #1f2430;
|
3
|
+
--astro-code-color-text: #cccac2;
|
4
|
+
--astro-code-token-constant: #dfbfff;
|
5
|
+
--astro-code-token-string: #d5ff80;
|
6
|
+
--astro-code-token-comment: #b8cfe6;
|
7
|
+
--astro-code-token-keyword: #ffad66;
|
8
|
+
--astro-code-token-parameter: #695380;
|
9
|
+
--astro-code-token-function: #ffcb6f;
|
10
|
+
--astro-code-token-string-expression: #5ccfe6;
|
11
|
+
--astro-code-token-punctuation: #cccac2;
|
12
|
+
--astro-code-token-link: #87d96c;
|
13
|
+
--astro-code-color-ansi-black: #000000;
|
14
|
+
--astro-code-color-ansi-black-dim: #00000080;
|
15
|
+
--astro-code-color-ansi-red: #bb0000;
|
16
|
+
--astro-code-color-ansi-red-dim: #bb000080;
|
17
|
+
--astro-code-color-ansi-green: #00bb00;
|
18
|
+
--astro-code-color-ansi-green-dim: #00bb0080;
|
19
|
+
--astro-code-color-ansi-yellow: #bbbb00;
|
20
|
+
--astro-code-color-ansi-yellow-dim: #bbbb0080;
|
21
|
+
--astro-code-color-ansi-blue: #0000bb;
|
22
|
+
--astro-code-color-ansi-blue-dim: #0000bb80;
|
23
|
+
--astro-code-color-ansi-magenta: #ff00ff;
|
24
|
+
--astro-code-color-ansi-magenta-dim: #ff00ff80;
|
25
|
+
--astro-code-color-ansi-cyan: #00bbbb;
|
26
|
+
--astro-code-color-ansi-cyan-dim: #00bbbb80;
|
27
|
+
--astro-code-color-ansi-white: #eeeeee;
|
28
|
+
--astro-code-color-ansi-white-dim: #eeeeee80;
|
29
|
+
--astro-code-color-ansi-bright-black: #555555;
|
30
|
+
--astro-code-color-ansi-bright-black-dim: #55555580;
|
31
|
+
--astro-code-color-ansi-bright-red: #ff5555;
|
32
|
+
--astro-code-color-ansi-bright-red-dim: #ff555580;
|
33
|
+
--astro-code-color-ansi-bright-green: #00ff00;
|
34
|
+
--astro-code-color-ansi-bright-green-dim: #00ff0080;
|
35
|
+
--astro-code-color-ansi-bright-yellow: #ffff55;
|
36
|
+
--astro-code-color-ansi-bright-yellow-dim: #ffff5580;
|
37
|
+
--astro-code-color-ansi-bright-blue: #5555ff;
|
38
|
+
--astro-code-color-ansi-bright-blue-dim: #5555ff80;
|
39
|
+
--astro-code-color-ansi-bright-magenta: #ff55ff;
|
40
|
+
--astro-code-color-ansi-bright-magenta-dim: #ff55ff80;
|
41
|
+
--astro-code-color-ansi-bright-cyan: #55ffff;
|
42
|
+
--astro-code-color-ansi-bright-cyan-dim: #55ffff80;
|
43
|
+
--astro-code-color-ansi-bright-white: #ffffff;
|
44
|
+
--astro-code-color-ansi-bright-white-dim: #ffffff80;
|
45
|
+
}
|
46
|
+
|
47
|
+
[data-theme=light]:root {
|
48
|
+
--astro-code-color-background: #fdfdfd;
|
49
|
+
--astro-code-color-text: #8a9199;
|
50
|
+
--astro-code-token-constant: #a37acc;
|
51
|
+
--astro-code-token-string: #86b300;
|
52
|
+
--astro-code-token-comment: #787b8099;
|
53
|
+
--astro-code-token-keyword: #fa8d3e;
|
54
|
+
--astro-code-token-parameter: #9f40ffcc;
|
55
|
+
--astro-code-token-function: #f2ae49;
|
56
|
+
--astro-code-token-string-expression: #55b4d4;
|
57
|
+
--astro-code-token-punctuation: #5c6166;
|
58
|
+
--astro-code-token-link: #6cbf43;
|
59
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import url();
|
@@ -0,0 +1,246 @@
|
|
1
|
+
.post-main {
|
2
|
+
display: flex;
|
3
|
+
flex-direction: column;
|
4
|
+
font-size: var(--font-post-size);
|
5
|
+
}
|
6
|
+
.post-main h1,
|
7
|
+
.post-main h2,
|
8
|
+
.post-main h3,
|
9
|
+
.post-main h4,
|
10
|
+
.post-main h5,
|
11
|
+
.post-main h6 {
|
12
|
+
cursor: default;
|
13
|
+
transition: 0.3s ease-in-out;
|
14
|
+
user-select: none;
|
15
|
+
font-family: var(--heading-font-family);
|
16
|
+
}
|
17
|
+
.post-main h1:before,
|
18
|
+
.post-main h2:before,
|
19
|
+
.post-main h3:before,
|
20
|
+
.post-main h4:before,
|
21
|
+
.post-main h5:before,
|
22
|
+
.post-main h6:before {
|
23
|
+
content: "#";
|
24
|
+
}
|
25
|
+
.post-main h1:hover,
|
26
|
+
.post-main h2:hover,
|
27
|
+
.post-main h3:hover,
|
28
|
+
.post-main h4:hover,
|
29
|
+
.post-main h5:hover,
|
30
|
+
.post-main h6:hover {
|
31
|
+
color: var(--theme-color);
|
32
|
+
margin-left: 10px;
|
33
|
+
}
|
34
|
+
.post-main img {
|
35
|
+
cursor: pointer;
|
36
|
+
width: 100%;
|
37
|
+
transition: 0.3s;
|
38
|
+
}
|
39
|
+
.post-main img:hover {
|
40
|
+
transform: scale(1.03);
|
41
|
+
filter: brightness(0.8);
|
42
|
+
}
|
43
|
+
.post-main .image {
|
44
|
+
display: flex;
|
45
|
+
flex-direction: column;
|
46
|
+
align-items: center;
|
47
|
+
}
|
48
|
+
.post-main .image .img-wrap {
|
49
|
+
width: 80%;
|
50
|
+
border-radius: 15px;
|
51
|
+
display: flex;
|
52
|
+
overflow: hidden;
|
53
|
+
box-shadow: var(--card-shadow);
|
54
|
+
transition: 0.3s;
|
55
|
+
}
|
56
|
+
.post-main .image .img-wrap:hover {
|
57
|
+
box-shadow: var(--card-tiny-shadow);
|
58
|
+
}
|
59
|
+
.post-main .image .img-comment {
|
60
|
+
margin-top: 5px;
|
61
|
+
color: var(--font-light-grey);
|
62
|
+
}
|
63
|
+
.post-main p > code {
|
64
|
+
font-size: 16px;
|
65
|
+
color: var(--font-code-color);
|
66
|
+
background: var(--font-code-background);
|
67
|
+
padding: 0px 4px 2px 4px;
|
68
|
+
border-radius: 4px;
|
69
|
+
}
|
70
|
+
.post-main blockquote {
|
71
|
+
margin: 0;
|
72
|
+
padding: 0.5rem 2rem;
|
73
|
+
margin: 0.5rem 0;
|
74
|
+
display: flex;
|
75
|
+
justify-content: center;
|
76
|
+
}
|
77
|
+
.post-main blockquote i {
|
78
|
+
margin: 0 1rem;
|
79
|
+
font-size: 24px;
|
80
|
+
color: var(--font-light-grey);
|
81
|
+
}
|
82
|
+
.post-main blockquote i.fa-quote-right {
|
83
|
+
align-self: end;
|
84
|
+
}
|
85
|
+
.post-main blockquote p {
|
86
|
+
margin: 0;
|
87
|
+
}
|
88
|
+
.post-main ul {
|
89
|
+
list-style-type: disc;
|
90
|
+
padding-left: 20px;
|
91
|
+
}
|
92
|
+
.post-main ol {
|
93
|
+
padding-left: 20px;
|
94
|
+
}
|
95
|
+
.post-main .table-wrap {
|
96
|
+
margin: 0 auto;
|
97
|
+
border-radius: 10px;
|
98
|
+
overflow: hidden;
|
99
|
+
box-shadow: var(--card-shadow);
|
100
|
+
transition: 0.3s;
|
101
|
+
user-select: none;
|
102
|
+
}
|
103
|
+
.post-main .table-wrap:hover {
|
104
|
+
box-shadow: var(--card-tiny-shadow);
|
105
|
+
}
|
106
|
+
.post-main table {
|
107
|
+
display: table;
|
108
|
+
border-spacing: 0px;
|
109
|
+
border-collapse: collapse;
|
110
|
+
empty-cells: show;
|
111
|
+
}
|
112
|
+
.post-main table thead {
|
113
|
+
background: #eee;
|
114
|
+
}
|
115
|
+
.post-main table th,
|
116
|
+
.post-main table td {
|
117
|
+
border: 1px solid #e3e8f7;
|
118
|
+
padding: 0.3rem 0.6rem;
|
119
|
+
vertical-align: middle;
|
120
|
+
}
|
121
|
+
.post-main mark {
|
122
|
+
position: relative;
|
123
|
+
background: none;
|
124
|
+
}
|
125
|
+
.post-main mark:before {
|
126
|
+
position: absolute;
|
127
|
+
content: "";
|
128
|
+
left: 0;
|
129
|
+
top: calc((var(--font-post-size) / 2));
|
130
|
+
width: 100%;
|
131
|
+
height: calc((var(--font-post-size) / 2));
|
132
|
+
background: var(--mark-background);
|
133
|
+
opacity: 0.4;
|
134
|
+
}
|
135
|
+
.post-main a {
|
136
|
+
text-decoration: none;
|
137
|
+
color: var(--link-color);
|
138
|
+
}
|
139
|
+
.post-main .link i {
|
140
|
+
margin-left: 4px;
|
141
|
+
font-size: 16px;
|
142
|
+
height: 100%;
|
143
|
+
}
|
144
|
+
.post-main .contains-task-list {
|
145
|
+
list-style-type: none;
|
146
|
+
padding: 0;
|
147
|
+
}
|
148
|
+
|
149
|
+
.post-aside {
|
150
|
+
margin-top: 1rem;
|
151
|
+
width: 300px;
|
152
|
+
}
|
153
|
+
.post-aside .card-toc {
|
154
|
+
font-size: 18px;
|
155
|
+
padding: 0.5rem 1rem;
|
156
|
+
}
|
157
|
+
.post-aside .card-toc .card-toc-header {
|
158
|
+
font-size: 24px;
|
159
|
+
font-weight: 600;
|
160
|
+
margin: 10px 0;
|
161
|
+
}
|
162
|
+
.post-aside .card-toc .toc {
|
163
|
+
list-style-type: none;
|
164
|
+
padding: 0;
|
165
|
+
margin: 0;
|
166
|
+
padding-left: 10px;
|
167
|
+
margin-left: 5px;
|
168
|
+
border-left: 2px solid var(--border-light-grey);
|
169
|
+
}
|
170
|
+
.post-aside .card-toc .toc .toc-item {
|
171
|
+
transition: 0.2s;
|
172
|
+
font-weight: 600;
|
173
|
+
}
|
174
|
+
.post-aside .card-toc .toc .toc-item .toc-link {
|
175
|
+
display: block;
|
176
|
+
max-width: 90%;
|
177
|
+
text-decoration: none;
|
178
|
+
color: var(--font-black-white);
|
179
|
+
transition: 0.3s;
|
180
|
+
}
|
181
|
+
.post-aside .card-toc .toc .toc-item .toc-link .toc-text {
|
182
|
+
width: 100%;
|
183
|
+
display: inline-block;
|
184
|
+
white-space: nowrap;
|
185
|
+
overflow: hidden;
|
186
|
+
text-overflow: ellipsis;
|
187
|
+
color: var(--font-light-grey);
|
188
|
+
transition: 0.2s;
|
189
|
+
}
|
190
|
+
.post-aside .card-toc .toc .toc-item .toc-link .toc-text:before {
|
191
|
+
content: "#";
|
192
|
+
display: inline;
|
193
|
+
}
|
194
|
+
.post-aside .card-toc .toc .toc-item:hover .toc-link .toc-text {
|
195
|
+
padding-left: 10px;
|
196
|
+
color: var(--theme-color);
|
197
|
+
}
|
198
|
+
|
199
|
+
.code-block {
|
200
|
+
position: relative;
|
201
|
+
margin: 0.5rem 3rem;
|
202
|
+
border-radius: 10px;
|
203
|
+
overflow: hidden;
|
204
|
+
user-select: none;
|
205
|
+
box-shadow: var(--card-shadow);
|
206
|
+
transition: 0.3s;
|
207
|
+
}
|
208
|
+
.code-block:hover {
|
209
|
+
box-shadow: var(--card-tiny-shadow);
|
210
|
+
}
|
211
|
+
.code-block .code-lang {
|
212
|
+
padding: 0.5rem 1rem;
|
213
|
+
background: var(--codeblock-background-grey);
|
214
|
+
font-weight: 600;
|
215
|
+
color: var(--font-light-grey);
|
216
|
+
}
|
217
|
+
.code-block .code-wrap {
|
218
|
+
padding: 0 1rem;
|
219
|
+
font-size: var(--font-code-size);
|
220
|
+
background: var(--astro-code-color-background);
|
221
|
+
}
|
222
|
+
.code-block .code-wrap pre {
|
223
|
+
margin: 0;
|
224
|
+
padding: 1rem;
|
225
|
+
}
|
226
|
+
.code-block .code-copy {
|
227
|
+
position: absolute;
|
228
|
+
top: 2.8rem;
|
229
|
+
right: 0.5rem;
|
230
|
+
width: 36px;
|
231
|
+
height: 36px;
|
232
|
+
color: var(--codeblock-copybutton-grey);
|
233
|
+
opacity: 0;
|
234
|
+
cursor: pointer;
|
235
|
+
transition: 0.3s;
|
236
|
+
}
|
237
|
+
.code-block .code-copy i {
|
238
|
+
font-size: 36px;
|
239
|
+
}
|
240
|
+
.code-block .code-copy:hover {
|
241
|
+
opacity: 1;
|
242
|
+
}
|
243
|
+
|
244
|
+
.target-to {
|
245
|
+
animation: 0.5s blink 3;
|
246
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#site-footer {
|
2
|
+
position: relative;
|
3
|
+
bottom: 0;
|
4
|
+
display: flex;
|
5
|
+
align-items: center;
|
6
|
+
justify-content: center;
|
7
|
+
width: 100%;
|
8
|
+
margin-top: 1rem;
|
9
|
+
padding: 15px 25px;
|
10
|
+
user-select: none;
|
11
|
+
background: var(--background-white);
|
12
|
+
}
|
13
|
+
#site-footer .footer-container {
|
14
|
+
display: flex;
|
15
|
+
flex-basis: auto;
|
16
|
+
justify-content: space-between;
|
17
|
+
width: 100%;
|
18
|
+
max-width: 1400px;
|
19
|
+
padding: 0 2rem;
|
20
|
+
justify-items: center;
|
21
|
+
}
|
22
|
+
#site-footer .footer-container .footer-link {
|
23
|
+
text-decoration: none;
|
24
|
+
color: var(--font-black-white);
|
25
|
+
font-weight: 600;
|
26
|
+
}
|
27
|
+
#site-footer .footer-container .footer-link:hover {
|
28
|
+
color: var(--theme-color);
|
29
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import url();
|
@@ -0,0 +1,60 @@
|
|
1
|
+
#main-container {
|
2
|
+
display: flex;
|
3
|
+
align-items: center;
|
4
|
+
flex-direction: column;
|
5
|
+
}
|
6
|
+
#main-container .hero-shoot {
|
7
|
+
position: relative;
|
8
|
+
top: var(--header-nav-height);
|
9
|
+
display: flex;
|
10
|
+
flex-direction: column;
|
11
|
+
width: 100vw;
|
12
|
+
height: calc(100vh - var(--header-nav-height));
|
13
|
+
margin-bottom: 1rem;
|
14
|
+
font-family: var(--heading-font-family);
|
15
|
+
}
|
16
|
+
#main-container .hero-shoot .hero-img {
|
17
|
+
position: absolute;
|
18
|
+
z-index: 1;
|
19
|
+
inset: 0;
|
20
|
+
}
|
21
|
+
#main-container .hero-shoot .hero-img::after {
|
22
|
+
position: absolute;
|
23
|
+
z-index: 2;
|
24
|
+
display: block;
|
25
|
+
content: " ";
|
26
|
+
opacity: 0.2;
|
27
|
+
background: var(--light-grey);
|
28
|
+
inset: 0;
|
29
|
+
}
|
30
|
+
#main-container .hero-shoot .hero-title {
|
31
|
+
position: relative;
|
32
|
+
z-index: 3;
|
33
|
+
display: block;
|
34
|
+
margin: calc(50vh - 80px - var(--header-nav-height) - 2rem) auto 2rem;
|
35
|
+
background: linear-gradient(315deg, #ff94d6 25%, #ffa238);
|
36
|
+
background-clip: text;
|
37
|
+
-webkit-background-clip: text;
|
38
|
+
font-size: 80px;
|
39
|
+
-webkit-text-fill-color: transparent;
|
40
|
+
}
|
41
|
+
#main-container .hero-shoot .hero-desc {
|
42
|
+
z-index: 3;
|
43
|
+
margin: 0 auto;
|
44
|
+
color: var(--font-white);
|
45
|
+
font-size: 40px;
|
46
|
+
}
|
47
|
+
|
48
|
+
#inner-container {
|
49
|
+
display: flex;
|
50
|
+
max-width: 1350px;
|
51
|
+
padding: 4.2rem 1.5rem 0;
|
52
|
+
}
|
53
|
+
#inner-container .main-content {
|
54
|
+
width: 930px;
|
55
|
+
margin: 0 0.5rem;
|
56
|
+
}
|
57
|
+
#inner-container .aside-content {
|
58
|
+
width: 300px;
|
59
|
+
margin: 0 0.5rem;
|
60
|
+
}
|