add chapter titles

This commit is contained in:
daniel-j 2016-08-10 19:33:39 +02:00
parent 371c22f3b4
commit 0b438c2032
2 changed files with 20 additions and 1 deletions

View file

@ -26,6 +26,17 @@ h1, h2, h3, h4, h5, h6 {
text-align: left;
}
.chapter-title {
margin-top: 1.5em;
margin-bottom: 1.5em;
h1 {
font-size: 1.25em;
font-weight: normal;
margin: 0;
}
}
img {
height: auto;
width: auto;
@ -111,6 +122,8 @@ figure.youtube {
#toc {
ol {
list-style-type: none;
padding: 0;
margin: 0;
}
[hidden] {

View file

@ -41,7 +41,13 @@ export function createChapter (ch, html, callback) {
chapter = chapter.substring(0, pos)
let sections = [
m('div#chapter_container', m.trust(chapter)),
[
m('.chapter-title', [
m('h1', ch.title),
m('hr')
]),
m.trust(chapter)
],
authorNotes ? m('div#author_notes', {className: authorNotesPos < chapterPos ? 'top' : 'bottom'}, m.trust(authorNotes)) : null
]