polish(ui): 侧栏可点块悬停/聚焦统一为主题色淡底
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -73,14 +73,7 @@ export default function PostToc({ items }: { items: TocItem[] }) {
|
||||
data-toc-id={it.id}
|
||||
href={`#${it.id}`}
|
||||
onClick={jump(it.id)}
|
||||
className="block py-1.5 pr-1 text-[12.5px] leading-snug transition-colors"
|
||||
style={{
|
||||
paddingLeft: it.level === 3 ? 20 : 12,
|
||||
marginLeft: -1,
|
||||
borderLeft: `2px solid ${isActive ? "var(--accent)" : "transparent"}`,
|
||||
color: isActive ? "var(--accent)" : "var(--ink-2)",
|
||||
fontWeight: isActive ? 600 : 400,
|
||||
}}
|
||||
className={`j13-toc-link${it.level === 3 ? " is-h3" : ""}${isActive ? " is-active" : ""}`}
|
||||
>
|
||||
{it.text}
|
||||
</a>
|
||||
|
||||
@@ -162,13 +162,10 @@ function BoardHot({ posts }: { posts: PostListItem[] }) {
|
||||
<ol className="j13-ranklist">
|
||||
{posts.map((p, i) => (
|
||||
<li key={p.id}>
|
||||
<Link href={`/post/${p.id}`} className="j13-rank group" data-tip={p.title}>
|
||||
<Link href={`/post/${p.id}`} className="j13-rank" data-tip={p.title}>
|
||||
<span className="j13-rank-no">{i + 1}</span>
|
||||
<span className="min-w-0 flex-1">
|
||||
<span
|
||||
className="block truncate text-[13px] font-medium leading-snug transition-colors group-hover:text-[var(--accent)]"
|
||||
style={{ color: "var(--ink)" }}
|
||||
>
|
||||
<span className="j13-rank-title truncate">
|
||||
{p.title}
|
||||
</span>
|
||||
<span className="mt-1 flex items-center gap-2.5 meta text-[11.5px]">
|
||||
|
||||
@@ -150,13 +150,10 @@ function HotRanking({ posts }: { posts: PostListItem[] }) {
|
||||
<ol className="j13-ranklist">
|
||||
{posts.map((p, i) => (
|
||||
<li key={p.id}>
|
||||
<Link href={`/post/${p.id}`} className="j13-rank group" data-tip={p.title}>
|
||||
<Link href={`/post/${p.id}`} className="j13-rank" data-tip={p.title}>
|
||||
<span className="j13-rank-no">{i + 1}</span>
|
||||
<span className="min-w-0 flex-1">
|
||||
<span
|
||||
className="block truncate text-[13px] font-medium leading-snug transition-colors group-hover:text-[var(--accent)]"
|
||||
style={{ color: "var(--ink)" }}
|
||||
>
|
||||
<span className="j13-rank-title truncate">
|
||||
{p.title}
|
||||
</span>
|
||||
<span className="mt-1 flex items-center gap-2.5 meta text-[11.5px]">
|
||||
|
||||
Reference in New Issue
Block a user