diff --git a/app/modules/rehype-momiji/buildCodeBlockHTML.ts b/app/modules/rehype-momiji/buildCodeBlockHTML.ts index d744c7b..7776b4b 100644 --- a/app/modules/rehype-momiji/buildCodeBlockHTML.ts +++ b/app/modules/rehype-momiji/buildCodeBlockHTML.ts @@ -35,7 +35,7 @@ const buildCodeBlockHTML = ( ) { node.properties = { class: node.properties.class, - style: `${node.properties.style}; padding-top: 0px;`, + style: `${node.properties.style}; padding-top: 48px;`, tabindex: node.properties.tabindex, }; @@ -43,7 +43,7 @@ const buildCodeBlockHTML = ( type: "element", tagName: "div", properties: { - style: `width: fit-content; margin-bottom: 16px; padding: 4px 8px; font-size: 14px; border-radius: 0 0 4px 4px; ${filenameColorStyle}`, + style: `position: absolute; top: 0; left: 16px; width: fit-content; margin-bottom: 16px; padding: 4px 8px; font-size: 14px; border-radius: 0 0 4px 4px; ${filenameColorStyle}`, }, children: [ { diff --git a/app/modules/rehype-momiji/rehypeMomiji.ts b/app/modules/rehype-momiji/rehypeMomiji.ts index a3544ab..ca65d66 100644 --- a/app/modules/rehype-momiji/rehypeMomiji.ts +++ b/app/modules/rehype-momiji/rehypeMomiji.ts @@ -80,7 +80,7 @@ const rehypeMomiji: Plugin = (options: Options = {}) => { ); const container = ` -