diff --git a/examples/level-sectnums.adoc b/examples/level-sectnums.adoc new file mode 100644 index 00000000..b5d6b415 --- /dev/null +++ b/examples/level-sectnums.adoc @@ -0,0 +1,24 @@ +// .sections +// Demonstration of section numbers and their specific reveal.js integration. +// :include: //div[@class="slides"] +// :header_footer: += Sectnums +:backend: revealjs +:sectnums: +:sectnumlevels: 2 + +== First level + +First content + +== Vertical + +Vertical slides are using level 2 sections + +=== Level 2 + +==== Level 3 does not have sectnum, sectnumlevels is 2 + +== Horizontal slide + +=== Also supports levels diff --git a/templates/section.html.slim b/templates/section.html.slim index 65792fb4..f21e6316 100644 --- a/templates/section.html.slim +++ b/templates/section.html.slim @@ -56,7 +56,7 @@ data-state=(attr 'state')) - unless hide_title - h2=title + h2=section_title - (blocks - vertical_slides).each do |block| =block.convert - vertical_slides.each do |subsection| @@ -87,5 +87,5 @@ data-state=(attr 'state')) - unless hide_title - h2=title + h2=section_title =content.chomp diff --git a/test/doctest/level-sectnums.html b/test/doctest/level-sectnums.html new file mode 100644 index 00000000..0b959ca1 --- /dev/null +++ b/test/doctest/level-sectnums.html @@ -0,0 +1,32 @@ + +
diff --git a/test/doctest/outline.html b/test/doctest/outline.html index a9b829f3..095fe057 100644 --- a/test/doctest/outline.html +++ b/test/doctest/outline.html @@ -31,27 +31,27 @@