##// END OF EJS Templates
Updated reveal CDN and use the new data-fragment-index attribute to get composite fragments (several cells inside the same fragment).
damianavila -
Show More
@@ -53,7 +53,7 b' class ServePostProcessor(PostProcessorBase):'
53 open_in_browser = Bool(True, config=True,
53 open_in_browser = Bool(True, config=True,
54 help="""Should the browser be opened automatically?"""
54 help="""Should the browser be opened automatically?"""
55 )
55 )
56 reveal_cdn = Unicode("https://cdn.jsdelivr.net/reveal.js/2.5.0", config=True,
56 reveal_cdn = Unicode("https://cdn.jsdelivr.net/reveal.js/2.6.2", config=True,
57 help="""URL for reveal.js CDN."""
57 help="""URL for reveal.js CDN."""
58 )
58 )
59 reveal_prefix = Unicode("reveal.js", config=True, help="URL prefix for reveal.js")
59 reveal_prefix = Unicode("reveal.js", config=True, help="URL prefix for reveal.js")
@@ -56,10 +56,13 b' class RevealHelpPreprocessor(Preprocessor):'
56 if cell.metadata.slide_type in ['subslide']:
56 if cell.metadata.slide_type in ['subslide']:
57 worksheet.cells[index - 1].metadata.slide_helper = 'subslide_end'
57 worksheet.cells[index - 1].metadata.slide_helper = 'subslide_end'
58 #Prevent the rendering of "do nothing" cells before fragments
58 #Prevent the rendering of "do nothing" cells before fragments
59 #Group fragments passing frag_number to the data-fragment-index
59 if cell.metadata.slide_type in ['fragment']:
60 if cell.metadata.slide_type in ['fragment']:
61 worksheet.cells[index].metadata.frag_number = index
60 i = 1
62 i = 1
61 while i < len(worksheet.cells) - index:
63 while i < len(worksheet.cells) - index:
62 worksheet.cells[index + i].metadata.frag_helper = 'fragment_end'
64 worksheet.cells[index + i].metadata.frag_helper = 'fragment_end'
65 worksheet.cells[index + i].metadata.frag_number = index
63 i += 1
66 i += 1
64 #Restart the slide_helper when the cell status is changed
67 #Restart the slide_helper when the cell status is changed
65 #to "do nothing".
68 #to "do nothing".
@@ -11,7 +11,7 b''
11 {{ super() }}
11 {{ super() }}
12 {%- elif cell.metadata.slide_type in ['-'] -%}
12 {%- elif cell.metadata.slide_type in ['-'] -%}
13 {%- if cell.metadata.frag_helper in ['fragment_end'] -%}
13 {%- if cell.metadata.frag_helper in ['fragment_end'] -%}
14 <div class="fragment">
14 <div class="fragment" data-fragment-index="{{ cell.metadata.frag_number }}">
15 {{ super() }}
15 {{ super() }}
16 </div>
16 </div>
17 {%- else -%}
17 {%- else -%}
@@ -26,7 +26,7 b''
26 {{ super() }}
26 {{ super() }}
27 </aside>
27 </aside>
28 {%- elif cell.metadata.slide_type in ['fragment'] -%}
28 {%- elif cell.metadata.slide_type in ['fragment'] -%}
29 <div class="fragment">
29 <div class="fragment" data-fragment-index="{{ cell.metadata.frag_number }}">
30 {{ super() }}
30 {{ super() }}
31 </div>
31 </div>
32 {%- endif -%}
32 {%- endif -%}
General Comments 0
You need to be logged in to leave comments. Login now