Skip to content

Commit 316050e

Browse files
committed
Use rem values from mockup
Hide toc with theme switcher Add x overflow for code blocks (code blocks will) scroll horizontally instead of overflowing outside it's block
1 parent 552323d commit 316050e

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

assets/css/v2/style.css

+7-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ nav {
7777

7878
/* content */
7979
main {
80-
max-width: 40rem;
81-
min-width: 30rem;
80+
max-width: 50rem;
81+
min-width: 40rem;
8282
margin: 2rem 2rem;
8383
}
8484

@@ -164,6 +164,11 @@ code {
164164
font-family: 'JetBrains Mono', monospace;
165165
}
166166

167+
pre.chroma {
168+
overflow-x: auto;
169+
box-sizing: border-box;
170+
}
171+
167172
/* FILTHY HACKS BEGIN */
168173

169174
/* Override logo with black text version */

assets/js/theme-switcher.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function useNewTheme(useNewTheme) {
2929
});
3030

3131
// swap out v1 and v2 elements
32-
const v1ElementIds = ["sidebar"]
32+
const v1ElementIds = ["sidebar", "toc"]
3333

3434
v1ElementIds.forEach((elementId) => {
3535
document.getElementById(elementId).style.display = useNewTheme ? "none" : "";

layouts/_default/docs.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ <h1>{{ .Title }}</h1>
3737
</main>
3838
{{ if and (gt .WordCount 200 ) (.Params.toc) }}
3939
{{ if (add (len (findRE "<h3" .Content)) (len (findRE "<h2" .Content))) }}
40-
<div class="col-md-3 d-none d-xl-block d-print-none nginx-toc align-top">
40+
<div id="toc" class="col-md-3 d-none d-xl-block d-print-none nginx-toc align-top">
4141
{{ partial "toc.html" . }}
4242
</div>
4343
{{ end }}

0 commit comments

Comments
 (0)