Skip to content

Commit 0d6f1d5

Browse files
034: enlarge sidebar logo and match cream banner background
Two visual issues with the default just-the-docs logo rendering: 1. Logo was rendered tiny (~32px tall postage stamp). 2. Banner has a cream background that clashed against the navy sidebar. Add docs/_sass/custom/custom.scss (just-the-docs auto-loads it) that: - Sets the sidebar header background to #f6f0e1 (banner cream) - Forces .site-logo to span full sidebar width at ~6-7rem tall - Adds a thin navy border under the banner area for separation
1 parent ab6c8ab commit 0d6f1d5

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

docs/_sass/custom/custom.scss

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// =============================================================
2+
// SPECTRA — additional overrides on top of the spectra color scheme
3+
// =============================================================
4+
5+
// Sidebar header / logo area: give it a cream backdrop so the
6+
// SPECTRA banner (cream background) sits flush instead of looking
7+
// like a postage stamp on a navy wall. Make the logo full-width.
8+
9+
.side-bar {
10+
// Pull the logo flush to the top of the sidebar
11+
.site-header {
12+
background-color: #f6f0e1; // matches banner cream
13+
padding: 0;
14+
height: auto;
15+
min-height: 0;
16+
border-bottom: 2px solid #0f1628;
17+
}
18+
19+
.site-title {
20+
display: block;
21+
padding: 0;
22+
width: 100%;
23+
height: auto;
24+
line-height: 0;
25+
26+
&:hover {
27+
background-image: none;
28+
background-color: transparent;
29+
}
30+
}
31+
32+
// The logo itself (Just the Docs renders it as a background image
33+
// on .site-logo). Force it to display as a block-level image.
34+
.site-logo {
35+
width: 100%;
36+
height: 6rem; // ~96px tall — readable but not huge
37+
background-size: contain;
38+
background-position: center center;
39+
background-repeat: no-repeat;
40+
margin: 0;
41+
}
42+
43+
// Hide the duplicate text title (logo already says "SPECTRA")
44+
.site-title.lh-tight {
45+
display: block;
46+
}
47+
}
48+
49+
// Larger sidebar logo on bigger screens
50+
@media (min-width: 50rem) {
51+
.side-bar .site-logo {
52+
height: 7rem;
53+
}
54+
}

0 commit comments

Comments
 (0)