From cf61c996cc928bd2c9ccadf2a6eb3e5921d05e61 Mon Sep 17 00:00:00 2001 From: hypercross Date: Thu, 26 Feb 2026 09:59:45 +0800 Subject: [PATCH] refactor: styling --- content/index.md | 2 +- content/stuff.md | 4 ++++ src/components/dice.tsx | 16 ++++++---------- src/components/md-link.tsx | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/content/index.md b/content/index.md index c3fc9d7..80b4fce 100644 --- a/content/index.md +++ b/content/index.md @@ -24,4 +24,4 @@ ### 链接 -文本里面可以有:md-link[./stuff.md]的啦 +文本里面可以有:md-link[./stuff.md#啊什么]的啦 diff --git a/content/stuff.md b/content/stuff.md index b727782..477a064 100644 --- a/content/stuff.md +++ b/content/stuff.md @@ -1,3 +1,7 @@ ### 啊什么 12345 + +### 另一坨内容 + +54321 diff --git a/src/components/dice.tsx b/src/components/dice.tsx index 3e85f5f..5335af7 100644 --- a/src/components/dice.tsx +++ b/src/components/dice.tsx @@ -192,8 +192,8 @@ customElement("md-dice", { key: "" }, (props, { element }) => { const displayText = () => (isRolled() ? `${result()}` : formula); return ( - - + { e.preventDefault(); handleRoll(); @@ -202,18 +202,14 @@ customElement("md-dice", { key: "" }, (props, { element }) => { title={rollDetail() || "掷骰子"} > 🎲 - - + {displayText()} - + ); }); diff --git a/src/components/md-link.tsx b/src/components/md-link.tsx index 8d9dc0b..16cb63d 100644 --- a/src/components/md-link.tsx +++ b/src/components/md-link.tsx @@ -92,7 +92,7 @@ customElement("md-link", {}, (props, { element }) => { }} class="text-blue-600 hover:text-blue-800 hover:underline" > - {rawLinkSrc} + {section || rawLinkSrc} ); });