Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/src/format/reveal/format-reveal-title.ts
6452 views
1
import { Format } from "../../config/types.ts";
2
import { formatResourcePath } from "../../core/resources.ts";
3
4
import { join } from "../../deno_ral/path.ts";
5
import { sassLayer } from "../../core/sass.ts";
6
7
const kStylePandoc = "pandoc";
8
9
export function titleSlidePartial(format: Format) {
10
// Swap in the correct title slide implementation
11
if (isLegacyTitleStyle(format)) {
12
return "title-slide.html";
13
} else {
14
return "title-fancy/title-slide.html";
15
}
16
}
17
18
export function titleSlideScss(format: Format) {
19
// Swap in the correct title slide implementation
20
if (isLegacyTitleStyle(format)) {
21
return undefined;
22
} else {
23
const titleBlockScss = formatResourcePath(
24
"revealjs",
25
join("pandoc", "title-fancy/title-slide.scss"),
26
);
27
return sassLayer(titleBlockScss);
28
}
29
}
30
31
function isLegacyTitleStyle(format: Format) {
32
return format.metadata["title-slide-style"] === kStylePandoc;
33
}
34
35