diff --git a/seance.js b/seance.js index 143a690..cffa969 100644 --- a/seance.js +++ b/seance.js @@ -744,8 +744,8 @@ class Seance { allPosts.push(post) } - // prepare for image downloads - let pics = [] + // prepare for image downloads, starting with the scissors! + let pics = [path.join(__dirname, 'scissors.png')] let picFolder = path.join(options.outputFolder, 'seance-images') if (!fs.existsSync(picFolder)) { fs.mkdirSync(picFolder, { recursive: true }) @@ -835,6 +835,50 @@ class Seance { epub.addSection(post.title, post.body) } + // add the styles + epub.addCSS(` + img { + width: 100%; + height: auto; + } + + h1 { + font-family: "Abhaya Libre Extrabold"; + text-transform: lowercase; + text-align: center; + font-size: 3.6em; + line-height: 1em; + margin-bottom: 0; + } + + h1 + h2 { + font-family: "Open Sans Light"; + font-variant: small-caps; + text-align: center; + font-size: 1.2em; + line-height: 1em; + margin-bottom: 2.4em; + } + + p { + font-family: "Crimson Text Regular"; + font-size: 1em; + line-height: 1.2em; + } + + hr { + display: block; + border: 0px; + height: 1em; + background-image:url('../images/scissors.png'); + background-size: contain; + background-repeat: no-repeat; + background-position: 50%; + margin-top: 1.5em; + margin-bottom: 1.5em; + } + `) + // generate it! await epub.writeEPUB(options.outputFolder, options.title) }