Skip to content

Commit 0b47cc0

Browse files
Improve main content width for short pages (#1200)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 5b71343 commit 0b47cc0

File tree

1 file changed

+24
-26
lines changed

1 file changed

+24
-26
lines changed

src/ui/docs-layout.tsx

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -44,32 +44,30 @@ export const DocsLayout = (props: DocsLayoutProps) => {
4444
<Show when={titles()?.title} fallback={<Title>SolidDocs</Title>}>
4545
{(title) => <Title>{`${title()} - ${projectTitle()}`}</Title>}
4646
</Show>
47-
<div id="rr" class="flex relative justify-center">
48-
<article class="w-fit overflow-hidden pb-16 lg:px-5 expressive-code-overrides lg:max-w-none">
49-
<Show when={titles()?.parent}>
50-
{(t) => (
51-
<span class="text-sm font-semibold text-blue-700 dark:text-blue-300 my-1">
52-
{t()}
53-
</span>
54-
)}
55-
</Show>
56-
<Show when={titles()?.title}>
57-
{(t) => (
58-
<h1 class="prose-headings:text-[2.8rem] text-slate-900 dark:text-white">
59-
{t()}
60-
</h1>
61-
)}
62-
</Show>
63-
<span class="xl:hidden text-sm -mt-[15px] block">
64-
<EditPageLink />
65-
</span>
66-
<div class="max-w-2xl w-full">{props.children}</div>
67-
<span class="xl:hidden text-sm">
68-
<PageIssueLink />
69-
</span>
70-
<Pagination currentIndex={entryIndex()} collection={collection()} />
71-
</article>
72-
</div>
47+
<article class="mx-auto overflow-hidden pb-16 max-w-2xl w-full expressive-code-overrides">
48+
<Show when={titles()?.parent}>
49+
{(t) => (
50+
<span class="text-sm font-semibold text-blue-700 dark:text-blue-300 my-1">
51+
{t()}
52+
</span>
53+
)}
54+
</Show>
55+
<Show when={titles()?.title}>
56+
{(t) => (
57+
<h1 class="prose-headings:text-[2.8rem] text-slate-900 dark:text-white">
58+
{t()}
59+
</h1>
60+
)}
61+
</Show>
62+
<span class="xl:hidden text-sm -mt-[15px] block">
63+
<EditPageLink />
64+
</span>
65+
<div class="w-full">{props.children}</div>
66+
<span class="xl:hidden text-sm">
67+
<PageIssueLink />
68+
</span>
69+
<Pagination currentIndex={entryIndex()} collection={collection()} />
70+
</article>
7371
</>
7472
</Show>
7573
);

0 commit comments

Comments
 (0)