Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/resources/filters/quarto-post/typst-brand-yaml.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ function render_typst_brand_yaml()
end
local decl = '#let brand-color = ' .. to_typst_dict_indent(colors)
quarto.doc.include_text('in-header', decl)
local BACKGROUND_OPACITY = 0.1
local themebk = {}
for name, _ in pairs(brandColor) do
themebk[name] = _quarto.modules.brand.get_background_color(name, BACKGROUND_OPACITY)
end
if brandColor.background then
quarto.doc.include_text('in-header', '#set page(fill: brand-color.background)')
end
Expand All @@ -79,7 +74,11 @@ function render_typst_brand_yaml()
quarto.doc.include_text('in-header', '#set line(stroke: (paint: brand-color.foreground))')

end
local decl = '// theme colors at opacity ' .. BACKGROUND_OPACITY .. '\n#let brand-color-background = ' .. to_typst_dict_indent(themebk)
local themebk = {}
for name, _ in pairs(brandColor) do
themebk[name] = 'brand-color.' .. name .. '.lighten(85%)'
end
local decl = '#let brand-color-background = ' .. to_typst_dict_indent(themebk)
quarto.doc.include_text('in-header', decl)
end
local function quote_string(value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ _quarto:
-
- 'burgundy: rgb\("#9a4665"\),'
- 'primary: rgb\("#447099"\),'
- 'primary: rgb\("#44709919"\),' # background
- 'primary: brand-color\.primary\.lighten\(85%\),'
- 'title: (\r\n?|\n)\[(\r\n?|\n)Note(\r\n?|\n)\](\r\n?|\n), (\r\n?|\n)background_color: (\r\n?|\n)brand-color-background.primary'
- 'title: (\r\n?|\n)\[(\r\n?|\n)Warning(\r\n?|\n)\](\r\n?|\n), (\r\n?|\n)background_color: (\r\n?|\n)brand-color-background.warning'
-
Expand Down
Loading