Skip to content

Commit 107b9d3

Browse files
committed
feat(website): made docs sidebar nicer
Added a splash of color.
1 parent 3c1a919 commit 107b9d3

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
lines changed

website/src/templates/docs/container.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn docs_version_switcher(props: DocsVersionSwitcherProps) -> SycamoreTemplate<G>
3737

3838
// This doesn't navigate to the same page in the new version, because it may well not exist
3939
select(
40-
class = "p-1 rounded-sm dark:bg-navy",
40+
class = "p-2 rounded-md text-white bg-indigo-500",
4141
on:input = move |event| {
4242
let target: web_sys::HtmlInputElement = event.target().unwrap().unchecked_into();
4343
let new_version = target.value();

website/static/styles/docs_links_markdown.css

+23-9
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,28 @@
1414
padding-left: 1em;
1515
display: block;
1616
}
17-
/* This makes nested lists look like `1.1.`, `1.2.`, etc. */
18-
.docs-links-markdown li:before {
19-
content: counters(item, ".") ". ";
20-
counter-increment: item;
21-
font-weight: 500;
17+
.docs-links-markdown li a {
18+
display: block;
19+
width: 100%;
20+
padding: 0.25rem;
21+
padding-left: 0.5rem;
22+
border-radius: 0.5rem;
23+
transition-property: background-color, border-color, fill, stroke;
24+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
25+
transition-duration: 75ms;
2226
}
23-
.docs-links-markdown ul {
24-
list-style-type: decimal;
25-
list-style-position: inside;
26-
counter-reset: item;
27+
.docs-links-markdown li a:hover {
28+
color: white;
29+
background-color: #6366F1;
2730
}
31+
/* /\* This makes nested lists look like `1.1.`, `1.2.`, etc. *\/ */
32+
/* .docs-links-markdown li:before { */
33+
/* content: counters(item, ".") ". "; */
34+
/* counter-increment: item; */
35+
/* font-weight: 500; */
36+
/* } */
37+
/* .docs-links-markdown ul { */
38+
/* list-style-type: decimal; */
39+
/* list-style-position: inside; */
40+
/* counter-reset: item; */
41+
/* } */

0 commit comments

Comments
 (0)