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
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: brand-mode and logos
format:
revealjs: default
typst:
keep-typ: true
brand:
logo:
images:
sun:
path: sun-face.png
alt: "Sun face image"
moon:
path: moon-face.png
alt: "Moon face image"
medium:
light: sun
dark: moon
color:
foreground:
light: '#222'
dark: '#eee'
background:
light: '#eee'
dark: '#222'
typography:
headings:
color:
light: '#429'
dark: '#54e'
_quarto:
tests:
revealjs:
ensureHtmlElements:
-
- 'img[src="sun-face.png"][alt="Sun face image"]'
-
- 'img[src="moon-face.png"][alt="Moon face image"]'
typst:
ensureTypstFileRegexMatches:
-
- 'background: align\(left\+top, box\(inset: 0.75in, image\("sun-face\.png", width: 1\.5in, alt: "Sun face image"\)\)'
-
- 'background.*moon-face\.png'
---

## Here we go

- Testing image definition with path and alt text
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: brand-mode and logos
format:
revealjs: default
typst:
keep-typ: true
brand:
logo:
images:
sun: sun-face.png
moon: moon-face.png
medium:
light: sun
dark: moon
color:
foreground:
light: '#222'
dark: '#eee'
background:
light: '#eee'
dark: '#222'
typography:
headings:
color:
light: '#429'
dark: '#54e'
_quarto:
tests:
revealjs:
ensureHtmlElements:
-
- 'img[src="sun-face.png"]'
-
- 'img[src="moon-face.png"]'
typst:
ensureTypstFileRegexMatches:
-
- 'background: align\(left\+top, box\(inset: 0.75in, image\("sun-face\.png", width: 1\.5in\)\)'
-
- 'background.*moon-face\.png'
---

## Here we go

- Testing image definition with just path
42 changes: 42 additions & 0 deletions tests/docs/smoke-all/brand/brand-mode/brand-logo-large.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: brand-mode and logos
format:
revealjs: default
typst:
keep-typ: true
brand:
logo:
large:
light: sun-face.png
dark: moon-face.png
color:
foreground:
light: '#222'
dark: '#eee'
background:
light: '#eee'
dark: '#222'
typography:
headings:
color:
light: '#429'
dark: '#54e'
_quarto:
tests:
revealjs:
ensureHtmlElements:
-
- 'img[src="sun-face.png"]'
-
- 'img[src="moon-face.png"]'
typst:
ensureTypstFileRegexMatches:
-
- 'background: align\(left\+top, box\(inset: 0.75in, image\("sun-face\.png", width: 1\.5in\)\)'
-
- 'background.*moon-face\.png'
---

## Here we go

- Testing large logo fallback when no medium logo is defined
38 changes: 38 additions & 0 deletions tests/docs/smoke-all/brand/brand-mode/brand-logo-missing-mode.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: brand-mode and logos
format:
revealjs: default
typst:
keep-typ: true
brand:
logo:
medium:
light: sun-face.png
# dark mode missing
color:
foreground:
light: '#222'
dark: '#eee'
background:
light: '#eee'
dark: '#222'
typography:
headings:
color:
light: '#429'
dark: '#54e'
_quarto:
tests:
revealjs:
ensureHtmlElements:
-
- 'img[src="sun-face.png"]'
typst:
ensureTypstFileRegexMatches:
-
- 'background: align\(left\+top, box\(inset: 0.75in, image\("sun-face\.png", width: 1\.5in\)\)'
---

## Here we go

- Testing missing dark mode logo
45 changes: 45 additions & 0 deletions tests/docs/smoke-all/brand/brand-mode/brand-logo-mixed-paths.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: brand-mode and logos
format:
revealjs: default
typst:
keep-typ: true
brand:
logo:
images:
sun: sun-face.png
moon: moon-face.png
medium:
light: sun # Named reference
dark: moon-face.png # Direct path
color:
foreground:
light: '#222'
dark: '#eee'
background:
light: '#eee'
dark: '#222'
typography:
headings:
color:
light: '#429'
dark: '#54e'
_quarto:
tests:
revealjs:
ensureHtmlElements:
-
- 'img[src="sun-face.png"]'
-
- 'img[src="moon-face.png"]'
typst:
ensureTypstFileRegexMatches:
-
- 'background: align\(left\+top, box\(inset: 0.75in, image\("sun-face\.png", width: 1\.5in\)\)'
-
- 'background.*moon-face\.png'
---

## Here we go

