refactor: styling

This commit is contained in:
hypercross 2026-02-26 09:59:45 +08:00
parent dd4068926c
commit cf61c996cc
4 changed files with 12 additions and 12 deletions

View File

@ -24,4 +24,4 @@
### 链接 ### 链接
文本里面可以有:md-link[./stuff.md]的啦 文本里面可以有:md-link[./stuff.md#啊什么]的啦

View File

@ -1,3 +1,7 @@
### 啊什么 ### 啊什么
12345 12345
### 另一坨内容
54321

View File

@ -192,8 +192,8 @@ customElement("md-dice", { key: "" }, (props, { element }) => {
const displayText = () => (isRolled() ? `${result()}` : formula); const displayText = () => (isRolled() ? `${result()}` : formula);
return ( return (
<span class="inline-flex items-center gap-1"> <span class="inline-flex items-center px-1">
<a <span
onClick={(e) => { onClick={(e) => {
e.preventDefault(); e.preventDefault();
handleRoll(); handleRoll();
@ -202,18 +202,14 @@ customElement("md-dice", { key: "" }, (props, { element }) => {
title={rollDetail() || "掷骰子"} title={rollDetail() || "掷骰子"}
> >
🎲 🎲
</a> </span>
<span <a
onClick={handleTextClick} onClick={handleTextClick}
class={ class="cursor-pointer text-gray-700 hover:text-gray-900"
isRolled()
? "cursor-pointer text-gray-700 hover:text-gray-900"
: "text-gray-600"
}
title={isRolled() ? "点击重置为公式" : formula} title={isRolled() ? "点击重置为公式" : formula}
> >
{displayText()} {displayText()}
</span> </a>
</span> </span>
); );
}); });

View File

@ -92,7 +92,7 @@ customElement("md-link", {}, (props, { element }) => {
}} }}
class="text-blue-600 hover:text-blue-800 hover:underline" class="text-blue-600 hover:text-blue-800 hover:underline"
> >
{rawLinkSrc} {section || rawLinkSrc}
</a> </a>
); );
}); });