Skip to content

Commit

Permalink
feat: Better toc spacing style
Browse files Browse the repository at this point in the history
  • Loading branch information
riceball-tw committed Jun 23, 2024
1 parent bc7afd3 commit 05f1895
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/atoms/post-toc/PostTableOfContent.astro
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const { headings } = Astro.props
<Accordion summary='目錄'>
<ul data-cy="toc-list" data-toc class="toc border-l border-border m-0 list-none p-0">
{headings.map(({ depth, slug: headingSlug, text }) => {
const nestedHeadingClass = 'text-sm pl-8'
const headingClass = 'pl-4'
const nestedHeadingClass = 'text-sm px-8'
const headingClass = 'px-4'
const depthClass = `${depth > 2 ? nestedHeadingClass : headingClass}`
return (
<li class="p-0 m-0">
Expand Down

0 comments on commit 05f1895

Please sign in to comment.