Path: blob/main/src/format/reveal/format-reveal-title.ts
6452 views
import { Format } from "../../config/types.ts";1import { formatResourcePath } from "../../core/resources.ts";23import { join } from "../../deno_ral/path.ts";4import { sassLayer } from "../../core/sass.ts";56const kStylePandoc = "pandoc";78export function titleSlidePartial(format: Format) {9// Swap in the correct title slide implementation10if (isLegacyTitleStyle(format)) {11return "title-slide.html";12} else {13return "title-fancy/title-slide.html";14}15}1617export function titleSlideScss(format: Format) {18// Swap in the correct title slide implementation19if (isLegacyTitleStyle(format)) {20return undefined;21} else {22const titleBlockScss = formatResourcePath(23"revealjs",24join("pandoc", "title-fancy/title-slide.scss"),25);26return sassLayer(titleBlockScss);27}28}2930function isLegacyTitleStyle(format: Format) {31return format.metadata["title-slide-style"] === kStylePandoc;32}333435