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,59 @@
1
+ ---
2
+ import { ThemeConfig } from "@src/theme_config";
3
+ import GetIcon from "@comp/icons/getIcon.astro";
4
+
5
+ import ThemeControl from "@comp/client/themeControl.vue";
6
+ import ToTop from "@comp/icons/toTop.astro";
7
+
8
+ const buttons: Array<ButtonItem> = ThemeConfig.header.buttons;
9
+ const funcs: HeaderFunc = ThemeConfig.header.functions;
10
+ ---
11
+
12
+ <Fragment>
13
+ {
14
+ buttons.map((button) => (
15
+ <div class:list={["menu-button", button.customClass]}>
16
+ {button.link ? (
17
+ <a
18
+ href={button.link}
19
+ class="menu-button-link"
20
+ title={button.title || ""}
21
+ >
22
+ <GetIcon Icon={button.icon} class="menu-button-icon" />
23
+ </a>
24
+ ) : (
25
+ <div class="menu-button-link" title={button.title || ""}>
26
+ <GetIcon Icon={button.icon} class="menu-button-icon" />
27
+ </div>
28
+ )}
29
+ </div>
30
+ ))
31
+ }
32
+ {funcs.themeControl && <ThemeControl client:only />}
33
+ {
34
+ funcs.pagePercent && (
35
+ <Fragment>
36
+ <div id="menu-totop" class="menu-button percent">
37
+ <div
38
+ onclick="
39
+ hsu.scrollToDestination(0, 500)
40
+ "
41
+ class="menu-button-link"
42
+ title="toTop"
43
+ >
44
+ <div id="percent" class="menu-button-icon">
45
+ 0
46
+ </div>
47
+ <div id="totop" class="menu-button-icon">
48
+ <ToTop />
49
+ </div>
50
+ </div>
51
+ </div>
52
+ <script is:inline>
53
+ window.addEventListener("load", event =>
54
+ {(window.onscroll = hsu.calculateScrollPercentage)})
55
+ </script>
56
+ </Fragment>
57
+ )
58
+ }
59
+ </Fragment>
@@ -0,0 +1,63 @@
1
+ ---
2
+ import { ThemeConfig } from "@src/theme_config";
3
+ import GetIcon from "@comp/icons/getIcon.astro";
4
+
5
+ const items: Array<MenuItem> = ThemeConfig.header.menu;
6
+ ---
7
+
8
+ <Fragment>
9
+ {
10
+ items.map((item) => (
11
+ <div
12
+ class:list={[
13
+ "menu-item",
14
+ item.customClass,
15
+ { "has-child": item.children },
16
+ ]}
17
+ >
18
+ {item.link ? (
19
+ <a
20
+ href={item.link || ""}
21
+ rel={item.link ? "" : "nofollow"}
22
+ class="menu-item-link"
23
+ >
24
+ <GetIcon Icon={item.icon} class="menu-item-icon" />
25
+ <span class="menu-item-name">{item.name}</span>
26
+ </a>
27
+ ) : (
28
+ <div class="menu-item-link">
29
+ <GetIcon Icon={item.icon} class="menu-item-icon" />
30
+ <span class="menu-item-name">{item.name}</span>
31
+ </div>
32
+ )}
33
+ {() => {
34
+ if (item.children) {
35
+ return (
36
+ <ul class="menu-children">
37
+ {item.children.map((child) => (
38
+ <li class:list={["menu-child", child.customClass]}>
39
+ {child.link ? (
40
+ <a
41
+ href={child.link}
42
+ rel={child.link ? "" : "nofollow"}
43
+ class="menu-child-link"
44
+ >
45
+ <GetIcon Icon={child.icon} class="menu-child-icon" />
46
+ <span class="menu-child-name">{child.name}</span>
47
+ </a>
48
+ ) : (
49
+ <div class="menu-child-link">
50
+ <GetIcon Icon={child.icon} class="menu-child-icon" />
51
+ <span class="menu-child-name">{child.name}</span>
52
+ </div>
53
+ )}
54
+ </li>
55
+ ))}
56
+ </ul>
57
+ );
58
+ }
59
+ }}
60
+ </div>
61
+ ))
62
+ }
63
+ </Fragment>
@@ -0,0 +1,19 @@
1
+ ---
2
+ import "@style/components/heroWave.scss";
3
+ import Wave from "@comp/animation/wave.astro";
4
+ interface Props {
5
+ heroColor?: string;
6
+ class?: string;
7
+ }
8
+ const { heroColor, class: customClass } = Astro.props;
9
+ ---
10
+
11
+ <div
12
+ class:list={[customClass]}
13
+ id="hero-wave"
14
+ style={heroColor &&
15
+ `background: linear-gradient(${heroColor}, var(--body-background-color));`}
16
+ >
17
+ <slot />
18
+ <Wave />
19
+ </div>
@@ -0,0 +1,21 @@
1
+ ---
2
+ import GetIcon from "@comp/icons/getIcon.astro";
3
+ import Searchicon from "@comp/icons/searchicon.astro";
4
+ ---
5
+
6
+ <div id="search-bar" onclick="hsu.opensearch()">
7
+ <div class="search-box">
8
+ <GetIcon Icon={Searchicon} class="search-icon" />
9
+ <div class="search-hotkey">
10
+ 搜索
11
+ <kbd>Alt K</kbd>
12
+ </div>
13
+ </div>
14
+ </div>
15
+ <script is:inline>
16
+ window.addEventListener("keydown", function (event) {
17
+ if (event.altKey && event.key === "k") {
18
+ hsu.opensearch();
19
+ }
20
+ });
21
+ </script>
@@ -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="M488.6 104.1C505.3 122.2 513 143.8 511.9 169.8V372.2C511.5 398.6 502.7 420.3 485.4 437.3C468.2 454.3 446.3 463.2 419.9 464H92.02C65.57 463.2 43.81 454.2 26.74 436.8C9.682 419.4 .7667 396.5 0 368.2V169.8C.7667 143.8 9.682 122.2 26.74 104.1C43.81 87.75 65.57 78.77 92.02 78H121.4L96.05 52.19C90.3 46.46 87.42 39.19 87.42 30.4C87.42 21.6 90.3 14.34 96.05 8.603C101.8 2.868 109.1 0 117.9 0C126.7 0 134 2.868 139.8 8.603L213.1 78H301.1L375.6 8.603C381.7 2.868 389.2 0 398 0C406.8 0 414.1 2.868 419.9 8.603C425.6 14.34 428.5 21.6 428.5 30.4C428.5 39.19 425.6 46.46 419.9 52.19L394.6 78L423.9 78C450.3 78.77 471.9 87.75 488.6 104.1H488.6zM449.8 173.8C449.4 164.2 446.1 156.4 439.1 150.3C433.9 144.2 425.1 140.9 416.4 140.5H96.05C86.46 140.9 78.6 144.2 72.47 150.3C66.33 156.4 63.07 164.2 62.69 173.8V368.2C62.69 377.4 65.95 385.2 72.47 391.7C78.99 398.2 86.85 401.5 96.05 401.5H416.4C425.6 401.5 433.4 398.2 439.7 391.7C446 385.2 449.4 377.4 449.8 368.2L449.8 173.8zM185.5 216.5C191.8 222.8 195.2 230.6 195.6 239.7V273C195.2 282.2 191.9 289.9 185.8 296.2C179.6 302.5 171.8 305.7 162.2 305.7C152.6 305.7 144.7 302.5 138.6 296.2C132.5 289.9 129.2 282.2 128.8 273V239.7C129.2 230.6 132.6 222.8 138.9 216.5C145.2 210.2 152.1 206.9 162.2 206.5C171.4 206.9 179.2 210.2 185.5 216.5H185.5zM377 216.5C383.3 222.8 386.7 230.6 387.1 239.7V273C386.7 282.2 383.4 289.9 377.3 296.2C371.2 302.5 363.3 305.7 353.7 305.7C344.1 305.7 336.3 302.5 330.1 296.2C323.1 289.9 320.7 282.2 320.4 273V239.7C320.7 230.6 324.1 222.8 330.4 216.5C336.7 210.2 344.5 206.9 353.7 206.5C362.9 206.9 370.7 210.2 377 216.5H377z"
9
+ ></path></svg
10
+ >
@@ -0,0 +1,10 @@
1
+ ---
2
+ ---
3
+
4
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 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="M329.1 142.9c-62.5-62.5-155.8-62.5-218.3 0s-62.5 163.8 0 226.3s155.8 62.5 218.3 0c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3c-87.5 87.5-221.3 87.5-308.8 0s-87.5-229.3 0-316.8s221.3-87.5 308.8 0c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0z"
9
+ ></path></svg
10
+ >
@@ -0,0 +1,37 @@
1
+ ---
2
+ import { Icon } from 'astro-icon/components';
3
+ ---
4
+
5
+ <div class="relative">
6
+ <pre
7
+ class="shadow-2xl bg-black code"><button aria-label="copy-button" class="copy-button absolute z-20 top-2 right-2 rounded-md transition-all ease-in max-w-full max-h-fit hover:text-indigo-400"><Icon name="tabler:copy" /></button><span class="check-span absolute z-10 top-2 right-2 rounded-md transition-all ease-in opacity-0 text-green-300 max-w-full max-h-fit "><Icon name="tabler:check" /></span><slot /></pre>
8
+ </div>
9
+ <script>
10
+ const coppyBlock = () => {
11
+ const proBlock = document.querySelectorAll('pre');
12
+ proBlock.forEach((pre) => {
13
+ const button = pre.querySelector('.copy-button');
14
+ const check = pre.querySelector('.check-span');
15
+ const code = pre.querySelector('code');
16
+ if (code) {
17
+ const lineSpans = code?.querySelectorAll('span.line');
18
+ lineSpans.forEach((span, index) => {
19
+ let indexData = `${index+1}.`;
20
+ span.setAttribute('data-index', indexData);
21
+ });
22
+ }
23
+
24
+ button!.addEventListener('click', () => {
25
+ navigator.clipboard.writeText(pre.textContent?.trim() || '');
26
+ check?.classList.remove('opacity-0');
27
+ button?.classList.add('opacity-0');
28
+ setTimeout(() => {
29
+ check?.classList.add('opacity-0');
30
+ button?.classList.remove('opacity-0');
31
+ }, 2000);
32
+ });
33
+ });
34
+ };
35
+ coppyBlock(); // initial load
36
+ document.addEventListener('astro:after-swap', coppyBlock); // re-run after each page change
37
+ </script>
@@ -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="M384 96V320H64L64 96H384zM64 32C28.7 32 0 60.7 0 96V320c0 35.3 28.7 64 64 64H181.3l-10.7 32H96c-17.7 0-32 14.3-32 32s14.3 32 32 32H352c17.7 0 32-14.3 32-32s-14.3-32-32-32H277.3l-10.7-32H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm464 0c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48h64c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48H528zm16 64h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H544c-8.8 0-16-7.2-16-16s7.2-16 16-16zm-16 80c0-8.8 7.2-16 16-16h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H544c-8.8 0-16-7.2-16-16zm32 160a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></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="M234.5 5.7c13.9-5 29.1-5 43.1 0l192 68.6C495 83.4 512 107.5 512 134.6V377.4c0 27-17 51.2-42.5 60.3l-192 68.6c-13.9 5-29.1 5-43.1 0l-192-68.6C17 428.6 0 404.5 0 377.4V134.6c0-27 17-51.2 42.5-60.3l192-68.6zM256 66L82.3 128 256 190l173.7-62L256 66zm32 368.6l160-57.1v-188L288 246.6v188z"
9
+ ></path></svg
10
+ >
@@ -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="M488.6 104.1C505.3 122.2 513 143.8 511.9 169.8V372.2C511.5 398.6 502.7 420.3 485.4 437.3C468.2 454.3 446.3 463.2 419.9 464H92.02C65.57 463.2 43.81 454.2 26.74 436.8C9.682 419.4 .7667 396.5 0 368.2V169.8C.7667 143.8 9.682 122.2 26.74 104.1C43.81 87.75 65.57 78.77 92.02 78H121.4L96.05 52.19C90.3 46.46 87.42 39.19 87.42 30.4C87.42 21.6 90.3 14.34 96.05 8.603C101.8 2.868 109.1 0 117.9 0C126.7 0 134 2.868 139.8 8.603L213.1 78H301.1L375.6 8.603C381.7 2.868 389.2 0 398 0C406.8 0 414.1 2.868 419.9 8.603C425.6 14.34 428.5 21.6 428.5 30.4C428.5 39.19 425.6 46.46 419.9 52.19L394.6 78L423.9 78C450.3 78.77 471.9 87.75 488.6 104.1H488.6zM449.8 173.8C449.4 164.2 446.1 156.4 439.1 150.3C433.9 144.2 425.1 140.9 416.4 140.5H96.05C86.46 140.9 78.6 144.2 72.47 150.3C66.33 156.4 63.07 164.2 62.69 173.8V368.2C62.69 377.4 65.95 385.2 72.47 391.7C78.99 398.2 86.85 401.5 96.05 401.5H416.4C425.6 401.5 433.4 398.2 439.7 391.7C446 385.2 449.4 377.4 449.8 368.2L449.8 173.8zM185.5 216.5C191.8 222.8 195.2 230.6 195.6 239.7V273C195.2 282.2 191.9 289.9 185.8 296.2C179.6 302.5 171.8 305.7 162.2 305.7C152.6 305.7 144.7 302.5 138.6 296.2C132.5 289.9 129.2 282.2 128.8 273V239.7C129.2 230.6 132.6 222.8 138.9 216.5C145.2 210.2 152.1 206.9 162.2 206.5C171.4 206.9 179.2 210.2 185.5 216.5H185.5zM377 216.5C383.3 222.8 386.7 230.6 387.1 239.7V273C386.7 282.2 383.4 289.9 377.3 296.2C371.2 302.5 363.3 305.7 353.7 305.7C344.1 305.7 336.3 302.5 330.1 296.2C323.1 289.9 320.7 282.2 320.4 273V239.7C320.7 230.6 324.1 222.8 330.4 216.5C336.7 210.2 344.5 206.9 353.7 206.5C362.9 206.9 370.7 210.2 377 216.5H377z"
9
+ ></path></svg
10
+ >
@@ -0,0 +1,64 @@
1
+ ---
2
+ import { utils } from "@utils/utils";
3
+ import icons from "./icons.json";
4
+
5
+ interface Props {
6
+ Icon: any;
7
+ class?: string;
8
+ }
9
+
10
+ const { Icon, class: wrapClass } = Astro.props;
11
+ const t = typeof Icon;
12
+ let icon: any;
13
+ var flag: number = -1;
14
+ if (t === "function") {
15
+ flag = 0;
16
+ } else if (t === "string") {
17
+ if (Icon === "") {
18
+ flag = -1;
19
+ } else if (Icon.substring(0, 4) === "<svg" || Icon.substring(0, 2) === "<i") {
20
+ flag = 1;
21
+ } else if (utils.checkURL(Icon) || Icon[0] === "/") {
22
+ flag = 2;
23
+ } else if (Icon.substring(0, 2) === "fa") {
24
+ flag = 3;
25
+ } else if (Icon.substring(0, 6) === "local:") {
26
+ flag = 4;
27
+ let [family, name] = Icon.slice(6).split(".");
28
+ icon =
29
+ (icons as any)[name].svg[family].raw.replaceAll(
30
+ "<path",
31
+ "<path fill='currentColor' "
32
+ ) || console.error(`${Icon} not found!`);
33
+ }
34
+ }
35
+ ---
36
+
37
+ {
38
+ flag !== -1 && (
39
+ <div class={wrapClass || ""}>
40
+ {() => {
41
+ switch (flag) {
42
+ case 0:
43
+ return <Icon />;
44
+ case 1:
45
+ return <Fragment set:html={Icon} />;
46
+ case 2:
47
+ return <img src={Icon} alt="" />;
48
+ case 3:
49
+ return <i class={Icon} />;
50
+ case 4:
51
+ return <Fragment set:html={icon} />;
52
+ }
53
+ }}
54
+ <slot />
55
+ </div>
56
+ )
57
+ }
58
+
59
+ <style>
60
+ img {
61
+ width: 100%;
62
+ height: 100%;
63
+ }
64
+ </style>
@@ -0,0 +1,10 @@
1
+ ---
2
+ ---
3
+
4
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 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="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"
9
+ ></path>
10
+ </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="M0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V280.4c-17-15.2-39.4-24.4-64-24.4H64c-24.6 0-47 9.2-64 24.4V96zM64 288H448c35.3 0 64 28.7 64 64v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V352c0-35.3 28.7-64 64-64zM320 416a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm128-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"
9
+ ></path></svg
10
+ >
@@ -0,0 +1,14 @@
1
+ <svg
2
+ aria-hidden="true"
3
+ focusable="false"
4
+ data-prefix="fas"
5
+ data-icon="house"
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="M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1V472c0 22.1-17.9 40-40 40H456c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1H416 392c-22.1 0-40-17.9-40-40V448 384c0-17.7-14.3-32-32-32H256c-17.7 0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40H160 128.1c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2H104c-22.1 0-40-17.9-40-40V360c0-.9 0-1.9 .1-2.8V287.6H32c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"
13
+ ></path></svg
14
+ >
@@ -0,0 +1,33 @@
1
+ import HomeIcon from "./home.astro";
2
+ import PenIcon from "./pen.astro";
3
+ import IDcardIcon from "./person.astro";
4
+ import ToolsIcon from "./tools.astro";
5
+ import PaperPlaneIcon from "./paperPlane.astro";
6
+ import LinkIcon from "./link.astro";
7
+ import ComputerIcon from "./computer.astro";
8
+ import TagsIcon from "./tags.astro";
9
+ import CubeIcon from "./cube.astro";
10
+ import HardDriverIcon from "./hardDriver.astro";
11
+ import GitHub from "./github.astro";
12
+ import Mail from "./mail.astro";
13
+ import Bilibili from "./bilibili.astro";
14
+ import C from "./c.astro";
15
+ import searchicon from "./searchicon.astro";
16
+
17
+ export const Icons = {
18
+ HomeIcon,
19
+ PenIcon,
20
+ IDcardIcon,
21
+ ToolsIcon,
22
+ PaperPlaneIcon,
23
+ LinkIcon,
24
+ ComputerIcon,
25
+ TagsIcon,
26
+ CubeIcon,
27
+ HardDriverIcon,
28
+ GitHub,
29
+ Mail,
30
+ Bilibili,
31
+ C,
32
+ searchicon
33
+ }