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
1 change: 1 addition & 0 deletions news/changelog-1.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ All changes included in 1.7:
- ([#11896](https://github.com/quarto-dev/quarto-cli/pull/11896)): fix `\f` (`{{< pagebreak >}}`) form feed character not valid in PowerPoint (`pptx`).
- ([#11664](https://github.com/quarto-dev/quarto-cli/issues/11664)): `lipsum` shortcode is no longer randomly generated by default, use `{{< lipsum random=true >}}` to restore randomness.
- ([#11379](https://github.com/quarto-dev/quarto-cli/issues/11379)): Add `version` shortcode to display the current Quarto version.
- ([#12365](https://github.com/quarto-dev/quarto-cli/pull/12365)): `brand color` shortcode takes an optional `brandMode` second parameter, default `light`.
- ([#12326](https://github.com/quarto-dev/quarto-cli/issues/12326)): Add `quarto.shortcode.*` API entry points for shortcode developers.

## Quarto Lua API
Expand Down
38 changes: 38 additions & 0 deletions tests/docs/shortcodes/brand-light-dark.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: Test brand light/dark shortcodes
format: html
brand:
light:
color:
palette:
blue: "#82aeef"
background: '#fff8ee'
foreground: '#116423'
dark:
color:
palette:
blue: "#415777"
background: '#071217'
foreground: '#ffeecc'
_quarto:
tests:
html:
ensureHtmlElements:
-
- 'div#default-brand[style="background-color: #82aeef"]'
- 'div#light-brand[style="background-color: #82aeef"]'
- 'div#dark-brand[style="background-color: #415777"]'
- []
---

::: {#default-brand style='background-color: {{< brand color blue >}}'}
Default brand blue background.
:::

::: {#light-brand style='background-color: {{< brand color blue light >}}'}
Light brand blue background.
:::

::: {#dark-brand style='background-color: {{< brand color blue dark >}}'}
Dark brand blue background.
:::
Loading