|
|
@ -85,6 +85,17 @@ const write_page = (doc, template, content) => { |
|
|
|
|
|
|
|
|
|
|
|
doc.list(content.slide_body, main_box.x, main_box.y, main_box); |
|
|
|
doc.list(content.slide_body, main_box.x, main_box.y, main_box); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if(content.type == "title-image") { |
|
|
|
|
|
|
|
// it's a title only slide
|
|
|
|
|
|
|
|
doc.fontSize(80); |
|
|
|
|
|
|
|
// add the title/body text
|
|
|
|
|
|
|
|
doc.font("heading").text(content.slide_title, main_title.x, main_title.y, main_title); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
doc.image(content.slide_body, main_box.x, main_box.y, { |
|
|
|
|
|
|
|
fit: [main_box.width, main_box.height], |
|
|
|
|
|
|
|
align: "center", |
|
|
|
|
|
|
|
valign: "center" |
|
|
|
|
|
|
|
}); |
|
|
|
} else if(content.type == "title-only") { |
|
|
|
} else if(content.type == "title-only") { |
|
|
|
// it's a title only slide
|
|
|
|
// it's a title only slide
|
|
|
|
doc.fontSize(80); |
|
|
|
doc.fontSize(80); |
|
|
@ -132,6 +143,9 @@ const parse_input = (input) => { |
|
|
|
} else if(body.startsWith("*")) { |
|
|
|
} else if(body.startsWith("*")) { |
|
|
|
page.type = "title-bullets"; |
|
|
|
page.type = "title-bullets"; |
|
|
|
page.slide_body = body.split("\n").map(l => l.slice(1).trim()); |
|
|
|
page.slide_body = body.split("\n").map(l => l.slice(1).trim()); |
|
|
|
|
|
|
|
} else if(body.startsWith("[")) { |
|
|
|
|
|
|
|
page.type = "title-image"; |
|
|
|
|
|
|
|
page.slide_body = body.slice(1,-1); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
page.type = "title-text"; |
|
|
|
page.type = "title-text"; |
|
|
|
} |
|
|
|
} |
|
|
|