- Testing mixed path types - named reference and direct path
8 changes: 8 additions & 0 deletions tests/docs/smoke-all/brand/logo/choose-logo-resource.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title: brand and base logo
format:
dashboard: default
revealjs: default
typst:
output-ext: typ
brand:
logo:
images:
Expand All @@ -26,6 +29,11 @@ _quarto:
-
- 'img[src="posit-logo-2024.svg"][class="slide-logo"]'
- []
typst:
ensureTypstFileRegexMatches:
-
- 'background: align\(left\+top, box\(inset: 0.75in, image\("posit-logo-2024.svg", width: 1\.5in, alt: "posit logo"\)\)'
- []
---

{{< lipsum 4 >}}
13 changes: 13 additions & 0 deletions tests/docs/smoke-all/brand/logo/dark-logo.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title: brand with dark and light logos
format:
dashboard: default
revealjs: default
typst:
keep-typ: true
brand:
logo:
images:
Expand Down Expand Up @@ -31,6 +34,16 @@ _quarto:
- 'img[src="quarto.png"][alt="quarto logo"][class="navbar-logo light-content d-inline-block"]'
- 'img[src="quarto-dark.png"][alt="quarto dark logo"][class="navbar-logo dark-content d-inline-block"]'
- []
revealjs:
ensureHtmlElements:
-
- 'img[src="quarto.png"][alt="quarto logo"]'
- []
typst:
ensureTypstFileRegexMatches:
-
- 'background: align\(left\+top, box\(inset: 0.75in, image\("quarto.png", width: 1\.5in, alt: "quarto logo"\)\)'
- []
---

{{< lipsum 4 >}}
13 changes: 13 additions & 0 deletions tests/docs/smoke-all/brand/logo/dark-mode-no-dark-logo.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ format:
theme:
light: default
dark: darkly # Explicitly enable dark mode
revealjs: default
typst:
keep-typ: true
brand:
color:
foreground:
Expand All @@ -31,6 +34,16 @@ _quarto:
# For dark mode, should it use the light logo since no dark logo exists?
- 'img[src="quarto.png"][alt="light logo"][class="navbar-logo dark-content d-inline-block"]'
- []
revealjs:
ensureHtmlElements:
-
- 'img[src="quarto.png"][alt="light logo"]'
- []
typst:
ensureTypstFileRegexMatches:
-
- 'background: align\(left\+top, box\(inset: 0.75in, image\("quarto.png", width: 1\.5in, alt: "light logo"\)\)'
- []
---

{{< lipsum 4 >}}
19 changes: 15 additions & 4 deletions tests/docs/smoke-all/brand/logo/dark-mode-no-light-logo.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ format:
dashboard:
theme:
light: default
dark: darkly # Explicitly enable dark mode
dark: darkly
revealjs: default
typst:
keep-typ: true
brand-mode: dark
brand:
color:
foreground:
Expand All @@ -20,17 +24,24 @@ brand:
alt: dark logo
medium:
dark: dark-logo
# No light variant defined - what happens?
_quarto:
tests:
dashboard:
ensureHtmlElements:
-
# Dark mode should use the dark logo
- 'img[src="posit-logo-2024.svg"][alt="dark logo"][class="navbar-logo dark-content d-inline-block"]'
# For light mode, should it use the dark logo since no light logo exists?
- 'img[src="posit-logo-2024.svg"][alt="dark logo"][class="navbar-logo light-content d-inline-block"]'
- []
revealjs:
ensureHtmlElements:
-
- 'img[src="posit-logo-2024.svg"][alt="dark logo"]'
- []
typst:
ensureTypstFileRegexMatches:
-
- 'background: align\(left\+top, box\(inset: 0.75in, image\("posit-logo-2024.svg", width: 1\.5in, alt: "dark logo"\)\)'
- []
---

{{< lipsum 4 >}}
15 changes: 15 additions & 0 deletions tests/docs/smoke-all/brand/logo/dark-mode-search-priority.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Size Inheritance
format:
dashboard: default
revealjs: default
typst:
output-ext: typ
brand-mode: dark
brand:
logo:
images:
Expand Down Expand Up @@ -33,6 +37,17 @@ _quarto:
- 'img[src="small-logo.png"][alt="small logo"][class="navbar-logo light-content d-inline-block"]'
- 'img[src="dark-logo.png"][alt="dark logo"][class="navbar-logo dark-content d-inline-block"]'
- []
revealjs:
ensureHtmlElements:
-
# In dark mode with revealjs, should use large.dark
- 'img[src="dark-logo.png"][alt="dark logo"]'
- []
typst:
ensureTypstFileRegexMatches:
-
- 'background: align\(left\+top, box\(inset: 0.75in, image\("dark-logo.png", width: 1\.5in, alt: "dark logo"\)\)'
- []
---

{{< lipsum 4 >}}
Loading
Loading