feat: restyle heading links
This commit is contained in:
+7
-15
@@ -20,23 +20,15 @@
|
||||
}
|
||||
|
||||
.prose .xlog-anchor {
|
||||
@apply text-base align-middle h-full;
|
||||
@apply ml-1 opacity-0 transition-opacity hover:no-underline;
|
||||
}
|
||||
|
||||
.prose .xlog-anchor > span {
|
||||
@apply w-5 pr-1 -ml-5 text-zinc-900 hidden;
|
||||
}
|
||||
|
||||
.prose .xlog-anchor > div {
|
||||
@apply inline;
|
||||
}
|
||||
|
||||
.prose h2:hover .xlog-anchor > span,
|
||||
.prose h3:hover .xlog-anchor > span,
|
||||
.prose h4:hover .xlog-anchor > span,
|
||||
.prose h5:hover .xlog-anchor > span,
|
||||
.prose h6:hover .xlog-anchor > span {
|
||||
@apply inline-block;
|
||||
.prose h2:hover .xlog-anchor,
|
||||
.prose h3:hover .xlog-anchor,
|
||||
.prose h4:hover .xlog-anchor,
|
||||
.prose h5:hover .xlog-anchor,
|
||||
.prose h6:hover .xlog-anchor {
|
||||
@apply opacity-100;
|
||||
}
|
||||
|
||||
.prose h2 {
|
||||
|
||||
@@ -156,6 +156,7 @@ export const renderPageContent = (
|
||||
.use(rehypeVideo, { env })
|
||||
.use(rehypeSlug)
|
||||
.use(rehypeAutolinkHeadings, {
|
||||
behavior: "append",
|
||||
properties: {
|
||||
className: ["xlog-anchor"],
|
||||
ariaHidden: true,
|
||||
@@ -164,12 +165,8 @@ export const renderPageContent = (
|
||||
content(node) {
|
||||
return [
|
||||
{
|
||||
type: "element",
|
||||
tagName: "span",
|
||||
properties: {
|
||||
className: ["icon-[mingcute--link-line]"],
|
||||
},
|
||||
children: [],
|
||||
type: "text",
|
||||
value: "#",
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user