now also supporting subtitle and icon on title slide

feature/settings-window
Michael Ochmann 3 years ago
parent fa20e4609c
commit 4aeb2a6a31
  1. 16
      src/Parser.js

@ -36,6 +36,11 @@ const tokenize = string => {
const injectTitle = (deck, meta) => { const injectTitle = (deck, meta) => {
const title = []; const title = [];
if (meta?.icon)
title.push({
type : "image",
href : meta.icon
});
if (meta?.title) if (meta?.title)
title.push({ title.push({
type : "heading", type : "heading",
@ -47,6 +52,17 @@ const injectTitle = (deck, meta) => {
} }
] ]
}); });
if (meta?.subtitle)
title.push({
type : "heading",
level : 2,
tokens : [
{
type : "text",
text : meta.subtitle
}
]
});
if (meta?.author) if (meta?.author)
title.push({ title.push({
type : "paragraph", type : "paragraph",

Loading…
Cancel
Save