|
|
@ -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", |
|
|
|