Skip to content

Commit 41ff4ae

Browse files
Merge pull request #37 from ShipFriend0516/refactor/toc
[Refactor] TOC
2 parents 6944703 + 2257a1c commit 41ff4ae

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

app/entities/post/detail/PostBody.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface Props {
1111
const PostBody = ({ content, loading }: Props) => {
1212
return (
1313
<div
14-
className={'max-w-3xl post-body px-4 py-16 min-h-[500px] relative '}
14+
className={'max-w-full post-body px-4 py-16 min-h-[500px] relative '}
1515
>
1616
{loading ? (
1717
<div className={'w-1/3 mx-auto'}>

app/entities/post/detail/PostTOC.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const PostTOC = ({ postContent }: { postContent: string }) => {
1212
};
1313

1414
return (
15-
<div className="fixed post-toc hidden lg:block w-[280px] top-1/2 -translate-y-1/2 left-[calc(50%+524px)] transition-all text-sm bg-gray-100/80 rounded-md p-4 text-black">
15+
<div className="fixed post-toc hidden 2xl:block w-[280px] top-[calc(50%+100px)] -translate-y-1/2 left-[calc(50%+524px)] transition-all text-sm bg-gray-100/80 rounded-md p-4 text-black">
1616
<h4 className={'text-xl font-bold mb-2'}>📌 Table of Contents</h4>
1717
<ul className={'list-none'}>
1818
{parseHeadings(postContent).map((heading) => {

app/globals.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ article.post h6 {
6565

6666
article.post .post-body {
6767
max-width: 768px;
68+
width: 100%;
6869
margin: 0 auto;
6970
font-size: 1.1em;
7071
line-height: 150%;

0 commit comments

Comments
 (0)