From 92ee78c31f669f82113dd18b3dd79b5c412181b2 Mon Sep 17 00:00:00 2001 From: Lucas Josino Date: Tue, 27 Feb 2024 22:29:51 -0300 Subject: [PATCH] Update v1.7.0 (#23) ### Features - Add ThemeIcon component - Add theme toggle code - Add new og tags - Add `remark-code-set` package - Add Footer to all pages - Increase post max width ### Changes - Update post layout format - Update light theme colors - Update text selection style - Update metadata - Update dependencies - Update astro expressive code to support themes - Update expressive code style - Update code highlight style - Update `remark-readme-status` background color - Replace `remark-codeset` with `remark-code-set` package - Remove old tab listener - Convert description color into root variable - Move comments to below related posts - Increase avatar size - Increase scrollbar width to 9px ### Fixes - PostRelated missing config and grid layout - Expressive code header with high z-index *Bump version to 1.7.0* --- astro.config.mjs | 15 +- package.json | 23 +- plugins/remark-code-set/package.json | 32 + plugins/remark-code-set/src/index.js | 72 + plugins/remark-code-set/yarn.lock | 595 +++++ public/static/css/giscus_dark.css | 4 + public/static/css/giscus_light.css | 4 + src/components/core/Avatar.astro | 4 +- src/components/core/Description.astro | 8 +- src/components/core/Link/LinkBox.astro | 1 + src/components/core/Post/PostFooter.astro | 32 +- src/components/core/ThemeIcon.astro | 66 + src/components/data/Container.astro | 5 +- src/components/data/Footer.astro | 65 + src/components/data/Post/PostComments.astro | 16 - src/components/data/Post/PostInfo.astro | 1 + src/components/data/Post/PostRelated.astro | 5 +- src/components/data/Post/PostShare.astro | 1 + src/constants/head.ts | 4 +- ...ssion-mock-for-authentication-using-scs.md | 10 +- ...in-astro-using-astro-rename-integration.md | 40 +- src/content/blog/markdown-showcase.md | 28 +- src/layouts/Layout.astro | 38 +- src/layouts/PostLayout.astro | 49 +- src/lib/browser/post.ts | 66 +- src/styles/global.css | 38 +- src/styles/markdown.css | 73 +- src/styles/post.css | 5 + src/styles/remark/remark-alert-blocks.css | 110 +- src/styles/remark/remark-codeset.css | 101 +- src/styles/remark/remark-readme-stats.css | 21 +- yarn.lock | 2094 ++++++++--------- 32 files changed, 2140 insertions(+), 1486 deletions(-) create mode 100644 plugins/remark-code-set/package.json create mode 100644 plugins/remark-code-set/src/index.js create mode 100644 plugins/remark-code-set/yarn.lock create mode 100644 public/static/css/giscus_dark.css create mode 100644 public/static/css/giscus_light.css create mode 100644 src/components/core/ThemeIcon.astro create mode 100644 src/components/data/Footer.astro diff --git a/astro.config.mjs b/astro.config.mjs index 171e6fa7..ae671c53 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -3,6 +3,7 @@ import { s } from 'hastscript'; import react from '@astrojs/react'; import sitemap from '@astrojs/sitemap'; +import { pluginLineNumbers } from '@expressive-code/plugin-line-numbers'; import compress from 'astro-compress'; import astroExpressiveCode from 'astro-expressive-code'; import rename from 'astro-rename'; @@ -10,13 +11,13 @@ import robotsTxt from 'astro-robots-txt'; import remarkAlertBlocks from '@lucjosin/remark-alert-blocks'; import remarkCodeHighlight from '@lucjosin/remark-code-highlight'; +import remarkCodeSet from '@lucjosin/remark-code-set'; import remarkImageCaption from '@lucjosin/remark-image-caption'; import remarkPostReference from '@lucjosin/remark-post-reference'; import remarkReadmeStats from '@lucjosin/remark-readme-stats'; import rehypeAutolinkHeadings from 'rehype-autolink-headings'; import rehypeExternalLinks from 'rehype-external-links'; import rehypeSlug from 'rehype-slug'; -import codeset from 'remark-codeset'; import remarkCollapse from 'remark-collapse'; import numberedFootnoteLabels from 'remark-numbered-footnote-labels'; import remarkToc from 'remark-toc'; @@ -42,7 +43,13 @@ export default defineConfig({ // Ref: https://docs.astro.build/en/guides/integrations-guide/ // Ref: https://docs.astro.build/en/guides/integrations-guide/sitemap/ integrations: [ - astroExpressiveCode(), + astroExpressiveCode({ + themes: ['dark-plus', 'light-plus'], + useDarkModeMediaQuery: true, + themeCssSelector: (theme) => + `[data-theme='${theme.name.replace('-plus', '')}']`, + plugins: [pluginLineNumbers()], + }), rename({ rename: { strategy: (key) => renamer.rename(key), @@ -116,7 +123,7 @@ export default defineConfig({ remarkReadmeStats, { darkBgColor: '111111', - lightBgColor: 'f0f0f0', + lightBgColor: 'ffffff', borderRadius: '10', }, ], @@ -125,7 +132,7 @@ export default defineConfig({ remarkAlertBlocks, remarkCodeHighlight, remarkImageCaption, - codeset, + remarkCodeSet, remarkToc, [ remarkCollapse, diff --git a/package.json b/package.json index 0639d706..1d888c09 100644 --- a/package.json +++ b/package.json @@ -14,30 +14,30 @@ "@astrojs/sitemap": "^3.0.2", "@lucjosin/remark-alert-blocks": "./plugins/remark-alert-blocks", "@lucjosin/remark-code-highlight": "./plugins/remark-code-highlight", + "@lucjosin/remark-code-set": "./plugins/remark-code-set", "@lucjosin/remark-image-caption": "./plugins/remark-image-caption", "@lucjosin/remark-post-reference": "./plugins/remark-post-reference", "@lucjosin/remark-readme-stats": "./plugins/remark-readme-stats", "@typescript-eslint/eslint-plugin": "^6.8.0", "@typescript-eslint/parser": "^6.8.0", "astro": "^3.3.4", - "astro-compress": "^2.1.5", - "astro-expressive-code": "^0.26.2", + "astro-compress": "^2.2.10", + "astro-expressive-code": "^0.33.4", "astro-icon": "^0.8.1", - "astro-rename": "^1.1.1", + "astro-rename": "^1.1.2", "astro-robots-txt": "^1.0.0", - "eslint": "^8.52.0", - "eslint-config-prettier": "^9.0.0", - "eslint-plugin-astro": "^0.29.1", - "prettier": "^3.0.3", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-astro": "^0.31.4", + "prettier": "^3.2.5", "prettier-plugin-astro": "^0.12.0", - "rehype-autolink-headings": "^7.0.0", + "rehype-autolink-headings": "^7.1.0", "rehype-external-links": "^3.0.0", "rehype-slug": "^6.0.0", - "remark-codeset": "^1.1.4", "remark-collapse": "^0.1.2", "remark-numbered-footnote-labels": "^1.1.0", "remark-toc": "^8.0.1", - "satori": "^0.10.9", + "satori": "^0.10.13", "satori-html": "^0.3.2", "svgo": "2.8.0", "typescript": "^5.2.2" @@ -45,11 +45,12 @@ "dependencies": { "@astrojs/react": "^3.0.3", "@astrojs/rss": "^3.0.0", + "@expressive-code/plugin-line-numbers": "^0.33.4", "@resvg/resvg-js": "^2.5.0", "@swup/astro": "^1.3.2", "@types/react": "^18.2.29", "@types/react-dom": "^18.2.14", - "medium-zoom": "^1.0.8", + "medium-zoom": "^1.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", "reading-time": "^1.5.0" diff --git a/plugins/remark-code-set/package.json b/plugins/remark-code-set/package.json new file mode 100644 index 00000000..1917ebbb --- /dev/null +++ b/plugins/remark-code-set/package.json @@ -0,0 +1,32 @@ +{ + "name": "@lucjosin/remark-code-set", + "version": "1.0.0", + "type": "module", + "author": { + "name": "Lucas Josino", + "username": "LucJosin", + "email": "contact@lucasjosino.com", + "url": "https://lucasjosino.com" + }, + "publishConfig": { + "access": "public", + "registry": "https://registry.npmjs.org" + }, + "homepage": "https://github.com/LucJosin/lucasjosino.com", + "bugs": { + "url": "https://github.com/LucJosin/lucasjosino.com", + "email": "hawapi@lucasjosino.com" + }, + "license": "MIT", + "keywords": [ + "remark-plugin", + "remark-code-set" + ], + "main": "src/index.js", + "dependencies": { + "hastscript": "^8.0.0", + "remark": "^15.0.1", + "unist-util-is": "^6.0.0", + "unist-util-visit": "^5.0.0" + } +} diff --git a/plugins/remark-code-set/src/index.js b/plugins/remark-code-set/src/index.js new file mode 100644 index 00000000..b78bbc55 --- /dev/null +++ b/plugins/remark-code-set/src/index.js @@ -0,0 +1,72 @@ +import { parse } from 'node:querystring'; +import { remark } from 'remark'; +import { visit } from 'unist-util-visit'; + +const metaDelimiter = ' '; + +function createTabs(tabs, children) { + return { + type: 'wrapper', + data: { + hName: 'div', + hProperties: { + id: tabs, + className: 'remark-code-tabs', + }, + }, + children: children, + }; +} + +function createTab(childNode, group, index) { + const tabId = `${group}#${index}`; + const code = remark().parse(childNode).children[0]; + const meta = parse(code.meta ?? '', metaDelimiter); + + return [ + { + type: 'html', + value: ``, + }, + { + type: 'wrapper', + data: { + hName: 'div', + hProperties: { + className: 'remark-code-content', + }, + }, + children: [code], + }, + ]; +} + +export default function remarkCodeTabs() { + return function transform(tree) { + visit(tree, 'code', function (node) { + if (node.lang !== 'codeset') return; + + const meta = parse(node.meta ?? '', metaDelimiter); + if (!meta.tabs) return; + + const codeList = node.value.split(':-:'); + + const tabs = []; + for (let i = 0; i < codeList.length; i++) { + tabs.push(...createTab(codeList[i], meta.tabs, i)); + } + + // Create wrapper + const newNode = createTabs(meta.tabs, [...tabs]); + + Object.assign(node, newNode); + }); + }; +} diff --git a/plugins/remark-code-set/yarn.lock b/plugins/remark-code-set/yarn.lock new file mode 100644 index 00000000..13c6659f --- /dev/null +++ b/plugins/remark-code-set/yarn.lock @@ -0,0 +1,595 @@ +# This file is generated by running "yarn install" inside your project. +# Manual changes might be lost - proceed with caution! + +__metadata: + version: 6 + cacheKey: 8 + +"@lucjosin/remark-code-set@workspace:.": + version: 0.0.0-use.local + resolution: "@lucjosin/remark-code-set@workspace:." + dependencies: + hastscript: ^8.0.0 + remark: ^15.0.1 + unist-util-is: ^6.0.0 + unist-util-visit: ^5.0.0 + languageName: unknown + linkType: soft + +"@types/debug@npm:^4.0.0": + version: 4.1.12 + resolution: "@types/debug@npm:4.1.12" + dependencies: + "@types/ms": "*" + checksum: 47876a852de8240bfdaf7481357af2b88cb660d30c72e73789abf00c499d6bc7cd5e52f41c915d1b9cd8ec9fef5b05688d7b7aef17f7f272c2d04679508d1053 + languageName: node + linkType: hard + +"@types/hast@npm:^3.0.0": + version: 3.0.1 + resolution: "@types/hast@npm:3.0.1" + dependencies: + "@types/unist": "*" + checksum: b7ae475436575273dcc7e6d724f50e7fae86ba42f11fabf74243ac3db37379974fe017582a92ef2e00028cc6299690c6fdd8e15823ac9e68ee745c6258efa1f0 + languageName: node + linkType: hard + +"@types/mdast@npm:^4.0.0": + version: 4.0.3 + resolution: "@types/mdast@npm:4.0.3" + dependencies: + "@types/unist": "*" + checksum: 345c5a22fccf05f35239ea6313ee4aaf6ebed5927c03ac79744abccb69b9ba5e692f9b771e36a012b79e17429082cada30f579e9c43b8a54e0ffb365431498b6 + languageName: node + linkType: hard + +"@types/ms@npm:*": + version: 0.7.34 + resolution: "@types/ms@npm:0.7.34" + checksum: f38d36e7b6edecd9badc9cf50474159e9da5fa6965a75186cceaf883278611b9df6669dc3a3cc122b7938d317b68a9e3d573d316fcb35d1be47ec9e468c6bd8a + languageName: node + linkType: hard + +"@types/unist@npm:*, @types/unist@npm:^3.0.0": + version: 3.0.0 + resolution: "@types/unist@npm:3.0.0" + checksum: e9d21a8fb5e332be0acef29192d82632875b2ef3e700f1bc64fdfc1520189542de85c3d4f3bcfbc2f4afdb210f4c23f68061f3fbf10744e920d4f18430d19f49 + languageName: node + linkType: hard + +"bail@npm:^2.0.0": + version: 2.0.2 + resolution: "bail@npm:2.0.2" + checksum: aab4e8ccdc8d762bf3fdfce8e706601695620c0c2eda256dd85088dc0be3cfd7ff126f6e99c2bee1f24f5d418414aacf09d7f9702f16d6963df2fa488cda8824 + languageName: node + linkType: hard + +"character-entities@npm:^2.0.0": + version: 2.0.2 + resolution: "character-entities@npm:2.0.2" + checksum: cf1643814023697f725e47328fcec17923b8f1799102a8a79c1514e894815651794a2bffd84bb1b3a4b124b050154e4529ed6e81f7c8068a734aecf07a6d3def + languageName: node + linkType: hard + +"comma-separated-tokens@npm:^2.0.0": + version: 2.0.3 + resolution: "comma-separated-tokens@npm:2.0.3" + checksum: e3bf9e0332a5c45f49b90e79bcdb4a7a85f28d6a6f0876a94f1bb9b2bfbdbbb9292aac50e1e742d8c0db1e62a0229a106f57917e2d067fca951d81737651700d + languageName: node + linkType: hard + +"debug@npm:^4.0.0": + version: 4.3.4 + resolution: "debug@npm:4.3.4" + dependencies: + ms: 2.1.2 + peerDependenciesMeta: + supports-color: + optional: true + checksum: 3dbad3f94ea64f34431a9cbf0bafb61853eda57bff2880036153438f50fb5a84f27683ba0d8e5426bf41a8c6ff03879488120cf5b3a761e77953169c0600a708 + languageName: node + linkType: hard + +"decode-named-character-reference@npm:^1.0.0": + version: 1.0.2 + resolution: "decode-named-character-reference@npm:1.0.2" + dependencies: + character-entities: ^2.0.0 + checksum: f4c71d3b93105f20076052f9cb1523a22a9c796b8296cd35eef1ca54239c78d182c136a848b83ff8da2071e3ae2b1d300bf29d00650a6d6e675438cc31b11d78 + languageName: node + linkType: hard + +"dequal@npm:^2.0.0": + version: 2.0.3 + resolution: "dequal@npm:2.0.3" + checksum: 8679b850e1a3d0ebbc46ee780d5df7b478c23f335887464023a631d1b9af051ad4a6595a44220f9ff8ff95a8ddccf019b5ad778a976fd7bbf77383d36f412f90 + languageName: node + linkType: hard + +"devlop@npm:^1.0.0": + version: 1.1.0 + resolution: "devlop@npm:1.1.0" + dependencies: + dequal: ^2.0.0 + checksum: d2ff650bac0bb6ef08c48f3ba98640bb5fec5cce81e9957eb620408d1bab1204d382a45b785c6b3314dc867bb0684936b84c6867820da6db97cbb5d3c15dd185 + languageName: node + linkType: hard + +"extend@npm:^3.0.0": + version: 3.0.2 + resolution: "extend@npm:3.0.2" + checksum: a50a8309ca65ea5d426382ff09f33586527882cf532931cb08ca786ea3146c0553310bda688710ff61d7668eba9f96b923fe1420cdf56a2c3eaf30fcab87b515 + languageName: node + linkType: hard + +"hast-util-parse-selector@npm:^4.0.0": + version: 4.0.0 + resolution: "hast-util-parse-selector@npm:4.0.0" + dependencies: + "@types/hast": ^3.0.0 + checksum: 76087670d3b0b50b23a6cb70bca53a6176d6608307ccdbb3ed18b650b82e7c3513bfc40348f1389dc0c5ae872b9a768851f4335f44654abd7deafd6974c52402 + languageName: node + linkType: hard + +"hastscript@npm:^8.0.0": + version: 8.0.0 + resolution: "hastscript@npm:8.0.0" + dependencies: + "@types/hast": ^3.0.0 + comma-separated-tokens: ^2.0.0 + hast-util-parse-selector: ^4.0.0 + property-information: ^6.0.0 + space-separated-tokens: ^2.0.0 + checksum: ae3c20223e7b847320c0f98b6fb3c763ebe1bf3913c5805fbc176cf84553a9db1117ca34cf842a5235890b4b9ae0e94501bfdc9a9b870a5dbf5fc52426db1097 + languageName: node + linkType: hard + +"is-plain-obj@npm:^4.0.0": + version: 4.1.0 + resolution: "is-plain-obj@npm:4.1.0" + checksum: 6dc45da70d04a81f35c9310971e78a6a3c7a63547ef782e3a07ee3674695081b6ca4e977fbb8efc48dae3375e0b34558d2bcd722aec9bddfa2d7db5b041be8ce + languageName: node + linkType: hard + +"longest-streak@npm:^3.0.0": + version: 3.1.0 + resolution: "longest-streak@npm:3.1.0" + checksum: d7f952ed004cbdb5c8bcfc4f7f5c3d65449e6c5a9e9be4505a656e3df5a57ee125f284286b4bf8ecea0c21a7b3bf2b8f9001ad506c319b9815ad6a63a47d0fd0 + languageName: node + linkType: hard + +"mdast-util-from-markdown@npm:^2.0.0": + version: 2.0.0 + resolution: "mdast-util-from-markdown@npm:2.0.0" + dependencies: + "@types/mdast": ^4.0.0 + "@types/unist": ^3.0.0 + decode-named-character-reference: ^1.0.0 + devlop: ^1.0.0 + mdast-util-to-string: ^4.0.0 + micromark: ^4.0.0 + micromark-util-decode-numeric-character-reference: ^2.0.0 + micromark-util-decode-string: ^2.0.0 + micromark-util-normalize-identifier: ^2.0.0 + micromark-util-symbol: ^2.0.0 + micromark-util-types: ^2.0.0 + unist-util-stringify-position: ^4.0.0 + checksum: 4e8d8a46b4b588486c41b80c39da333a91593bc8d60cd7421c6cd3c22003b8e5a62478292fb7bc97b9255b6301a2250cca32340ef43c309156e215453c5b92be + languageName: node + linkType: hard + +"mdast-util-phrasing@npm:^4.0.0": + version: 4.1.0 + resolution: "mdast-util-phrasing@npm:4.1.0" + dependencies: + "@types/mdast": ^4.0.0 + unist-util-is: ^6.0.0 + checksum: 3a97533e8ad104a422f8bebb34b3dde4f17167b8ed3a721cf9263c7416bd3447d2364e6d012a594aada40cac9e949db28a060bb71a982231693609034ed5324e + languageName: node + linkType: hard + +"mdast-util-to-markdown@npm:^2.0.0": + version: 2.1.0 + resolution: "mdast-util-to-markdown@npm:2.1.0" + dependencies: + "@types/mdast": ^4.0.0 + "@types/unist": ^3.0.0 + longest-streak: ^3.0.0 + mdast-util-phrasing: ^4.0.0 + mdast-util-to-string: ^4.0.0 + micromark-util-decode-string: ^2.0.0 + unist-util-visit: ^5.0.0 + zwitch: ^2.0.0 + checksum: 3a2cf3957e23b34e2e092e6e76ae72ee0b8745955bd811baba6814cf3a3d916c3fd52264b4b58f3bb3d512a428f84a1e998b6fc7e28434e388a9ae8fb6a9c173 + languageName: node + linkType: hard + +"mdast-util-to-string@npm:^4.0.0": + version: 4.0.0 + resolution: "mdast-util-to-string@npm:4.0.0" + dependencies: + "@types/mdast": ^4.0.0 + checksum: 35489fb5710d58cbc2d6c8b6547df161a3f81e0f28f320dfb3548a9393555daf07c310c0c497708e67ed4dfea4a06e5655799e7d631ca91420c288b4525d6c29 + languageName: node + linkType: hard + +"micromark-core-commonmark@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-core-commonmark@npm:2.0.0" + dependencies: + decode-named-character-reference: ^1.0.0 + devlop: ^1.0.0 + micromark-factory-destination: ^2.0.0 + micromark-factory-label: ^2.0.0 + micromark-factory-space: ^2.0.0 + micromark-factory-title: ^2.0.0 + micromark-factory-whitespace: ^2.0.0 + micromark-util-character: ^2.0.0 + micromark-util-chunked: ^2.0.0 + micromark-util-classify-character: ^2.0.0 + micromark-util-html-tag-name: ^2.0.0 + micromark-util-normalize-identifier: ^2.0.0 + micromark-util-resolve-all: ^2.0.0 + micromark-util-subtokenize: ^2.0.0 + micromark-util-symbol: ^2.0.0 + micromark-util-types: ^2.0.0 + checksum: 9c12fb580cf4ce71f60872043bd2794efe129f44d7b2b73afa155bbc0a66b7bc35655ba8cef438a6bd068441837ed3b6dc6ad7e5a18f815462c1750793e03a42 + languageName: node + linkType: hard + +"micromark-factory-destination@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-factory-destination@npm:2.0.0" + dependencies: + micromark-util-character: ^2.0.0 + micromark-util-symbol: ^2.0.0 + micromark-util-types: ^2.0.0 + checksum: d36e65ed1c072ff4148b016783148ba7c68a078991154625723e24bda3945160268fb91079fb28618e1613c2b6e70390a8ddc544c45410288aa27b413593071a + languageName: node + linkType: hard + +"micromark-factory-label@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-factory-label@npm:2.0.0" + dependencies: + devlop: ^1.0.0 + micromark-util-character: ^2.0.0 + micromark-util-symbol: ^2.0.0 + micromark-util-types: ^2.0.0 + checksum: c021dbd0ed367610d35f2bae21209bc804d1a6d1286ffce458fd6a717f4d7fe581a7cba7d5c2d7a63757c44eb927c80d6a571d6ea7969fae1b48ab6461d109c4 + languageName: node + linkType: hard + +"micromark-factory-space@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-factory-space@npm:2.0.0" + dependencies: + micromark-util-character: ^2.0.0 + micromark-util-types: ^2.0.0 + checksum: 4ffdcdc2f759887bbb356500cb460b3915ecddcb5d85c3618d7df68ad05d13ed02b1153ee1845677b7d8126df8f388288b84fcf0d943bd9c92bcc71cd7222e37 + languageName: node + linkType: hard + +"micromark-factory-title@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-factory-title@npm:2.0.0" + dependencies: + micromark-factory-space: ^2.0.0 + micromark-util-character: ^2.0.0 + micromark-util-symbol: ^2.0.0 + micromark-util-types: ^2.0.0 + checksum: 39e1ac23af3554e6e652e56065579bc7faf21ade7b8704b29c175871b4152b7109b790bb3cae0f7e088381139c6bac9553b8400772c3d322e4fa635f813a3578 + languageName: node + linkType: hard + +"micromark-factory-whitespace@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-factory-whitespace@npm:2.0.0" + dependencies: + micromark-factory-space: ^2.0.0 + micromark-util-character: ^2.0.0 + micromark-util-symbol: ^2.0.0 + micromark-util-types: ^2.0.0 + checksum: 9587c2546d1a58b4d5472b42adf05463f6212d0449455285662d63cd8eaed89c6b159ac82713fcee5f9dd88628c24307d9533cccd8971a2f3f4d48702f8f850a + languageName: node + linkType: hard + +"micromark-util-character@npm:^2.0.0": + version: 2.1.0 + resolution: "micromark-util-character@npm:2.1.0" + dependencies: + micromark-util-symbol: ^2.0.0 + micromark-util-types: ^2.0.0 + checksum: 36ee910f84077cf16626fa618cfe46ac25956b3242e3166b8e8e98c5a8c524af7e5bf3d70822264b1fd2d297a36104a7eb7e3462c19c28353eaca7b0d8717594 + languageName: node + linkType: hard + +"micromark-util-chunked@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-chunked@npm:2.0.0" + dependencies: + micromark-util-symbol: ^2.0.0 + checksum: 324f95cccdae061332a8241936eaba6ef0782a1e355bac5c607ad2564fd3744929be7dc81651315a2921535747a33243e6a5606bcb64b7a56d49b6d74ea1a3d4 + languageName: node + linkType: hard + +"micromark-util-classify-character@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-classify-character@npm:2.0.0" + dependencies: + micromark-util-character: ^2.0.0 + micromark-util-symbol: ^2.0.0 + micromark-util-types: ^2.0.0 + checksum: 086e52904deffebb793fb1c08c94aabb8901f76958142dfc3a6282890ebaa983b285e69bd602b9d507f1b758ed38e75a994d2ad9fbbefa7de2584f67a16af405 + languageName: node + linkType: hard + +"micromark-util-combine-extensions@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-combine-extensions@npm:2.0.0" + dependencies: + micromark-util-chunked: ^2.0.0 + micromark-util-types: ^2.0.0 + checksum: 107c47700343f365b4ed81551e18bc3458b573c500e56ac052b2490bd548adc475216e41d2271633a8867fac66fc22ba3e0a2d74a31ed79b9870ca947eb4e3ba + languageName: node + linkType: hard + +"micromark-util-decode-numeric-character-reference@npm:^2.0.0": + version: 2.0.1 + resolution: "micromark-util-decode-numeric-character-reference@npm:2.0.1" + dependencies: + micromark-util-symbol: ^2.0.0 + checksum: 9512507722efd2033a9f08715eeef787fbfe27e23edf55db21423d46d82ab46f76c89b4f960be3f5e50a2d388d89658afc0647989cf256d051e9ea01277a1adb + languageName: node + linkType: hard + +"micromark-util-decode-string@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-decode-string@npm:2.0.0" + dependencies: + decode-named-character-reference: ^1.0.0 + micromark-util-character: ^2.0.0 + micromark-util-decode-numeric-character-reference: ^2.0.0 + micromark-util-symbol: ^2.0.0 + checksum: a75daf32a4a6b549e9f19b4d833ebfeb09a32a9a1f9ce50f35dec6b6a3e4f9f121f49024ba7f9c91c55ebe792f7c7a332fc9604795181b6a612637df0df5b959 + languageName: node + linkType: hard + +"micromark-util-encode@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-encode@npm:2.0.0" + checksum: 853a3f33fce72aaf4ffa60b7f2b6fcfca40b270b3466e1b96561b02185d2bd8c01dd7948bc31a24ac014f4cc854e545ca9a8e9cf7ea46262f9d24c9e88551c66 + languageName: node + linkType: hard + +"micromark-util-html-tag-name@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-html-tag-name@npm:2.0.0" + checksum: d786d4486f93eb0ac5b628779809ca97c5dc60f3c9fc03eb565809831db181cf8cb7f05f9ac76852f3eb35461af0f89fa407b46f3a03f4f97a96754d8dc540d8 + languageName: node + linkType: hard + +"micromark-util-normalize-identifier@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-normalize-identifier@npm:2.0.0" + dependencies: + micromark-util-symbol: ^2.0.0 + checksum: b36da2d3fd102053dadd953ce5c558328df12a63a8ac0e5aad13d4dda8e43b6a5d4a661baafe0a1cd8a260bead4b4a8e6e0e74193dd651e8484225bd4f4e68aa + languageName: node + linkType: hard + +"micromark-util-resolve-all@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-resolve-all@npm:2.0.0" + dependencies: + micromark-util-types: ^2.0.0 + checksum: 31fe703b85572cb3f598ebe32750e59516925c7ff1f66cfe6afaebe0771a395a9eaa770787f2523d3c46082ea80e6c14f83643303740b3d650af7c96ebd30ccc + languageName: node + linkType: hard + +"micromark-util-sanitize-uri@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-sanitize-uri@npm:2.0.0" + dependencies: + micromark-util-character: ^2.0.0 + micromark-util-encode: ^2.0.0 + micromark-util-symbol: ^2.0.0 + checksum: ea4c28bbffcf2430e9aff2d18554296789a8b0a1f54ac24020d1dde76624a7f93e8f2a83e88cd5a846b6d2c4287b71b1142d1b89fa7f1b0363a9b33711a141fe + languageName: node + linkType: hard + +"micromark-util-subtokenize@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-subtokenize@npm:2.0.0" + dependencies: + devlop: ^1.0.0 + micromark-util-chunked: ^2.0.0 + micromark-util-symbol: ^2.0.0 + micromark-util-types: ^2.0.0 + checksum: 77d9c7d59c05a20468d49ce2a3640e9cb268c083ccad02322f26c84e1094c25b44f4b8139ef0a247ca11a4fef7620c5bf82fbffd98acdb2989e79cbe7bd8f1db + languageName: node + linkType: hard + +"micromark-util-symbol@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-symbol@npm:2.0.0" + checksum: fa4a05bff575d9fbf0ad96a1013003e3bb6087ed6b34b609a141b6c0d2137b57df594aca409a95f4c5fda199f227b56a7d8b1f82cea0768df161d8a3a3660764 + languageName: node + linkType: hard + +"micromark-util-types@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-types@npm:2.0.0" + checksum: 819fef3ab5770c37893d2a60381fb2694396c8d22803b6e103c830c3a1bc1490363c2b0470bb2acaaddad776dfbc2fc1fcfde39cb63c4f54d95121611672e3d0 + languageName: node + linkType: hard + +"micromark@npm:^4.0.0": + version: 4.0.0 + resolution: "micromark@npm:4.0.0" + dependencies: + "@types/debug": ^4.0.0 + debug: ^4.0.0 + decode-named-character-reference: ^1.0.0 + devlop: ^1.0.0 + micromark-core-commonmark: ^2.0.0 + micromark-factory-space: ^2.0.0 + micromark-util-character: ^2.0.0 + micromark-util-chunked: ^2.0.0 + micromark-util-combine-extensions: ^2.0.0 + micromark-util-decode-numeric-character-reference: ^2.0.0 + micromark-util-encode: ^2.0.0 + micromark-util-normalize-identifier: ^2.0.0 + micromark-util-resolve-all: ^2.0.0 + micromark-util-sanitize-uri: ^2.0.0 + micromark-util-subtokenize: ^2.0.0 + micromark-util-symbol: ^2.0.0 + micromark-util-types: ^2.0.0 + checksum: b84ab5ab1a0b28c063c52e9c2c9d7d44b954507235c10c9492d66e0b38f7de24bf298f914a1fbdf109f2a57a88cf0412de217c84cfac5fd60e3e42a74dbac085 + languageName: node + linkType: hard + +"ms@npm:2.1.2": + version: 2.1.2 + resolution: "ms@npm:2.1.2" + checksum: 673cdb2c3133eb050c745908d8ce632ed2c02d85640e2edb3ace856a2266a813b30c613569bf3354fdf4ea7d1a1494add3bfa95e2713baa27d0c2c71fc44f58f + languageName: node + linkType: hard + +"property-information@npm:^6.0.0": + version: 6.3.0 + resolution: "property-information@npm:6.3.0" + checksum: bf0a15dec097fd4324a42163cabd96b90819e48ef0d8d98756ef0420b2c579bf33646fe0b6e04aa9e79f5a2b5b5860ef11655a79cd8969d8eda58df23c4f96c9 + languageName: node + linkType: hard + +"remark-parse@npm:^11.0.0": + version: 11.0.0 + resolution: "remark-parse@npm:11.0.0" + dependencies: + "@types/mdast": ^4.0.0 + mdast-util-from-markdown: ^2.0.0 + micromark-util-types: ^2.0.0 + unified: ^11.0.0 + checksum: d83d245290fa84bb04fb3e78111f09c74f7417e7c012a64dd8dc04fccc3699036d828fbd8eeec8944f774b6c30cc1d925c98f8c46495ebcee7c595496342ab7f + languageName: node + linkType: hard + +"remark-stringify@npm:^11.0.0": + version: 11.0.0 + resolution: "remark-stringify@npm:11.0.0" + dependencies: + "@types/mdast": ^4.0.0 + mdast-util-to-markdown: ^2.0.0 + unified: ^11.0.0 + checksum: 59e07460eb629d6c3b3c0f438b0b236e7e6858fd5ab770303078f5a556ec00354d9c7fb9ef6d5f745a4617ac7da1ab618b170fbb4dac120e183fecd9cc86bce6 + languageName: node + linkType: hard + +"remark@npm:^15.0.1": + version: 15.0.1 + resolution: "remark@npm:15.0.1" + dependencies: + "@types/mdast": ^4.0.0 + remark-parse: ^11.0.0 + remark-stringify: ^11.0.0 + unified: ^11.0.0 + checksum: ac7edb7f9b70c22964bbc6c5d1c038dd10e1a43ccf436fbdb55fb8c89d54f1b77190b89386063ba410fbdd086fde9dca81ef470fc8358eed1ff76a9741ae3dcc + languageName: node + linkType: hard + +"space-separated-tokens@npm:^2.0.0": + version: 2.0.2 + resolution: "space-separated-tokens@npm:2.0.2" + checksum: 202e97d7ca1ba0758a0aa4fe226ff98142073bcceeff2da3aad037968878552c3bbce3b3231970025375bbba5aee00c5b8206eda408da837ab2dc9c0f26be990 + languageName: node + linkType: hard + +"trough@npm:^2.0.0": + version: 2.2.0 + resolution: "trough@npm:2.2.0" + checksum: 6097df63169aca1f9b08c263b1b501a9b878387f46e161dde93f6d0bba7febba93c95f876a293c5ea370f6cb03bcb687b2488c8955c3cfb66c2c0161ea8c00f6 + languageName: node + linkType: hard + +"unified@npm:^11.0.0": + version: 11.0.4 + resolution: "unified@npm:11.0.4" + dependencies: + "@types/unist": ^3.0.0 + bail: ^2.0.0 + devlop: ^1.0.0 + extend: ^3.0.0 + is-plain-obj: ^4.0.0 + trough: ^2.0.0 + vfile: ^6.0.0 + checksum: cfb023913480ac2bd5e787ffb8c27782c43e6be4a55f8f1c288233fce46a7ebe7718ccc5adb80bf8d56b7ef85f5fc32239c7bfccda006f9f2382e0cc2e2a77e4 + languageName: node + linkType: hard + +"unist-util-is@npm:^6.0.0": + version: 6.0.0 + resolution: "unist-util-is@npm:6.0.0" + dependencies: + "@types/unist": ^3.0.0 + checksum: f630a925126594af9993b091cf807b86811371e465b5049a6283e08537d3e6ba0f7e248e1e7dab52cfe33f9002606acef093441137181b327f6fe504884b20e2 + languageName: node + linkType: hard + +"unist-util-stringify-position@npm:^4.0.0": + version: 4.0.0 + resolution: "unist-util-stringify-position@npm:4.0.0" + dependencies: + "@types/unist": ^3.0.0 + checksum: e2e7aee4b92ddb64d314b4ac89eef7a46e4c829cbd3ee4aee516d100772b490eb6b4974f653ba0717a0071ca6ea0770bf22b0a2ea62c65fcba1d071285e96324 + languageName: node + linkType: hard + +"unist-util-visit-parents@npm:^6.0.0": + version: 6.0.1 + resolution: "unist-util-visit-parents@npm:6.0.1" + dependencies: + "@types/unist": ^3.0.0 + unist-util-is: ^6.0.0 + checksum: 08927647c579f63b91aafcbec9966dc4a7d0af1e5e26fc69f4e3e6a01215084835a2321b06f3cbe7bf7914a852830fc1439f0fc3d7153d8804ac3ef851ddfa20 + languageName: node + linkType: hard + +"unist-util-visit@npm:^5.0.0": + version: 5.0.0 + resolution: "unist-util-visit@npm:5.0.0" + dependencies: + "@types/unist": ^3.0.0 + unist-util-is: ^6.0.0 + unist-util-visit-parents: ^6.0.0 + checksum: 9ec42e618e7e5d0202f3c191cd30791b51641285732767ee2e6bcd035931032e3c1b29093f4d7fd0c79175bbc1f26f24f26ee49770d32be76f8730a652a857e6 + languageName: node + linkType: hard + +"vfile-message@npm:^4.0.0": + version: 4.0.2 + resolution: "vfile-message@npm:4.0.2" + dependencies: + "@types/unist": ^3.0.0 + unist-util-stringify-position: ^4.0.0 + checksum: 964e7e119f4c0e0270fc269119c41c96da20afa01acb7c9809a88365c8e0c64aa692fafbd952669382b978002ecd7ad31ef4446d85e8a22cdb62f6df20186c2d + languageName: node + linkType: hard + +"vfile@npm:^6.0.0": + version: 6.0.1 + resolution: "vfile@npm:6.0.1" + dependencies: + "@types/unist": ^3.0.0 + unist-util-stringify-position: ^4.0.0 + vfile-message: ^4.0.0 + checksum: 05ccee73aeb00402bc8a5d0708af299e9f4a33f5132805449099295085e3ca3b0d018328bad9ff44cf2e6f4cd364f1d558d3fb9b394243a25b2739207edcb0ed + languageName: node + linkType: hard + +"zwitch@npm:^2.0.0": + version: 2.0.4 + resolution: "zwitch@npm:2.0.4" + checksum: f22ec5fc2d5f02c423c93d35cdfa83573a3a3bd98c66b927c368ea4d0e7252a500df2a90a6b45522be536a96a73404393c958e945fdba95e6832c200791702b6 + languageName: node + linkType: hard diff --git a/public/static/css/giscus_dark.css b/public/static/css/giscus_dark.css new file mode 100644 index 00000000..29859782 --- /dev/null +++ b/public/static/css/giscus_dark.css @@ -0,0 +1,4 @@ +:root { + --color-border-default: #fff; + --color-fg-default: #fff; +} \ No newline at end of file diff --git a/public/static/css/giscus_light.css b/public/static/css/giscus_light.css new file mode 100644 index 00000000..ef4d8d7e --- /dev/null +++ b/public/static/css/giscus_light.css @@ -0,0 +1,4 @@ +:root { + --color-border-default: #000; + --color-fg-default: #000; +} \ No newline at end of file diff --git a/src/components/core/Avatar.astro b/src/components/core/Avatar.astro index b81bf500..2fa73882 100644 --- a/src/components/core/Avatar.astro +++ b/src/components/core/Avatar.astro @@ -14,8 +14,8 @@ diff --git a/src/components/core/Link/LinkBox.astro b/src/components/core/Link/LinkBox.astro index f44beec7..83f5a267 100644 --- a/src/components/core/Link/LinkBox.astro +++ b/src/components/core/Link/LinkBox.astro @@ -43,6 +43,7 @@ const { diff --git a/src/components/core/ThemeIcon.astro b/src/components/core/ThemeIcon.astro new file mode 100644 index 00000000..f80736ae --- /dev/null +++ b/src/components/core/ThemeIcon.astro @@ -0,0 +1,66 @@ +--- +import Icon from 'astro-icon'; +--- + + + + + + diff --git a/src/components/data/Container.astro b/src/components/data/Container.astro index f564d49c..4832941f 100644 --- a/src/components/data/Container.astro +++ b/src/components/data/Container.astro @@ -1,5 +1,7 @@ --- +import Divider from '@components/core/Divider.astro'; import Icon from 'astro-icon'; +import Footer from './Footer.astro'; interface Props { back?: string; @@ -19,6 +21,8 @@ const { back, maxWidth = '35rem', gap } = Astro.props; ) } + +