|
@@ -4,7 +4,7 @@ import { readFile, readdir } from 'node:fs/promises'; |
|
|
import { JSDOM } from 'jsdom'; |
|
|
import { JSDOM } from 'jsdom'; |
|
|
import type {APIRoute, GetStaticPaths} from 'astro'; |
|
|
import type {APIRoute, GetStaticPaths} from 'astro'; |
|
|
// @ts-ignore |
|
|
// @ts-ignore |
|
|
import tailwindConfig from '../../../tailwind.config.mjs'; |
|
|
|
|
|
|
|
|
import tailwindConfigRaw from '../../../tailwind.config.mjs'; |
|
|
|
|
|
|
|
|
const filter = (musicXml: string) => { |
|
|
const filter = (musicXml: string) => { |
|
|
const jsdom = new JSDOM(musicXml, { pretendToBeVisual: true, contentType: 'image/svg+xml' }); |
|
|
const jsdom = new JSDOM(musicXml, { pretendToBeVisual: true, contentType: 'image/svg+xml' }); |
|
@@ -41,6 +41,7 @@ const processOutput = (xmlData: string) => { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (h.tagName.toLowerCase() === 'style') { |
|
|
if (h.tagName.toLowerCase() === 'style') { |
|
|
|
|
|
const tailwindConfig = tailwindConfigRaw as any; |
|
|
h.innerHTML = h.innerHTML.replace(/Times,serif/g, tailwindConfig.theme.fontFamily.body.join(',')); |
|
|
h.innerHTML = h.innerHTML.replace(/Times,serif/g, tailwindConfig.theme.fontFamily.body.join(',')); |
|
|
} |
|
|
} |
|
|
if (svgElemsMain.children[0]) { |
|
|
if (svgElemsMain.children[0]) { |
|
|