Skip to content

Commit

Permalink
fix: margins in markdown template if toc is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
krsche committed Aug 20, 2024
1 parent 670a9c2 commit e98e943
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/layouts/Markdown.astro
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const proseCSS = [
"prose-headings:before:-mt-36",
"prose-headings:before:sm:h-40",
"prose-headings:before:sm:-mt-40",
"prose-li:mt-0",
"prose-li:mb-0",
].join(" ");
const tocEnabled = tocHeadings.length > 0 ? true : false;
Expand Down Expand Up @@ -78,8 +80,8 @@ if (tocEnabled) {
)
}

<div class="mt-10 w-full px-4 py-8 lg:mr-64 lg:mt-0 lg:px-10">
<div class={"prose mx-auto w-full max-w-[1240px]" + proseCSS}>
<div class={"mt-10 w-full px-4 py-8 lg:px-10" + (tocEnabled ? " lg:mr-64" : "")}>
<div class={"prose mx-auto w-full max-w-[1240px] " + proseCSS}>
<slot class="" />
</div>
</div>
Expand Down

0 comments on commit e98e943

Please sign in to comment.