feat(slides): add persistent branding with per-slide visibility control

- Add branding overlays: logo, title, author, and footer text
- Use Reveal.js theme CSS variables for automatic color adaptation
- Inline SVGs for currentColor support on any theme
- Per-slide control via HTML comments:
  - <!-- no-branding -->: hide all elements
  - <!-- no-header -->: hide logo + title
  - <!-- no-footer -->: hide author + footer
- Fix body-level CSS selectors for proper visibility
- Add comprehensive documentation in example slides
This commit is contained in:
George Cushen committed 2026-01-13 15:36:32 +00:00
1 parent 1352d89867
commit aa9edea5df
16 files changed
+902 -17

No files matched your search

+31 -1
View File
@@ -26,7 +26,20 @@
{{/* Each `<section>` defines a new slide. */}}
{{/* Only begin new slide `<section>` if not already added by custom `slide` shortcode. */}}
{{ if not (in . "data-noprocess") }}
<section{{ if $isHidden }} data-visibility="hidden"{{ end }}>
{{/* Parse visibility comments */}}
{{ $state := slice }}
{{ if in . "<!-- no-branding -->" }}
{{ $state = $state | append "no-branding" }}
{{ end }}
{{ if in . "<!-- no-header -->" }}
{{ $state = $state | append "no-header" }}
{{ end }}
{{ if in . "<!-- no-footer -->" }}
{{ $state = $state | append "no-footer" }}
{{ end }}
<section{{ if $isHidden }} data-visibility="hidden"{{ end }} {{ if gt (len $state) 0 }}data-state="{{ delimit $state " " }}"{{ end }}>
{{ end }}
{{ $slideContent | safeHTML }}
</section>
@@ -35,4 +48,21 @@
{{ end }}
{{ end }}
</div>
{{/* Branding elements - placed inside .reveal but outside .slides to be persistent and fixed */}}
{{/* Branding overlay (logo, title, author) */}}
{{ $pageContext := index . 0 }}
{{ partial "components/slide-branding" $pageContext }}
{{/* Hook: slide-header */}}
<div class="slide-header">
{{ partial "functions/slides_get_hook" (dict "hook" "slide-header" "context" $pageContext) }}
</div>
{{/* Hook: slide-footer */}}
<div class="slide-footer">
{{ partial "functions/slides_get_hook" (dict "hook" "slide-footer" "context" $pageContext) }}
</div>
</div>