Skip to content

Commit ba6c94e

Browse files
committed
Add a stylesheet to make the reference HTML look a bit prettier
1 parent 861b8f0 commit ba6c94e

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

doc/rust.css

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
body {
2+
padding: 1em;
3+
margin: 0;
4+
font-family: "Helvetica Neue", Helvetica, sans-serif;
5+
}
6+
7+
body {
8+
padding: 1em 6em;
9+
max-width: 50em;
10+
}
11+
12+
h1 { font-size: 22pt; }
13+
h2 { font-size: 17pt; }
14+
h3 { font-size: 14pt; }
15+
16+
pre {
17+
margin: 1.1em 0;
18+
padding: .4em .4em .4em 1em;
19+
font-size: 120%;
20+
}
21+
22+
a, a:visited, a:link {
23+
text-decoration: none;
24+
color: #00438a;
25+
}

mk/docs.mk

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ doc/rust.html: rust.md doc/version.md doc/keywords.md
1919
--section-divs \
2020
--number-sections \
2121
--from=markdown --to=html \
22+
--css=rust.css \
2223
--output=$@ \
2324
$<
25+
@$(call E, cp: $(S)doc/rust.css)
26+
-$(Q)cp -a $(S)doc/rust.css doc/rust.css 2> /dev/null
27+
2428

2529
ifdef CFG_PDFLATEX
2630

@@ -50,7 +54,7 @@ ifdef CFG_NODE
5054
doc/tutorial/web/index.html: \
5155
$(wildcard $(S)doc/tutorial/*.md)
5256
@$(call E, cp: $(S)doc/tutorial)
53-
$(Q)cp -a $(S)doc/tutorial doc/
57+
-$(Q)cp -a $(S)doc/tutorial doc/ 2> /dev/null
5458
@$(call E, node: build.js)
5559
$(Q)cd doc/tutorial && $(CFG_NODE) build.js
5660

0 commit comments

Comments
 (0)