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.
Files changed (123) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +67 -0
  3. package/astro.config.ts +33 -0
  4. package/minearm.ts +174 -0
  5. package/package.json +64 -0
  6. package/public/13.jpg +0 -0
  7. package/public/1937daxue.png +0 -0
  8. package/public/3.png +0 -0
  9. package/public/404.png +0 -0
  10. package/public/5.jpg +0 -0
  11. package/public/BC.png +0 -0
  12. package/public/Chinese.png +0 -0
  13. package/public/avatar.avif +0 -0
  14. package/public/avatar.jpg +0 -0
  15. package/public/c++1.png +0 -0
  16. package/public/docker-hub.png +0 -0
  17. package/public/favicon.png +0 -0
  18. package/public/help1.png +0 -0
  19. package/public/heroimg.jpg +0 -0
  20. package/public/logo.png +0 -0
  21. package/public/mail.png +0 -0
  22. package/public/nahida.png +0 -0
  23. package/public/pojipao.avif +0 -0
  24. package/public/rust1.png +0 -0
  25. package/public/scripts/mdata.json +4 -0
  26. package/public/scripts/utils.js +190 -0
  27. package/public/xmrig.jpg +0 -0
  28. package/src/components/BodyInject.astro +5 -0
  29. package/src/components/HeadInject.astro +16 -0
  30. package/src/components/Search.astro +30 -0
  31. package/src/components/animation/bubbles.astro +82 -0
  32. package/src/components/animation/wave.astro +81 -0
  33. package/src/components/aside/announcement.astro +25 -0
  34. package/src/components/aside/aside.astro +32 -0
  35. package/src/components/aside/asideComps.astro +26 -0
  36. package/src/components/aside/authorInfo.astro +54 -0
  37. package/src/components/aside/blogToc.astro +26 -0
  38. package/src/components/aside/countScript.astro +18 -0
  39. package/src/components/aside/customCard.astro +23 -0
  40. package/src/components/aside/siteInfo.astro +51 -0
  41. package/src/components/client/searchCore.vue +77 -0
  42. package/src/components/client/themeControl.vue +77 -0
  43. package/src/components/footer/Footer.astro +32 -0
  44. package/src/components/header/Header.astro +40 -0
  45. package/src/components/header/HeaderButton.astro +59 -0
  46. package/src/components/header/HeaderItem.astro +63 -0
  47. package/src/components/header/heroWave.astro +19 -0
  48. package/src/components/header/searchBar.astro +21 -0
  49. package/src/components/icons/bilibili.astro +10 -0
  50. package/src/components/icons/c.astro +10 -0
  51. package/src/components/icons/code.astro +37 -0
  52. package/src/components/icons/computer.astro +4 -0
  53. package/src/components/icons/cube.astro +10 -0
  54. package/src/components/icons/game.astro +10 -0
  55. package/src/components/icons/getIcon.astro +64 -0
  56. package/src/components/icons/github.astro +10 -0
  57. package/src/components/icons/hardDriver.astro +10 -0
  58. package/src/components/icons/home.astro +14 -0
  59. package/src/components/icons/icon.ts +33 -0
  60. package/src/components/icons/icons.json +91961 -0
  61. package/src/components/icons/link.astro +4 -0
  62. package/src/components/icons/mail.astro +10 -0
  63. package/src/components/icons/paperPlane.astro +4 -0
  64. package/src/components/icons/pen.astro +14 -0
  65. package/src/components/icons/person.astro +14 -0
  66. package/src/components/icons/searchicon.astro +23 -0
  67. package/src/components/icons/tags.astro +10 -0
  68. package/src/components/icons/toTop.astro +10 -0
  69. package/src/components/icons/tools.astro +1 -0
  70. package/src/components/loading/loading.vue +185 -0
  71. package/src/components/postComment.astro +62 -0
  72. package/src/components/postlist/pagination.astro +40 -0
  73. package/src/components/postlist/postsList.astro +57 -0
  74. package/src/content/blog/default/Extended Search.md +50 -0
  75. package/src/content/blog/default/Mail.md +15 -0
  76. 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
  77. 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
  78. package/src/content/blog/default/it/Rust/345/237/272/346/234/254/350/257/255/346/263/225.md +298 -0
  79. package/src/content/config.ts +38 -0
  80. package/src/env.d.ts +148 -0
  81. package/src/layouts/BaseLayout.astro +67 -0
  82. package/src/layouts/DefaultMdLayout.astro +46 -0
  83. package/src/layouts/HomeLayout.astro +27 -0
  84. package/src/layouts/PostLayout.astro +60 -0
  85. package/src/layouts/TagsLayout.astro +44 -0
  86. package/src/layouts/c.astro +42 -0
  87. package/src/layouts/h.astro +60 -0
  88. package/src/pages/404.md +10 -0
  89. package/src/pages/[...page].astro +46 -0
  90. package/src/pages/about/index.md +90 -0
  91. package/src/pages/blog/[...slug].astro +68 -0
  92. package/src/pages/categories/[category]/[...page].astro +45 -0
  93. package/src/pages/categories/index.astro +20 -0
  94. package/src/pages/friends/index.md +24 -0
  95. package/src/pages/rss.xml.js +20 -0
  96. package/src/pages/tags/[tag]/[...page].astro +42 -0
  97. package/src/pages/tags/index.astro +19 -0
  98. package/src/site_config.ts +15 -0
  99. package/src/styles/animation.scss +94 -0
  100. package/src/styles/blog/blog.scss +124 -0
  101. package/src/styles/blog/code.scss +111 -0
  102. package/src/styles/blog/directives.scss +356 -0
  103. package/src/styles/blog/index.scss +4 -0
  104. package/src/styles/blog/post.scss +474 -0
  105. package/src/styles/components/aside.scss +178 -0
  106. package/src/styles/components/footer.scss +74 -0
  107. package/src/styles/components/header.scss +421 -0
  108. package/src/styles/components/heroWave.scss +24 -0
  109. package/src/styles/components/main.scss +275 -0
  110. package/src/styles/components/page-content.scss +147 -0
  111. package/src/styles/components/pagination.scss +121 -0
  112. package/src/styles/components/search.scss +349 -0
  113. package/src/styles/custom.scss +21 -0
  114. package/src/styles/global.scss +167 -0
  115. package/src/styles/mixin.scss +17 -0
  116. package/src/styles/tags/tags.scss +83 -0
  117. package/src/theme_config.ts +178 -0
  118. package/src/utils/generateSearchData.ts +30 -0
  119. package/src/utils/md.ts +114 -0
  120. package/src/utils/processMd.ts +278 -0
  121. package/src/utils/utils.ts +87 -0
  122. package/tsconfig.json +32 -0
  123. package/vercel.json +26 -0
