1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-08-05 19:48:27 +02:00

fix(blog): headings should be aligned with the text, not shifted

This commit is contained in:
Théo LUDWIG 2024-05-21 19:06:12 +02:00
parent 5f3dfad988
commit efa33f26ec
Signed by: theoludwig
GPG Key ID: ADFE5A563D718F3B

View File

@ -26,14 +26,14 @@ const Heading = (
): JSX.Element => { ): JSX.Element => {
const { children, id = "" } = props const { children, id = "" } = props
return ( return (
<h2 {...props} className="group"> <h2 {...props}>
<Link <Link href={`#${id}`} className="group relative hover:no-underline">
href={`#${id}`} <FontAwesomeIcon
className="invisible !text-black group-hover:visible dark:!text-white" className="absolute bottom-2 left-[-26px] mr-2 hidden size-4 !text-black group-hover:inline dark:!text-white"
> icon={faLink}
<FontAwesomeIcon className="mr-2 inline size-4" icon={faLink} /> />
{children}
</Link> </Link>
{children}
</h2> </h2>
) )
} }