diff --git a/epub/epub.css b/epub/epub.css new file mode 100644 index 0000000..cb8b0f4 --- /dev/null +++ b/epub/epub.css @@ -0,0 +1,70 @@ +body { + margin: 5%; + width: 700px; + margin: 0 auto; +} + +code { + font: medium Consolas, "Andale Mono", Monaco, "Liberation Mono", "Bitstream Vera Sans Mono", "DejaVu Sans Mono", monospace; + white-space: pre; +} + +blockquote { + font-size: 90%; + margin: 2em 20px; + text-align: left; +} + +blockquote p img { + float: left; + margin-right: 1em; +} + +h1, h2, h3, h4, h5, h6 { + font-weight: bold; + text-align: left; +} + +h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { + color: inherit; + text-decoration: none; +} + +h1 { + font-size: 266.7%; + line-height: 1.1; + margin: 1.49em 0; + text-align: center; +} + +h2 { + font-size: 210%; + line-height: 1.3125; + margin: 1.167em 0; + text-align: center; +} + +figure { + text-align: center; +} + +pre, table { + font-size: 75%; +} + +caption { + font-weight: bold; + margin-bottom: 20px; +} + +pre { + line-height: 1em; +} + +pre code { + font-size: 75%; +} + +nav#TOC > ul, nav#TOC > ul > li > ul { + list-style: decimal; +} diff --git a/epub/template.html b/epub/template.html new file mode 100644 index 0000000..c197536 --- /dev/null +++ b/epub/template.html @@ -0,0 +1,33 @@ + + + + + + + $pagetitle$ +$if(quotes)$ + +$endif$ +$if(highlighting-css)$ + +$endif$ +$for(css)$ + +$endfor$ + + +$if(titlepage)$ +

$title$

+$for(author)$ + by

$author$

+$endfor$ +$else$ +$body$ +$endif$ + + + diff --git a/make.sh b/make.sh index 2545149..5854fdd 100755 --- a/make.sh +++ b/make.sh @@ -23,7 +23,8 @@ FILES='intro.md about.md about_author.md [ -d "out" ] || mkdir out if [[ "$TYPE" == "epub" || "$TYPE" == "" ]]; then - pandoc -S --to epub3 -o out/black-book.epub --toc --epub-chapter-level=2 --epub-cover-image=images/cover.jpg $FILES + pandoc -S --to epub3 -o out/black-book.epub --toc --epub-chapter-level=2 \ + --data-dir=epub --template=epub/template.html $FILES elif [[ "$TYPE" == "html" ]]; then rm -rf out/html mkdir out/html