Skip to content

Commit 6e122a6

Browse files
committed
Proper toc styling
1 parent a3f733b commit 6e122a6

File tree

3 files changed

+19
-39
lines changed

3 files changed

+19
-39
lines changed

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="hero-title">
22
<h1 class="main-title">Building a minimal AI agent</h1>
3-
<p class="subtitle">for terminal use and more</p>
3+
<p class="subtitle">for software engineering, terminal use and more</p>
44
</div>
55

66
<div class="author-box">
@@ -569,7 +569,7 @@ class Environment:
569569
`mini-swe-agent` provides different environment classes that for example allow to execute actions in docker containers instead of directly in your local environment.
570570
Sonds more complicated? It really isn't: all we do is switch from `subprocess.run` to calls to `docker exec`.
571571

572-
<h2 id="contribute">Contribute to this guide</h2>
572+
## Contribute to this guide
573573

574574
We welcome contributions on GitHub to improve this guide!
575575

docs/stylesheets/extra.css

Lines changed: 17 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -40,57 +40,37 @@
4040
font-weight: 600;
4141
}
4242

43-
/* Layout adjustments */
44-
:root {
45-
--content-max: 40rem; /* main text width (~800px) */
46-
--toc-width: 16rem; /* room for right TOC */
47-
--layout-gap: 2rem;
43+
/* Hide left navigation sidebar to keep only the TOC on the right */
44+
.md-sidebar--primary {
45+
display: none;
4846
}
4947

50-
/* Keep sidebar on the right, but don't push main text left; center main text */
51-
@media screen and (min-width: 76.25em) {
52-
.md-grid,
53-
.md-main__inner {
54-
max-width: calc(var(--content-max) + var(--toc-width) + 2 * var(--layout-gap));
55-
width: 100%;
56-
}
57-
58-
.md-main__inner {
59-
display: grid;
60-
grid-template-columns: 1fr minmax(0, var(--content-max)) var(--toc-width);
61-
gap: var(--layout-gap);
62-
align-items: start;
63-
}
48+
/* Increase left margin for content */
49+
.md-content {
50+
margin-left: 2rem;
51+
}
6452

53+
@media screen and (min-width: 76.25em) {
6554
.md-content {
66-
grid-column: 2;
67-
}
68-
69-
/* Primary sidebar (TOC) on the right */
70-
.md-sidebar--primary {
71-
grid-column: 3;
72-
position: sticky;
73-
top: var(--md-header-height, 3.2rem);
74-
align-self: start;
75-
left: auto;
76-
right: 0;
77-
order: 2;
78-
}
79-
80-
/* Secondary sidebar not used */
81-
.md-sidebar--secondary {
82-
display: none;
55+
margin-left: 6rem;
8356
}
8457
}
8558

8659
/* More subtle header - white/black background instead of blue */
8760
.md-header {
61+
position: static; /* let the header scroll away */
62+
top: auto;
8863
background-color: var(--md-default-bg-color);
8964
color: var(--md-default-fg-color);
9065
box-shadow: 0 0 0.05rem rgba(0, 0, 0, 0.05), 0 0.05rem 0.1rem rgba(0, 0, 0, 0.025);
9166
border-bottom: 1px solid var(--md-default-fg-color--lightest);
9267
}
9368

69+
/* Remove top padding since the header is no longer sticky */
70+
.md-main {
71+
padding-top: 0;
72+
}
73+
9474
/* Simplify header inner spacing */
9575
.md-header__inner {
9676
padding: 0.4rem 0.8rem;
@@ -136,3 +116,4 @@
136116
font-size: 1.25rem;
137117
}
138118
}
119+

mkdocs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ theme:
2929
- navigation.top
3030
- content.code.copy
3131
- content.code.annotate
32-
- toc.integrate
3332
- navigation.tabs.sticky
3433

3534
# Markdown extensions

0 commit comments

Comments
 (0)