Skip to content

Commit a47fce0

Browse files
authored
Move sidebar to the left of content (#2192)
* Move sidebar to the left * Prevent sidebar links from wrapping per-word
1 parent 7e7e270 commit a47fce0

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

src/lib/output/themes/default/layouts/default.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ export const defaultLayout = (context: DefaultThemeRenderContext, props: PageEve
3333
{context.toolbar(props)}
3434

3535
<div class="container container-main">
36+
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
37+
{context.hook("navigation.begin")}
38+
{context.navigation(props)}
39+
{context.hook("navigation.end")}
40+
</div>
3641
<div class="col-8 col-content">
3742
{context.hook("content.begin")}
3843
{context.header(props)}
3944
{props.template(props)}
4045
{context.hook("content.end")}
4146
</div>
42-
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
43-
{context.hook("navigation.begin")}
44-
{context.navigation(props)}
45-
{context.hook("navigation.end")}
46-
</div>
4747
</div>
4848

4949
{context.footer()}

src/lib/output/themes/default/partials/navigation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export function secondaryNavigation(context: DefaultThemeRenderContext, props: P
173173
>
174174
<a href={context.urlTo(child)} class="tsd-index-link">
175175
{context.icons[child.kind]()}
176-
{renderName(child)}
176+
<span>{renderName(child)}</span>
177177
</a>
178178
</li>
179179
);

static/style.css

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ dd {
253253
.col-8 {
254254
box-sizing: border-box;
255255
float: left;
256-
padding: 2rem 1rem;
257256
}
258257

259258
.col-4 {
@@ -262,7 +261,8 @@ dd {
262261
.col-8 {
263262
flex: 1 0;
264263
flex-wrap: wrap;
265-
padding-left: 0;
264+
padding: 2rem 3rem;
265+
padding-right: 0;
266266
}
267267

268268
@keyframes fade-in {
@@ -921,16 +921,13 @@ a.tsd-index-link {
921921
height: calc(100vh - 2rem);
922922
top: 4rem;
923923
right: 0;
924-
padding: 0 1.5rem;
925-
padding-top: 1rem;
924+
padding: 2rem 0;
925+
padding-right: 1rem;
926926
margin-top: 3rem;
927927
transition: 0.3s ease-in-out;
928928
transition-property: top, padding-top, padding, height;
929929
overflow-y: auto;
930930
}
931-
.col-menu {
932-
border-left: 1px solid var(--color-accent);
933-
}
934931
.col-menu--hide {
935932
top: 1rem;
936933
}

0 commit comments

Comments
 (0)