style: optimize colors and opacity, fix footnote symbol formatting

This commit is contained in:
radishzzz 2025-04-24 20:59:50 +01:00
parent 955db0e897
commit c13f393015
5 changed files with 363 additions and 359 deletions

View file

@ -2,7 +2,7 @@
"name": "astro-theme-retypeset", "name": "astro-theme-retypeset",
"type": "module", "type": "module",
"version": "0.0.1", "version": "0.0.1",
"packageManager": "pnpm@10.8.1", "packageManager": "pnpm@10.9.0",
"repository": "https://github.com/radishzzz/astro-theme-retypeset", "repository": "https://github.com/radishzzz/astro-theme-retypeset",
"scripts": { "scripts": {
"dev": "astro check && astro dev", "dev": "astro check && astro dev",
@ -13,20 +13,23 @@
"lint:fix": "eslint . --fix" "lint:fix": "eslint . --fix"
}, },
"dependencies": { "dependencies": {
"@astrojs/mdx": "^4.2.4", "@astrojs/mdx": "^4.2.5",
"@astrojs/partytown": "^2.1.4", "@astrojs/partytown": "^2.1.4",
"@astrojs/rss": "^4.0.11", "@astrojs/rss": "^4.0.11",
"@astrojs/sitemap": "^3.3.0", "@astrojs/sitemap": "^3.3.1",
"@waline/client": "^3.5.6", "@waline/client": "^3.5.6",
"astro": "^5.7.4", "astro": "^5.7.5",
"astro-compress": "^2.3.8", "astro-compress": "^2.3.8",
"astro-og-canvas": "^0.7.0", "astro-og-canvas": "^0.7.0",
"astro-robots-txt": "^1.0.0", "astro-robots-txt": "^1.0.0",
"canvaskit-wasm": "^0.40.0", "canvaskit-wasm": "^0.40.0",
"hastscript": "^9.0.1",
"katex": "^0.16.22", "katex": "^0.16.22",
"markdown-it": "^14.1.0", "markdown-it": "^14.1.0",
"mdast-util-to-string": "^4.0.0",
"overlayscrollbars": "^2.11.1", "overlayscrollbars": "^2.11.1",
"photoswipe": "^5.4.4", "photoswipe": "^5.4.4",
"reading-time": "^1.5.0",
"rehype-external-links": "^3.0.0", "rehype-external-links": "^3.0.0",
"rehype-katex": "^7.0.1", "rehype-katex": "^7.0.1",
"rehype-slug": "^6.0.0", "rehype-slug": "^6.0.0",
@ -48,8 +51,6 @@
"eslint": "^9.25.1", "eslint": "^9.25.1",
"eslint-plugin-astro": "^1.3.1", "eslint-plugin-astro": "^1.3.1",
"lint-staged": "^15.5.1", "lint-staged": "^15.5.1",
"mdast-util-to-string": "^4.0.0",
"reading-time": "^1.5.0",
"sharp": "^0.34.1", "sharp": "^0.34.1",
"typescript": "~5.8.3", "typescript": "~5.8.3",
"unocss": "66.1.0-beta.12", "unocss": "66.1.0-beta.12",

681
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -237,7 +237,7 @@ X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
書籍是人類進步的<del>樓梯</del>階梯。 書籍是人類進步的<del>樓梯</del>階梯。
優秀的作者總是會仔細檢查<u title="拼"></u>寫錯誤 優秀的作家總是會仔細檢查<u title="拼寫">拚寫</u>問題
按下 <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Delete</kbd> 以結束會話。 按下 <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Delete</kbd> 以結束會話。

View file

@ -237,7 +237,7 @@ X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
书籍是人类进步的<del>楼梯</del>阶梯。 书籍是人类进步的<del>楼梯</del>阶梯。
优秀的作者总是会仔细检查<u title="拼"></u>写错误 优秀的作家总是会仔细检查<u title="拼写">拚写</u>问题
按下 <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Delete</kbd> 以结束会话。 按下 <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Delete</kbd> 以结束会话。

View file

@ -107,7 +107,7 @@ html.dark .heti pre :where(span) {
--at-apply: 'relative pl-8'; --at-apply: 'relative pl-8';
} }
.heti :where(code) span.line::before { .heti :where(code) span.line::before {
--at-apply: 'absolute left-0 w-4 leading-1.9em text-secondary/40'; --at-apply: 'absolute left-0 w-4 leading-1.9em text-secondary/25';
content: counter(line); content: counter(line);
counter-increment: line; counter-increment: line;
direction: rtl; direction: rtl;
@ -115,7 +115,7 @@ html.dark .heti pre :where(span) {
/* Blockquotes */ /* Blockquotes */
.heti :where(blockquote) { .heti :where(blockquote) {
--at-apply: 'mt-3 mb-6 px-4 c-secondary/80 border-l-4 border-solid border-secondary/25'; --at-apply: 'mt-3 mb-6 px-4 c-secondary/80 border-l-4 border-solid border-secondary/15';
} }
/* Tables */ /* Tables */
@ -127,7 +127,7 @@ html.dark .heti pre :where(span) {
} }
.heti :where(th), .heti :where(th),
.heti :where(td) { .heti :where(td) {
--at-apply: 'px-3 py-1.5 border border-solid border-secondary/40'; --at-apply: 'px-3 py-1.5 border border-solid border-secondary/25';
} }
.heti :where(th) { .heti :where(th) {
--at-apply: 'bg-secondary/5'; --at-apply: 'bg-secondary/5';
@ -183,24 +183,24 @@ html.dark .heti pre :where(span) {
/* Wavy Underline */ /* Wavy Underline */
.heti :where(u) { .heti :where(u) {
--at-apply: 'underline underline-offset-0.25em decoration-wavy decoration-red'; --at-apply: 'underline underline-offset-0.25em decoration-wavy decoration-red-400';
} }
html.dark .heti :where(u) { html.dark .heti :where(u) {
--at-apply: 'decoration-#A14F50'; --at-apply: 'decoration-red-400/50';
} }
/* Keyboard Input */ /* Keyboard Input */
.heti :where(kbd) { .heti :where(kbd) {
--at-apply: 'inline-block px-0.4em py-0.3em text-0.85em font-bold leading-none tracking-0 whitespace-nowrap'; --at-apply: 'inline-block px-0.4em py-0.3em text-0.85em font-bold leading-none tracking-0 whitespace-nowrap';
--at-apply: 'rounded border border-solid border-secondary/40 text-secondary'; --at-apply: 'rounded border border-solid border-secondary/25 text-secondary';
} }
/* Highlighted Text */ /* Highlighted Text */
.heti :where(mark) { .heti :where(mark) {
--at-apply: 'py-0.25 text-inherit bg-#fff700e0'; --at-apply: 'py-0.25 text-inherit bg-[rgba(255,235,0,0.5)]';
} }
html.dark .heti :where(mark) { html.dark .heti :where(mark) {
--at-apply: 'bg-#4d4a00e0'; --at-apply: 'text-background';
} }
/* Footnotes */ /* Footnotes */
@ -210,14 +210,14 @@ html.dark .heti :where(mark) {
} }
.heti sup:target, .heti sup:target,
.heti sup a:target { .heti sup a:target {
--at-apply: 'bg-#ff0'; --at-apply: 'bg-[rgba(255,235,0,0.5)]';
} }
html.dark .heti sup:target, html.dark .heti sup:target,
html.dark .heti sup a:target { html.dark .heti sup a:target {
--at-apply: 'bg-#4d4a00e0'; --at-apply: 'text-background';
} }
.heti :where(.data-footnote-backref) { .heti :where(.data-footnote-backref) {
--at-apply: 'no-underline'; --at-apply: 'no-underline font-serif';
} }
/* Bold */ /* Bold */
@ -242,7 +242,7 @@ html.dark .heti sup a:target {
/* Horizontal Rules */ /* Horizontal Rules */
.heti :where(hr) { .heti :where(hr) {
--at-apply: 'mt-6 mb-3 border-t-2 border-secondary/25'; --at-apply: 'mt-6 mb-3 border-t-2 border-secondary/5';
} }
/* KaTeX Mathematical */ /* KaTeX Mathematical */