@@ -0,0 +1,4 @@
1
+ ---
2
+
3
+ ---
4
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path fill="currentColor" d="M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"/></svg>
@@ -0,0 +1,10 @@
1
+ ---
2
+ ---
3
+
4
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"
5
+ ><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
6
+ <path
7
+ fill="currentColor"
8
+ d="M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"
9
+ ></path></svg
10
+ >
@@ -0,0 +1,4 @@
1
+ ---
2
+
3
+ ---
4
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.7L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"/></svg>
@@ -0,0 +1,14 @@
1
+ <svg
2
+ aria-hidden="true"
3
+ focusable="false"
4
+ data-prefix="fas"
5
+ data-icon="pen-fancy"
6
+ role="img"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ viewBox="0 0 512 512"
9
+ data-fa-i2svg=""
10
+ ><path
11
+ fill="currentColor"
12
+ d="M373.5 27.1C388.5 9.9 410.2 0 433 0c43.6 0 79 35.4 79 79c0 22.8-9.9 44.6-27.1 59.6L277.7 319l-10.3-10.3-64-64L193 234.3 373.5 27.1zM170.3 256.9l10.4 10.4 64 64 10.4 10.4-19.2 83.4c-3.9 17.1-16.9 30.7-33.8 35.4L24.4 510.3l95.4-95.4c2.6 .7 5.4 1.1 8.3 1.1c17.7 0 32-14.3 32-32s-14.3-32-32-32s-32 14.3-32 32c0 2.9 .4 5.6 1.1 8.3L1.7 487.6 51.5 310c4.7-16.9 18.3-29.9 35.4-33.8l83.4-19.2z"
13
+ ></path></svg
14
+ >
@@ -0,0 +1,14 @@
1
+ <svg
2
+ aria-hidden="true"
3
+ focusable="false"
4
+ data-prefix="fas"
5
+ data-icon="address-card"
6
+ role="img"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ viewBox="0 0 576 512"
9
+ data-fa-i2svg=""
10
+ ><path
11
+ fill="currentColor"
12
+ d="M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H512c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 256h64c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80zm-32-96a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zm256-32H496c8.8 0 16 7.2 16 16s-7.2 16-16 16H368c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64H496c8.8 0 16 7.2 16 16s-7.2 16-16 16H368c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64H496c8.8 0 16 7.2 16 16s-7.2 16-16 16H368c-8.8 0-16-7.2-16-16s7.2-16 16-16z"
13
+ ></path></svg
14
+ >
@@ -0,0 +1,23 @@
1
+ ---
2
+ ---
3
+
4
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" fill="none"
5
+ ><path
6
+ stroke="currentColor"
7
+ d="M21 38C30.3888 38 38 30.3888 38 21C38 11.6112 30.3888 4 21 4C11.6112 4 4 11.6112 4 21C4 30.3888 11.6112 38 21 38Z"
8
+ fill="none"
9
+ stroke-width="6"
10
+ stroke-linejoin="round"></path>
11
+ <path
12
+ stroke="currentColor"
13
+ d="M26.657 14.3431C25.2093 12.8954 23.2093 12 21.0001 12C18.791 12 16.791 12.8954 15.3433 14.3431"
14
+ stroke-width="6"
15
+ stroke-linecap="round"
16
+ stroke-linejoin="round"></path>
17
+ <path
18
+ stroke="currentColor"
19
+ d="M33.2216 33.2217L41.7069 41.707"
20
+ stroke-width="6"
21
+ stroke-linecap="round"
22
+ stroke-linejoin="round"></path>
23
+ </svg>
@@ -0,0 +1,10 @@
1
+ ---
2
+ ---
3
+
4
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"
5
+ ><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
6
+ <path
7
+ fill="currentColor"
8
+ d="M345 39.1L472.8 168.4c52.4 53 52.4 138.2 0 191.2L360.8 472.9c-9.3 9.4-24.5 9.5-33.9 .2s-9.5-24.5-.2-33.9L438.6 325.9c33.9-34.3 33.9-89.4 0-123.7L310.9 72.9c-9.3-9.4-9.2-24.6 .2-33.9s24.6-9.2 33.9 .2zM0 229.5V80C0 53.5 21.5 32 48 32H197.5c17 0 33.3 6.7 45.3 18.7l168 168c25 25 25 65.5 0 90.5L277.3 442.7c-25 25-65.5 25-90.5 0l-168-168C6.7 262.7 0 246.5 0 229.5zM144 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"
9
+ ></path></svg
10
+ >
@@ -0,0 +1,10 @@
1
+ ---
2
+ ---
3
+
4
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
5
+ <!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
6
+ <path
7
+ fill="currentColor"
8
+ d="M246.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L224 109.3 361.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160zm160 352l-160-160c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L224 301.3 361.4 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3z"
9
+ ></path>
10
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M78.6 5C69.1-2.4 55.6-1.5 47 7L7 47c-8.5 8.5-9.4 22-2.1 31.6l80 104c4.5 5.9 11.6 9.4 19 9.4h54.1l109 109c-14.7 29-10 65.4 14.3 89.6l112 112c12.5 12.5 32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3l-112-112c-24.2-24.2-60.6-29-89.6-14.3l-109-109V104c0-7.5-3.5-14.5-9.4-19L78.6 5zM19.9 396.1C7.2 408.8 0 426.1 0 444.1C0 481.6 30.4 512 67.9 512c18 0 35.3-7.2 48-19.9L233.7 374.3c-7.8-20.9-9-43.6-3.6-65.1l-61.7-61.7L19.9 396.1zM512 144c0-10.5-1.1-20.7-3.2-30.5c-2.4-11.2-16.1-14.1-24.2-6l-63.9 63.9c-3 3-7.1 4.7-11.3 4.7H352c-8.8 0-16-7.2-16-16V102.6c0-4.2 1.7-8.3 4.7-11.3l63.9-63.9c8.1-8.1 5.2-21.8-6-24.2C388.7 1.1 378.5 0 368 0C288.5 0 224 64.5 224 144l0 .8 85.3 85.3c36-9.1 75.8 .5 104 28.7L429 274.5c49-23 83-72.8 83-130.5zM56 432a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"/></svg>
@@ -0,0 +1,185 @@
1
+ <script setup lang="ts">
2
+ import { ref, onMounted } from "vue";
3
+ const loading = ref(true);
4
+ const wid = ref(5);
5
+
6
+ // 异步延迟
7
+ const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
8
+
9
+ const endLoading = async () => {
10
+ const loadingElement = document.getElementById("loading")!;
11
+ const mainContent = document.getElementById("main-container")!;
12
+
13
+ // 停止加载
14
+ loading.value = false;
15
+ wid.value = 100;
16
+
17
+ // 显示正常页面
18
+ loadingElement.style.opacity = "0";
19
+ document.body.style.overflow = "";
20
+ mainContent.style.display = "";
21
+
22
+ await sleep(1000);
23
+ loadingElement.remove();
24
+ };
25
+
26
+ // 为完成加载时提供假进度
27
+ onMounted(async () => {
28
+ if (document.readyState === "complete" && loading.value) {
29
+ endLoading();
30
+ }
31
+ await sleep(100);
32
+ if (loading.value) wid.value = 20;
33
+
34
+ await sleep(1000);
35
+ if (loading.value) wid.value = 75;
36
+
37
+ await sleep(2000);
38
+ if (loading.value) wid.value = 95;
39
+
40
+ await sleep(7000);
41
+ if (loading.value) endLoading();
42
+ });
43
+
44
+ // 完成加载时一步到位
45
+ document.onreadystatechange = async () => {
46
+ if (document.readyState === "complete" && loading.value) {
47
+ endLoading();
48
+ }
49
+ };
50
+ </script>
51
+
52
+ <template>
53
+ <div id="loading">
54
+ <!-- 转动加载 -->
55
+ <div class="load">
56
+ <hr />
57
+ <hr />
58
+ <hr />
59
+ <hr />
60
+ </div>
61
+ <!-- 进度条 -->
62
+ <div class="progress">
63
+ <div class="progress-value" :style="{ width: wid + '%' }"></div>
64
+ </div>
65
+ </div>
66
+ </template>
67
+
68
+ <style scoped>
69
+ #loading {
70
+ position: fixed;
71
+ left: 0;
72
+ top: 0;
73
+ width: 100vw;
74
+ height: 100vh;
75
+ z-index: 999999;
76
+ justify-content: center;
77
+ align-items: center;
78
+ background: #18171d;
79
+ display: flex;
80
+ flex-direction: column;
81
+ height: 100vh;
82
+ padding: 0;
83
+ margin: 0;
84
+ transition: opacity 1s;
85
+ }
86
+
87
+ .progress {
88
+ background: rgba(0 0 0 / 10%);
89
+ justify-content: flex-start;
90
+ border-radius: 100px;
91
+ align-items: center;
92
+ position: relative;
93
+ padding: 0 5px;
94
+ display: flex;
95
+ height: 40px;
96
+ width: 800px;
97
+ }
98
+
99
+ .progress-value {
100
+ background: var(--theme-color);
101
+ border: 5px solid var(--theme-color);
102
+ filter: drop-shadow(0px 0px 5px var(--theme-color));
103
+ border-radius: 100px;
104
+ height: 30px;
105
+ transition: 1s;
106
+ }
107
+
108
+ .load {
109
+ transform: scale(2);
110
+ width: 100px;
111
+ height: 100px;
112
+ margin-bottom: 300px;
113
+ }
114
+ .load hr {
115
+ border: 0;
116
+ margin: 0;
117
+ width: 40%;
118
+ height: 40%;
119
+ position: absolute;
120
+ border-radius: 50%;
121
+ animation: spin 2s ease infinite;
122
+ }
123
+
124
+ .load :first-child {
125
+ background: #ff0077;
126
+ border: 5px solid #ff0077;
127
+ filter: drop-shadow(0 0 10px #ff0077);
128
+ animation-delay: -1.5s;
129
+ }
130
+ .load :nth-child(2) {
131
+ background: #00ffff;
132
+ border: 5px solid #00ffff;
133
+ filter: drop-shadow(0 0 10px #00ffff);
134
+ animation-delay: -1s;
135
+ }
136
+ .load :nth-child(3) {
137
+ background: yellow;
138
+ border: 5px solid yellow;
139
+ filter: drop-shadow(0 0 10px yellow);
140
+ animation-delay: -0.5s;
141
+ }
142
+ .load :last-child {
143
+ background: #99ff00;
144
+ border: 5px solid #99ff00;
145
+ filter: drop-shadow(0 0 10px #99ff00);
146
+ }
147
+
148
+ @keyframes spin {
149
+ 0%,
150
+ 100% {
151
+ transform: translate(0);
152
+ }
153
+ 25% {
154
+ transform: translate(160%);
155
+ }
156
+ 50% {
157
+ transform: translate(160%, 160%);
158
+ }
159
+ 75% {
160
+ transform: translate(0, 160%);
161
+ }
162
+ }
163
+
164
+ @keyframes blinkAnimation {
165
+ 0%,
166
+ 100% {
167
+ opacity: 1;
168
+ }
169
+ 50% {
170
+ opacity: 0.8;
171
+ }
172
+ }
173
+ </style>
174
+
175
+ <!-- 加载动画修改自codepen
176
+
177
+ Copyright (c) 2023 by Traf (https://codepen.io/traf/pen/oKbaqQ)
178
+ Copyright (c) 2023 by Codrin Pavel (https://codepen.io/zerospree/pen/XWaGER)
179
+
180
+ 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:
181
+
182
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
183
+
184
+ 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.
185
+ -->
@@ -0,0 +1,62 @@
1
+ ---
2
+ import GetIcon from "./icons/getIcon.astro";
3
+ import { ThemeConfig } from "@src/theme_config";
4
+
5
+ const { type, options } = ThemeConfig.comments;
6
+
7
+ const script = () => {
8
+ let result = "";
9
+
10
+ switch (type) {
11
+ case "twikoo":
12
+ result = `twikoo.init({envId: "${options.envId}",el: "#tcomment",lang: "${options.lang}",});`;
13
+ break;
14
+ case "waline":
15
+ result = `import { init } from 'https://unpkg.com/@waline/client@v2/dist/waline.mjs';init({el: '#tcomment',serverURL: '${options.serverURL}',dark: 'html[data-theme="dark"]'});`;
16
+ break;
17
+ case "valine":
18
+ result = `new Valine({el: "#tcomment",appId: "${options.appId}",appKey: "${options.appKey}"});`;
19
+ break;
20
+ }
21
+ return result;
22
+ };
23
+ ---
24
+
25
+ <div class="post-comment">
26
+ <div class="comment-head">
27
+ <GetIcon Icon="fa-solid fa-comment" class="comment-icon" />
28
+ <span>评论</span>
29
+ </div>
30
+ <div class="comment-wrap">
31
+ <div id="tcomment"></div>
32
+ </div>
33
+ </div>
34
+ {
35
+ type === "twikoo" && (
36
+ <script
37
+ is:inline
38
+ async
39
+ src="https://cdn.staticfile.org/twikoo/1.6.16/twikoo.all.min.js"
40
+ />
41
+ )
42
+ }
43
+ {
44
+ type === "waline" && (
45
+ <link
46
+ rel="stylesheet"
47
+ href="https://unpkg.com/@waline/client@v2/dist/waline.css"
48
+ />
49
+ )
50
+ }
51
+ {
52
+ type === "valine" && (
53
+ <Fragment>
54
+ <link
55
+ rel="stylesheet"
56
+ href="https://unpkg.com/@waline/client@v2/dist/waline.css"
57
+ />
58
+ <script is:inline src="//unpkg.com/valine/dist/Valine.min.js" />
59
+ </Fragment>
60
+ )
61
+ }
62
+ {type !== false && <script type="module" is:raw set:html={script()} />}
@@ -0,0 +1,40 @@
1
+ ---
2
+ import "@style/components/pagination.scss";
3
+ interface Props {
4
+ pageSize: number;
5
+ activePage: number;
6
+ baseurl: string;
7
+ }
8
+
9
+ const { pageSize, activePage, baseurl } = Astro.props;
10
+ ---
11
+
12
+ <nav class="pagination">
13
+ <div class:list={["pagination-pre", { "disable": activePage === 1 }]}>
14
+ <a
15
+ class="pagination-link"
16
+ href={`${baseurl}${activePage === 2 ? "" : activePage - 1}`}
17
+ >
18
+ <span>上一页</span>
19
+ </a>
20
+ </div>
21
+ <div class:list={["pagination-next", { "disable": activePage === pageSize }]}>
22
+ <a class="pagination-link" href={`${baseurl}${activePage + 1}`}>
23
+ <span>下一页</span>
24
+ </a>
25
+ </div>
26
+ <ul class="pagination-list">
27
+ {
28
+ Array.from({ length: pageSize }, (_, i) => i + 1).map((num) => (
29
+ <li>
30
+ <a
31
+ href={`${baseurl}${num === 1 ? "" : num}`}
32
+ class:list={[{ "active": num === activePage }, "pagination-number"]}
33
+ >
34
+ <span>{num}</span>
35
+ </a>
36
+ </li>
37
+ ))
38
+ }
39
+ </ul>
40
+ </nav>
@@ -0,0 +1,57 @@
1
+ ---
2
+ import { ThemeConfig } from "@src/theme_config";
3
+ import { utils } from "@utils/utils";
4
+ import type { CollectionEntry } from "astro:content";
5
+ interface Props {
6
+ posts: CollectionEntry<"blog">[];
7
+ }
8
+ const { posts } = Astro.props;
9
+ ---
10
+
11
+ <div class="posts-list">
12
+ {
13
+ posts.map((post) => (
14
+ <div
15
+ class="main-card post-card"
16
+ onclick={`hsu.goToUrl("/blog/${post.data.abbrlink || post.slug}/")`}
17
+ >
18
+ <div class="post-card-cover">
19
+ <img
20
+ src={post.data.cover || ThemeConfig.homePage.defaultCover}
21
+ alt="post-cover"
22
+ />
23
+ </div>
24
+ <div class="post-card-info">
25
+ <header class="post-card-header">
26
+ <a
27
+ class="post-card-category"
28
+ href={`/categories/${post.data.category}`}
29
+ >
30
+ {post.data.category}
31
+ </a>
32
+ </header>
33
+ <div class="post-card-title">{post.data.title}</div>
34
+ <div class="post-card-desc">{post.data.description}</div>
35
+ <footer class="post-card-footer">
36
+ <ul class="post-card-tags">
37
+ {() => {
38
+ if (post.data.tags) {
39
+ return post.data.tags.map((tag) => (
40
+ <li class="post-card-tag">
41
+ <a href={`/tags/${tag}`}>{tag}</a>
42
+ </li>
43
+ ));
44
+ }
45
+ }}
46
+ </ul>
47
+ <div class="post-card-update">
48
+ <a href="/timeline">
49
+ {post.data.updatedDate || post.data.pubDate}
50
+ </a>
51
+ </div>
52
+ </footer>
53
+ </div>
54
+ </div>
55
+ ))
56
+ }
57
+ </div>
@@ -0,0 +1,50 @@
1
+ ---
2
+ title: Extended Search
3
+ description: '关于Minearm-RPM & Website所使用的fusejs的扩展搜索语法'
4
+ heroColor: ''
5
+ pubDate: 2024-09-25
6
+ abbrlink: Search-help
7
+ cover: "/help1.png"
8
+ coverAlt: "help1"
9
+ tags:
10
+ - 'localSearch'
11
+ - 'Extended Search'
12
+ category: 'Help'
13
+ ---
14
+
15
+ ## Extended Search
16
+
17
+ This site uses [fusejs](https://www.fusejs.io) to provide local search services, allowing you to use extended search - a search format that can fine-tune search results, similar to:color[unix]{color="green"}
18
+
19
+ Space represents logical `AND`, pipe symbol | represents logical `OR`, and to escape spaces, use double quotes `""`.
20
+
21
+ | **Token** | **Match type** | **Description** |
22
+ | ----------- | -------------------------- | -------------------------------------- |
23
+ | `jscript` | fuzzy-match | Items that fuzzy match `jscript` |
24
+ | `=scheme` | exact-match | Items that are `scheme` |
25
+ | `'python` | include-match | Items that include `python` |
26
+ | `!ruby` | inverse-exact-match | Items that do not include `ruby` |
27
+ | `^java` | prefix-exact-match | Items that start with `java` |
28
+ | `!^earlang` | inverse-prefix-exact-match | Items that do not start with `earlang` |
29
+ | `.js$` | suffix-exact-match | Items that end with `.js` |
30
+ | `!.go$` | inverse-suffix-exact-match | Items that do not end with `.go` |
31
+
32
+ ## 扩展搜索
33
+
34
+ 本站使用[fusejs](https://www.fusejs.io)提供本地搜索服务,允许您使用扩展搜索——一种可以微调搜索结果的搜索格式,类似于:color[unix]{color="green"}
35
+
36
+ 空格代表逻辑与`AND`,管道符|代表逻辑或`OR`,如要转义空格请使用双引号`""`
37
+ | **令牌** | **匹配类型** | **描述** |
38
+ | ----------- | ---------------- | --------------------------- |
39
+ | `jscript` | 模糊匹配 | 与 `jscript` 模糊匹配的项目 |
40
+ | `=scheme` | 精确匹配 | 是 `scheme` 的项目 |
41
+ | `'python` | 包含匹配 | 包含 `python` 的项目 |
42
+ | `!ruby` | 反向精确匹配 | 不包含 `ruby` 的项目 |
43
+ | `^java` | 前缀精确匹配 | 以 `java` 开头的项目 |
44
+ | `!^earlang` | 反向前缀精确匹配 | 不以 `earlang` 开头的项目 |
45
+ | `.js$` | 后缀精确匹配 | 以 `.js` 结尾的项目 |
46
+ | `!.go$` | 反向后缀精确匹配 | 不以 `.go` 结尾的项目 |
47
+
48
+
49
+
50
+
@@ -0,0 +1,15 @@
1
+ ---
2
+ title: Mail
3
+ description: ''
4
+ pubDate: 2024-09-30
5
+ heroColor: ''
6
+ abbrlink: mail
7
+ cover: "/mail.png"
8
+ coverAlt: "mail"
9
+ tags:
10
+ - 'Tutorial'
11
+ category: 'Mail'
12
+ ---
13
+
14
+ ## Mali
15
+ minearm@minearm.org
@@ -0,0 +1,40 @@
1
+ ---
2
+ title: 秦始皇统一六国
3
+ description: '秦始皇统一六个国诸侯国并称霸中原'
4
+ heroColor: ''
5
+ pubDate: 2024-10-12
6
+ abbrlink: history/公元前/秦始皇统一六国
7
+ cover: "/BC.png"
8
+ coverAlt: "Bc"
9
+ tags:
10
+ - '秦始皇'
11
+ - '中原'
12
+ - '诸侯'
13
+ category: '古代史'
14
+ ---
15
+
16
+ 战国时期诸侯国战国时期,经过长期诸侯割据战争,诸侯各国盛衰格局发生了很大变化,许多弱小国家被消灭,中国境内只剩下齐、楚、燕、韩、赵、魏、秦等七个大的诸侯国,史称战国七雄。七雄局面的形成,既是春秋以来兼并战争的结果,又是中国统一的前奏。为增强国力,统一全国,七雄相继展开了富国强兵的变法活动。魏国任用李悝变法,楚国使用吴起变法,赵国有武灵王改革,但最有成效的是秦国商鞍变法。公元前359年,秦孝公任用商鞅,变法改革,国力逐步强盛。从秦孝公到秦王嬴政的100多年时间中,秦国在军事制度方面实行按郡县征兵,完善了军队组织,提高了军队战斗力,士卒勇猛,车骑雄盛,远非其他六国可比,国力更加强盛。在军事策略上改变了劳师远征而经常失利的战略,采用范睢远交近攻的策略,逐渐蚕食并巩固其占领地区。秦国相继灭掉西周、东周,攻占韩国的黄河以东和以南地区,设置太原、上党、三川三郡,领土包括今陕西大部,山西中南部,河南西部,湖北西部,湖南西北部和四川东北部的广大地区。
17
+
18
+ 史书记载秦国“西有巴蜀、汉中之利,北有胡貉、代马之用,南有巫山、黔中之限,东有崤函之固”,在地理位置上进可攻,退可守;“战车千乘,奋击百万”,军事力量远胜于其他六国。
19
+
20
+ 秦国这种战略优势为统一六国打下了基础。与此同时,山东六国统治集团内部则相互倾轧,争权夺利,政局很不稳固。
21
+
22
+ 六国面对强秦的威胁,虽然屡次合纵抗秦,但都在秦国连衡策略下先后瓦解而失败。当时的有识之士子顺就曾经说过:“当今崤山以东的六国衰弱不振,韩赵魏三国向秦国割地求安,二周已被秦灭亡,燕齐楚等大国也向秦国屈服,照此看来,不出20年,天下必然是秦国的了。”
23
+
24
+ 公元前238年,秦王政铲除了丞相吕不韦和长信侯嫪毐集团,开始亲政,周密布署统一六国的战争。李斯、尉缭等协助秦王制定了统一全国的战略。秦灭六国的战略有两个内容,一是乘六国混战之际,秦国“灭诸侯,成帝业,为天下一统”。秦王政采纳了尉缭破六国合纵的策略,“毋爱财物,赂其豪臣,以乱其谋”,从内部分化瓦解敌国。二是继承历代远交近攻政策,确定了先弱后强,先近后远的具体战略步骤。李斯建议秦王政先攻韩赵,“赵举则韩亡,韩亡则荆魏不能独立,荆魏不能独立则是一举而坏韩、蠹魏、拔荆,东以弱齐燕”。这一战略步骤可以概括为三步,即笼络燕齐,稳住楚魏,消灭韩赵,然后各个击破,统一全国。在这种战略方针指导下,一场统一战争开始了。
25
+
26
+ >战争经过:
27
+
28
+ 秦始皇公元前236年,秦王政乘赵攻燕、国内空虚之际,分兵两路大举攻赵,拉开了统一战争的帷幕。秦国经过数年连续攻赵,极大地削弱了赵国实力,但一时无力灭亡赵国。于是秦国转攻韩国,公元前231年,攻下韩国南阳,第二年,秦内史滕率军北上,攻占韩国都城阳翟(今河南禹州市),俘虏韩王安,在韩地设置颍川郡,韩国灭亡。
29
+
30
+ 公元前229年,秦大举攻赵,名将王翦率军由上党(今山西长治市)出井陉(今河北井陉县),进攻赵都邯郸。赵国派大将李牧迎战,双方屡有胜负,陷入僵局,相持一年之久。后来赵王中了秦的反间计,撤换李牧,由于临阵易将,赵军士气受挫,失去了相持能力。公元前228年,王翦向赵国发起总攻,秦军很快攻占了邯郸,俘虏赵王迁,残部败逃,赵国灭亡。
31
+
32
+ 秦国在攻赵的同时,兵临燕境。燕国无力抵抗,太子丹企图以刺杀秦王的办法挽回败局。公元前227年,燕丹派荆轲以进献燕国地图为名,谋刺秦王政,结果阴谋暴露,被秦国处死。秦王政以此为借口,派王翦率兵攻打燕国,秦军在易水(今河北易县境内)大败燕罕。第二年10月,王翦攻陷燕国都蓟(今北京市),燕王喜与太子丹率残部逃到辽东(今辽宁辽阳市),苟延残喘,燕国名存实亡。
33
+
34
+ 秦国灭掉韩赵、重创燕国以后,北方大部分地区已为秦有,只有地处中原的魏国,孤立无援。公元前225年,秦将王贲率军出关中,东进攻魏,迅速包围魏都大梁(今河南开封市)。秦军引黄河水灌城,攻陷大梁,魏王假投降,魏国灭亡。
35
+
36
+ 早在秦军攻取燕都时,已把进攻目标转向楚国。公元前226年,秦王政问诸将攻楚需要多少兵力,老将王翦认为楚国地广兵强,必须有60万军队才能伐楚,而李信则说只用20万军队就能攻下楚国。秦王以为王翦因年老怯战,没有听取他的意见,派李信和蒙恬率军20万攻打楚国。
37
+
38
+ 公元前225年秦军南下攻楚,楚将项燕率军抵抗。秦军开始进军顺利,在平舆(今河南汝南县东南)和寝(今河南沈丘县东南)击败楚军,进兵到城父(今河南宝丰县东)。项燕率军反击,在城父大败秦军,李信败逃回国。公元前224年,秦王政亲自向王翦赔一礼,命他率60万大军再次伐楚,双方在陈(今河南淮阳县)相遇,王翦按兵不动,以逸待劳,楚军屡次挑战,秦军不与交战,项燕只好率兵东归。王翦乘楚军退兵之机,挥师追击,在蕲(今安徽宿州市)大败楚军,杀楚将项燕。第二年,秦军乘胜进兵,俘虏楚王负刍,攻占楚都郢(今湖北荆州市),设置郢郡,楚国灭亡。
39
+
40
+ 五国灭亡后,只剩下东方的齐国和燕赵残余势力。公元前222年,秦将王贲率军歼灭了辽东燕军,俘虏燕王喜,回师途中又在代北(今山西代县)俘获赵国余部代王嘉,然后由燕地乘虚直逼齐国。齐王建慌忙在西线集结军队,准备抵抗。公元前221年,秦军避开西线齐军主力,从北面直插齐国都城临淄(今山东淄博市)。在秦国大兵压境的形势下,齐王建不战而降,齐国灭亡。