inline scripts

This commit is contained in:
Jacky Zhao
2023-06-03 15:07:19 -04:00
parent fcd81353f8
commit 4bdc17d4a1
19 changed files with 187 additions and 69 deletions

View File

@ -26,9 +26,8 @@ export function googleFontHref(theme: Theme) {
return `https://fonts.googleapis.com/css2?family=${code}&family=${header}:wght@400;700&family=${body}:ital,wght@0,400;0,600;1,400;1,600&display=swap`
}
export function templateThemeStyles(theme: Theme, stylesheet: string) {
return `
:root {
export function joinStyles(theme: Theme, ...stylesheet: string[]) {
return `:root {
--light: ${theme.colors.lightMode.light};
--lightgray: ${theme.colors.lightMode.lightgray};
--gray: ${theme.colors.lightMode.gray};
@ -54,6 +53,5 @@ export function templateThemeStyles(theme: Theme, stylesheet: string) {
--highlight: ${theme.colors.darkMode.highlight};
}
${stylesheet}
`
${stylesheet.join("\n\n")}`
}