diff --git a/share/templates/reveal/base.html.j2 b/share/templates/reveal/base.html.j2 index 95d40011c..be07920d4 100644 --- a/share/templates/reveal/base.html.j2 +++ b/share/templates/reveal/base.html.j2 @@ -1,14 +1,15 @@ {%- extends 'lab/base.html.j2' -%} +{% from 'cellslidedata.j2' import cellslidedata %} {%- block any_cell scoped -%} {%- if cell.metadata.get('slide_start', False) -%} -
+
{%- endif -%} {%- if cell.metadata.get('subslide_start', False) -%} -
+
{%- endif -%} {%- if cell.metadata.get('fragment_start', False) -%} -
+
{%- endif -%} {%- if cell.metadata.slide_type == 'notes' -%} diff --git a/share/templates/reveal/cellslidedata.j2 b/share/templates/reveal/cellslidedata.j2 new file mode 100644 index 000000000..d759f1e92 --- /dev/null +++ b/share/templates/reveal/cellslidedata.j2 @@ -0,0 +1,9 @@ +{%- macro cellslidedata(cell) -%} + {% if cell.metadata.slideshow | length > 0 -%} + {% if cell.metadata.slideshow.data | length > 0 -%} + {% for key in (cell.metadata.slideshow.data) -%} + {{- (' data_' ~ key)|replace("_", "-") -}}="{{- cell.metadata.slideshow.data[key]|escape_html -}}" + {%- endfor -%} + {%- endif %} + {%- endif %} +{%- endmacro %}