Skip to content

Commit 0310577

Browse files
authored
1 parent 3587f5c commit 0310577

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

frontend/routes/package/(_components)/Docs.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,12 @@ export function DocsView(
3838
</div>
3939
)}
4040

41-
<div class="grid grid-cols-1 lg:grid-cols-4 gap-12">
42-
<div class={`min-w-0 ${docs.toc ? "col-span-3" : "col-span-full"}`}>
41+
<div class="grid grid-cols-1 lg:grid-cols-4 gap-8 lg:gap-12">
42+
<div
43+
class={`min-w-0 ${
44+
docs.toc ? "lg:col-span-3 lg:row-start-1" : "col-span-full"
45+
}`}
46+
>
4347
<div class="ddoc" dangerouslySetInnerHTML={{ __html: docs.main }} />
4448

4549
{showProvenanceBadge && selectedVersion.rekorLogId && (
@@ -83,9 +87,8 @@ export function DocsView(
8387
</div>
8488
)}
8589
</div>
86-
8790
{docs.toc && (
88-
<div class="max-lg:hidden col-span-1 top-0 lg:sticky lg:max-h-screen box-border space-y-4 -mt-4 pt-4">
91+
<div class="max-lg:row-start-1 lg:col-[span_1_/_-1] lg:top-0 lg:sticky lg:max-h-screen box-border space-y-4 -mt-4 pt-4">
8992
{!docs.breadcrumbs && (
9093
<LocalSymbolSearch
9194
scope={params.scope}

frontend/static/styles.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,12 @@ body .ddoc .markdown th {
335335
@apply py-1.5;
336336
}
337337

338+
body .ddoc .toc {
339+
.topSymbols, .documentNavigation {
340+
@apply max-lg:hidden;
341+
}
342+
}
343+
338344
/* These might seem redundant but Tailwind won't always load them in the compiled stylesheet unless they're explicitly included here. */
339345
.score-ring-red {
340346
@apply bg-red-500;

0 commit comments

Comments
 (0)