Skip to content

Commit 105a26e

Browse files
committed
asciidoc customization
1 parent 03a2d3a commit 105a26e

File tree

3 files changed

+103
-3
lines changed

3 files changed

+103
-3
lines changed

doc/Jamfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@
77

88
import asciidoctor ;
99

10-
html mp11.html : mp11.adoc ;
10+
path-constant boostlook : ../../../tools/boostlook ;
11+
12+
html mp11.html : mp11.adoc
13+
: <asciidoctor-attribute>stylesheet=$(boostlook)/boostlook.css
14+
<flags>"-r $(boostlook)/boostlook.rb"
15+
<dependency>$(boostlook)/boostlook.css
16+
<dependency>$(boostlook)/boostlook.rb
17+
<dependency>mp11-docinfo-footer.html
18+
;
1119

1220
html simple_cxx11_metaprogramming.html :
1321
article/simple_cxx11_metaprogramming.adoc ;

doc/boostdoc.css

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/*! Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
2+
/* Uncomment the following line when using as a custom stylesheet */
3+
@import "https://fonts.googleapis.com/css2?family=Noto+Sans+Display:ital,wdth,wght@0,87.5,100..900;1,87.5,100..900&display=swap";
4+
@import "https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wdth,[email protected],400..550&display=swap";
5+
6+
/* css reset */
7+
*, *::before, *::after {
8+
box-sizing: border-box;
9+
}
10+
* {
11+
margin: 0;
12+
}
13+
body {
14+
line-height: 1.5;
15+
-webkit-font-smoothing: antialiased;
16+
}
17+
img, picture, video, canvas, svg {
18+
display: block;
19+
max-width: 100%;
20+
}
21+
input, button, textarea, select {
22+
font: inherit;
23+
}
24+
p, h1, h2, h3, h4, h5, h6 {
25+
overflow-wrap: break-word;
26+
}
27+
#root, #__next {
28+
isolation: isolate;
29+
}
30+
31+
/*----*/
32+
33+
:root {
34+
--color-cyan: rgb(0, 90, 156);
35+
}
36+
body {
37+
font-family: "Noto Sans Display", serif;
38+
}
39+
h1, h2, h3, h4, h5, h6 {
40+
display: block;
41+
line-height: 1;
42+
margin-top: 1em;
43+
margin-bottom: 1em;
44+
font-weight: 650;
45+
}
46+
h1 { font-size: 1.75em; }
47+
h2 { font-size: 1.5em; }
48+
h3 { font-size: 1.375em; }
49+
h4 { font-size: 1.25em; }
50+
h5 { font-size: 1.125em; }
51+
h6 { font-size: 1em; }
52+
p {
53+
margin: 1em 0em;
54+
}
55+
a {
56+
color: var(--color-cyan);
57+
text-decoration: none;
58+
}
59+
a:hover {
60+
text-decoration: underline;
61+
}
62+
code {
63+
font-family: "Noto Sans Mono", serif;
64+
font-weight: 500;
65+
}
66+
pre {
67+
font-family: "Noto Sans Mono", serif;
68+
background-color: #f8f8f8;
69+
margin: 1em;
70+
padding: 1em;
71+
border: 1px solid #e8e8e8;
72+
font-weight: 450;
73+
}
74+
h6:has(+table)
75+
{
76+
margin-left: 1em;
77+
}
78+
table {
79+
border-collapse: collapse;
80+
border: 1px solid #e8e8e8;
81+
margin: 1em;
82+
}
83+
th {
84+
background-color: #f8f8f8;
85+
text-align: left;
86+
padding: 0.25em 0.55em;
87+
font-weight: 550;
88+
}
89+
td {
90+
border: 1px solid #e8e8e8;
91+
padding: 0.25em 0.55em;
92+
}

doc/mp11-docinfo-footer.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<style>
2-
2+
/*
33
*:not(pre)>code { background: none; color: #600000; }
44
:not(pre):not([class^=L])>code { background: none; color: #600000; }
55
table tr.even, table tr.alt, table tr:nth-of-type(even) { background: none; }
6-
6+
*/
77
</style>

0 commit comments

Comments
 (0)