##// END OF EJS Templates
Merge pull request #5957 from damianavila/fragments...
Min RK -
r17105:e181fce2 merge
parent child Browse files
Show More
@@ -53,7 +53,7 b' class ServePostProcessor(PostProcessorBase):'
53 53 open_in_browser = Bool(True, config=True,
54 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 57 help="""URL for reveal.js CDN."""
58 58 )
59 59 reveal_prefix = Unicode("reveal.js", config=True, help="URL prefix for reveal.js")
@@ -55,7 +55,19 b' class RevealHelpPreprocessor(Preprocessor):'
55 55 worksheet.cells[index - 1].metadata.slide_helper = 'slide_end'
56 56 if cell.metadata.slide_type in ['subslide']:
57 57 worksheet.cells[index - 1].metadata.slide_helper = 'subslide_end'
58
58 #Prevent the rendering of "do nothing" cells before fragments
59 #Group fragments passing frag_number to the data-fragment-index
60 if cell.metadata.slide_type in ['fragment']:
61 worksheet.cells[index].metadata.frag_number = index
62 i = 1
63 while i < len(worksheet.cells) - index:
64 worksheet.cells[index + i].metadata.frag_helper = 'fragment_end'
65 worksheet.cells[index + i].metadata.frag_number = index
66 i += 1
67 #Restart the slide_helper when the cell status is changed
68 #to other types.
69 if cell.metadata.slide_type in ['-', 'skip', 'notes', 'fragment']:
70 worksheet.cells[index - 1].metadata.slide_helper = '-'
59 71
60 72 if not isinstance(resources['reveal'], dict):
61 73 resources['reveal'] = {}
@@ -82,7 +82,8 b' class Testrevealhelp(PreprocessorTestsBase):'
82 82
83 83 # Make sure slide end is only applied to the cells preceeding slide
84 84 # cells.
85 assert 'slide_helper' not in cells[1].metadata
85 assert 'slide_helper' in cells[1].metadata
86 self.assertEqual(cells[1].metadata['slide_helper'], '-')
86 87
87 88 # Verify 'slide-end'
88 89 assert 'slide_helper' in cells[0].metadata
@@ -10,7 +10,13 b''
10 10 <section>
11 11 {{ super() }}
12 12 {%- elif cell.metadata.slide_type in ['-'] -%}
13 {%- if cell.metadata.frag_helper in ['fragment_end'] -%}
14 <div class="fragment" data-fragment-index="{{ cell.metadata.frag_number }}">
13 15 {{ super() }}
16 </div>
17 {%- else -%}
18 {{ super() }}
19 {%- endif -%}
14 20 {%- elif cell.metadata.slide_type in ['skip'] -%}
15 21 <div style=display:none>
16 22 {{ super() }}
@@ -20,7 +26,7 b''
20 26 {{ super() }}
21 27 </aside>
22 28 {%- elif cell.metadata.slide_type in ['fragment'] -%}
23 <div class="fragment">
29 <div class="fragment" data-fragment-index="{{ cell.metadata.frag_number }}">
24 30 {{ super() }}
25 31 </div>
26 32 {%- endif -%}
General Comments 0
You need to be logged in to leave comments. Login now