Skip to content

Commit

Permalink
asciidoc customization
Browse files Browse the repository at this point in the history
  • Loading branch information
vinniefalco committed Sep 13, 2024
1 parent 03a2d3a commit 105a26e
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 3 deletions.
10 changes: 9 additions & 1 deletion doc/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@

import asciidoctor ;

html mp11.html : mp11.adoc ;
path-constant boostlook : ../../../tools/boostlook ;

html mp11.html : mp11.adoc
: <asciidoctor-attribute>stylesheet=$(boostlook)/boostlook.css
<flags>"-r $(boostlook)/boostlook.rb"
<dependency>$(boostlook)/boostlook.css
<dependency>$(boostlook)/boostlook.rb
<dependency>mp11-docinfo-footer.html
;

html simple_cxx11_metaprogramming.html :
article/simple_cxx11_metaprogramming.adoc ;
Expand Down
92 changes: 92 additions & 0 deletions doc/boostdoc.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/*! Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
/* Uncomment the following line when using as a custom stylesheet */
@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";
@import "https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wdth,wght@62.5,400..550&display=swap";

/* css reset */
*, *::before, *::after {
box-sizing: border-box;
}
* {
margin: 0;
}
body {
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
}
input, button, textarea, select {
font: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
#root, #__next {
isolation: isolate;
}

/*----*/

:root {
--color-cyan: rgb(0, 90, 156);
}
body {
font-family: "Noto Sans Display", serif;
}
h1, h2, h3, h4, h5, h6 {
display: block;
line-height: 1;
margin-top: 1em;
margin-bottom: 1em;
font-weight: 650;
}
h1 { font-size: 1.75em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.375em; }
h4 { font-size: 1.25em; }
h5 { font-size: 1.125em; }
h6 { font-size: 1em; }
p {
margin: 1em 0em;
}
a {
color: var(--color-cyan);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
code {
font-family: "Noto Sans Mono", serif;
font-weight: 500;
}
pre {
font-family: "Noto Sans Mono", serif;
background-color: #f8f8f8;
margin: 1em;
padding: 1em;
border: 1px solid #e8e8e8;
font-weight: 450;
}
h6:has(+table)
{
margin-left: 1em;
}
table {
border-collapse: collapse;
border: 1px solid #e8e8e8;
margin: 1em;
}
th {
background-color: #f8f8f8;
text-align: left;
padding: 0.25em 0.55em;
font-weight: 550;
}
td {
border: 1px solid #e8e8e8;
padding: 0.25em 0.55em;
}
4 changes: 2 additions & 2 deletions doc/mp11-docinfo-footer.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<style>

/*
*:not(pre)>code { background: none; color: #600000; }
:not(pre):not([class^=L])>code { background: none; color: #600000; }
table tr.even, table tr.alt, table tr:nth-of-type(even) { background: none; }

*/
</style>

0 comments on commit 105a26e

Please sign in to comment.