@@ -11,10 +11,21 @@ Feature: Slides with markdown
1111 Further- you can also used the triple-fence block to quickly create
1212 speaker notes. See the example below.
1313
14+ If you like to put tables in your slides, you can use the tables
15+ from [Github Flavored Markdown][github-flavored-markdown].
16+
17+ Finally-- unlike many other slide frameworks, reveal.js supports
18+ vertical slides. You can start a series of vertical slides with
19+ `***`. If you want to stop "going vertical" you can use another
20+ `***`. Once you you realize that vertical is an option, you can
21+ choose to do columns back-to-back, columns separated by horizontal
22+ slides, etc. Check out several examples below.
23+
1424 If you'd like to see the intermediate file where your `slides.md` is
1525 transformed into `.html` you can visit `slides/slides.html`
1626
1727 [redcarpet]: https://github.com/vmg/redcarpet
28+ [github-flavored-markdown]: https://help.github.com/articles/github-flavored-markdown/
1829
1930 Scenario : Generating basic slides with slides.md
2031 Given a file named "slides.md" with:
@@ -64,10 +75,6 @@ Feature: Slides with markdown
6475 """
6576 When I run `reveal-ck generate`
6677 Then the exit status should be 0
67- And the file "slides/slides.html" should have html matching the xpath:
68- | //section /aside [@class ="notes "] | a speaker note |
69- | //section /aside [contains (., "This will be a speaker note ")] | the first note |
70- | //section /aside [contains (., "Another note ")] | the second note |
7178 And the file "slides/index.html" should have html matching the xpath:
7279 | //section /aside [@class ="notes "] | a speaker note |
7380 | //section /aside [contains (., "This will be a speaker note ")] | the first note |
@@ -86,11 +93,273 @@ Feature: Slides with markdown
8693 """
8794 When I run `reveal-ck generate`
8895 Then the exit status should be 0
89- And the file "slides/slides.html" should have html matching the xpath:
90- | //section [1 ]/h1 [text ()="Your headline "] | the first slide 's h1 |
91- | //section [2 ]/h2 [text ()="Next Slide "] | the second slide 's h2 |
92- | //section [3 ]/h3 [text ()="Final Slide "] | the third slide 's h3 |
9396 And the file "slides/index.html" should have html matching the xpath:
9497 | //section [1 ]/h1 [text ()="Your headline "] | the first slide 's h1 |
9598 | //section [2 ]/h2 [text ()="Next Slide "] | the second slide 's h2 |
9699 | //section [3 ]/h3 [text ()="Final Slide "] | the third slide 's h3 |
100+
101+ Scenario : Using "Github Flavored Markdown" Tables
102+ Given a file named "slides.md" with:
103+ """
104+ # Welcome
105+ ---
106+ ## Superb Tables
107+ Item | Value | Quantity
108+ ------------- | ------------- | ---------
109+ Apples | $1 | 18
110+ Lemonade | $2 | 20
111+ Bread | $3.50 | 2
112+ ---
113+ # Thank You
114+ """
115+ When I run `reveal-ck generate`
116+ Then the exit status should be 0
117+ And the file "slides/index.html" should have html matching the xpath:
118+ | //section [1 ]/h1 [text ()="Welcome "] | the first slide 's h1 |
119+ | //section [2 ]/table | the table exists |
120+ | //section [2 ]/table /thead /tr /th [1 ][text ()="Item "] | Column 1 Header |
121+ | //section [2 ]/table /thead /tr /th [2 ][text ()="Value "] | Column 2 Header |
122+ | //section [2 ]/table /thead /tr /th [3 ][text ()="Quantity "] | Column 3 Header |
123+ | //section [2 ]/table /tbody /tr [1 ]/td [1 ][text ()="Apples "] | Column 1 , Row 1 |
124+ | //section [2 ]/table /tbody /tr [1 ]/td [2 ][text ()="$1 "] | Column 1 , Row 2 |
125+ | //section [2 ]/table /tbody /tr [1 ]/td [3 ][text ()="18 "] | Column 1 , Row 3 |
126+ | //section [2 ]/table /tbody /tr [3 ]/td [1 ][text ()="Bread "] | Column 3 , Row 1 |
127+ | //section [2 ]/table /tbody /tr [3 ]/td [2 ][text ()="$3 .50 "] | Column 3 , Row 2 |
128+ | //section [2 ]/table /tbody /tr [3 ]/td [3 ][text ()="2 "] | Column 3 , Row 3 |
129+ | //section [3 ]/h1 [text ()="Thank You "] | the third slide 's h1 |
130+
131+ Scenario : Using "Github Flavored Markdown" Tables with "Pipes"
132+ Given a file named "slides.md" with:
133+ """
134+ # Welcome
135+ ---
136+ ## Superb Tables
137+ | Item | Value | Quantity |
138+ | ------------- | ------------- | --------- |
139+ | Apples | $1 | 18 |
140+ | Lemonade | $2 | 20 |
141+ | Bread | $3.50 | 2 |
142+ ---
143+ # Thank You
144+ """
145+ When I run `reveal-ck generate`
146+ Then the exit status should be 0
147+ And the file "slides/index.html" should have html matching the xpath:
148+ | //section [1 ]/h1 [text ()="Welcome "] | the first slide 's h1 |
149+ | //section [2 ]/table | the table exists |
150+ | //section [2 ]/table /thead /tr /th [1 ][text ()="Item "] | Column 1 Header |
151+ | //section [2 ]/table /thead /tr /th [2 ][text ()="Value "] | Column 2 Header |
152+ | //section [2 ]/table /thead /tr /th [3 ][text ()="Quantity "] | Column 3 Header |
153+ | //section [2 ]/table /tbody /tr [1 ]/td [1 ][text ()="Apples "] | Column 1 , Row 1 |
154+ | //section [2 ]/table /tbody /tr [1 ]/td [2 ][text ()="$1 "] | Column 1 , Row 2 |
155+ | //section [2 ]/table /tbody /tr [1 ]/td [3 ][text ()="18 "] | Column 1 , Row 3 |
156+ | //section [2 ]/table /tbody /tr [3 ]/td [1 ][text ()="Bread "] | Column 3 , Row 1 |
157+ | //section [2 ]/table /tbody /tr [3 ]/td [2 ][text ()="$3 .50 "] | Column 3 , Row 2 |
158+ | //section [2 ]/table /tbody /tr [3 ]/td [3 ][text ()="2 "] | Column 3 , Row 3 |
159+ | //section [3 ]/h1 [text ()="Thank You "] | the third slide 's h1 |
160+
161+ Scenario : Using "Github Flavored Markdown" Tables with "Unaligned Whitespace"
162+ Given a file named "slides.md" with:
163+ """
164+ # Welcome
165+ ---
166+ ## Superb Tables
167+ | Item | Value | Quantity |
168+ | -------- | ------------- | --------- |
169+ | Apples | $1 | 18 |
170+ | Lemonade | $2 | 20 |
171+ | Bread | $3.50 | 2 |
172+ ---
173+ # Thank You
174+ """
175+ When I run `reveal-ck generate`
176+ Then the exit status should be 0
177+ And the file "slides/index.html" should have html matching the xpath:
178+ | //section [1 ]/h1 [text ()="Welcome "] | the first slide 's h1 |
179+ | //section [2 ]/table | the table exists |
180+ | //section [2 ]/table /thead /tr /th [1 ][text ()="Item "] | Column 1 Header |
181+ | //section [2 ]/table /thead /tr /th [2 ][text ()="Value "] | Column 2 Header |
182+ | //section [2 ]/table /thead /tr /th [3 ][text ()="Quantity "] | Column 3 Header |
183+ | //section [2 ]/table /tbody /tr [1 ]/td [1 ][text ()="Apples "] | Column 1 , Row 1 |
184+ | //section [2 ]/table /tbody /tr [1 ]/td [2 ][text ()="$1 "] | Column 1 , Row 2 |
185+ | //section [2 ]/table /tbody /tr [1 ]/td [3 ][text ()="18 "] | Column 1 , Row 3 |
186+ | //section [2 ]/table /tbody /tr [3 ]/td [1 ][text ()="Bread "] | Column 3 , Row 1 |
187+ | //section [2 ]/table /tbody /tr [3 ]/td [2 ][text ()="$3 .50 "] | Column 3 , Row 2 |
188+ | //section [2 ]/table /tbody /tr [3 ]/td [3 ][text ()="2 "] | Column 3 , Row 3 |
189+ | //section [3 ]/h1 [text ()="Thank You "] | the third slide 's h1 |
190+
191+ Scenario : Using "Github Flavored Markdown" Tables with "Embedded Markdown"
192+ Given a file named "slides.md" with:
193+ """
194+ # Welcome
195+ ---
196+ ## Superb Tables
197+ Item | Value | Quantity
198+ ------------- | ------------- | ---------
199+ ~~Apples~~ | $1 | ==18==
200+ Lemonade | $2 | 20
201+ _Bread_ | **$3.50** | 2
202+ ---
203+ # Thank You
204+ """
205+ When I run `reveal-ck generate`
206+ Then the exit status should be 0
207+ And the file "slides/index.html" should have html matching the xpath:
208+ | //section [1 ]/h1 [text ()="Welcome "] | the first slide 's h1 |
209+ | //section [2 ]/table | the table exists |
210+ | //section [2 ]/table /thead /tr /th [1 ][text ()="Item "] | Column 1 Header |
211+ | //section [2 ]/table /thead /tr /th [2 ][text ()="Value "] | Column 2 Header |
212+ | //section [2 ]/table /thead /tr /th [3 ][text ()="Quantity "] | Column 3 Header |
213+ | //section [2 ]/table /tbody /tr [1 ]/td [1 ]/del [text ()="Apples "] | Column 1 , Row 1 , Struckthrough |
214+ | //section [2 ]/table /tbody /tr [1 ]/td [2 ][text ()="$1 "] | Column 1 , Row 2 |
215+ | //section [2 ]/table /tbody /tr [1 ]/td [3 ]/mark [text ()="18 "] | Column 1 , Row 3 , Marked |
216+ | //section [2 ]/table /tbody /tr [3 ]/td [1 ]/em [text ()="Bread "] | Column 3 , Row 1 , Emphasized |
217+ | //section [2 ]/table /tbody /tr [3 ]/td [2 ]/strong [text ()="$3 .50 "] | Column 3 , Row 2 , Strong |
218+ | //section [2 ]/table /tbody /tr [3 ]/td [3 ][text ()="2 "] | Column 3 , Row 3 |
219+
220+ Scenario : Using "Github Flavored Markdown" Tables with "Aligned Columns"
221+ Given a file named "slides.md" with:
222+ """
223+ # Welcome
224+ ---
225+ ## Superb Tables
226+ Item | Value | Quantity
227+ :------------- | :-------------: | ---------:
228+ Apples | $1 | 18
229+ Lemonade | $2 | 20
230+ Bread | $3.50 | 2
231+ ---
232+ # Thank You
233+ """
234+ When I run `reveal-ck generate`
235+ Then the exit status should be 0
236+ And the file "slides/index.html" should have html matching the xpath:
237+ | //section [2 ]/table /thead /tr /th [1 ][@style ="text -align : left "] | Left Aligned Column 1 Header |
238+ | //section [2 ]/table /thead /tr /th [2 ][@style ="text -align : center "] | Center Aligned Column 2 Header |
239+ | //section [2 ]/table /thead /tr /th [3 ][@style ="text -align : right "] | Right Aligned Column 3 Header |
240+ | //section [2 ]/table /tbody /tr [1 ]/td [1 ][@style ="text -align : left "] | Left Aligned Column 1 , Row 1 |
241+ | //section [2 ]/table /tbody /tr [1 ]/td [2 ][@style ="text -align : center "] | Center Aligned Column 1 , Row 2 |
242+ | //section [2 ]/table /tbody /tr [1 ]/td [3 ][@style ="text -align : right "] | Right Aligned Column 1 , Row 3 |
243+
244+ Scenario : Creating a single column of vertical slides
245+ Given a file named "slides.md" with:
246+ """
247+ ***
248+ # Column 1, Slide 1
249+ ---
250+ # Column 1, Slide 2
251+ ---
252+ # Column 1, Slide 3
253+ """
254+ When I run `reveal-ck generate`
255+ Then the exit status should be 0
256+ And the file "slides/index.html" should have html matching the xpath:
257+ | //section [1 ]/section [1 ]/h1 [text ()="Column 1 , Slide 1 "] | Column 1 , Slide 1 |
258+ | //section [1 ]/section [2 ]/h1 [text ()="Column 1 , Slide 2 "] | Column 1 , Slide 2 |
259+ | //section [1 ]/section [3 ]/h1 [text ()="Column 1 , Slide 3 "] | Column 1 , Slide 3 |
260+
261+ Scenario : Creating a single column of vertical slides
262+ Given a file named "slides.md" with:
263+ """
264+ ***
265+ # Column 1, Slide 1
266+ ---
267+ # Column 1, Slide 2
268+ ---
269+ # Column 1, Slide 3
270+ ***
271+ """
272+ When I run `reveal-ck generate`
273+ Then the exit status should be 0
274+ And the file "slides/index.html" should have html matching the xpath:
275+ | //section [1 ]/section [1 ]/h1 [text ()="Column 1 , Slide 1 "] | Column 1 , Slide 1 |
276+ | //section [1 ]/section [2 ]/h1 [text ()="Column 1 , Slide 2 "] | Column 1 , Slide 2 |
277+ | //section [1 ]/section [3 ]/h1 [text ()="Column 1 , Slide 3 "] | Column 1 , Slide 3 |
278+
279+ Scenario : Creating a slide, a single column of vertical slides, and final slide
280+ Given a file named "slides.md" with:
281+ """
282+ # First
283+ ***
284+ # Column 1, Slide 1
285+ ---
286+ # Column 1, Slide 2
287+ ---
288+ # Column 1, Slide 3
289+ ***
290+ # Last
291+ """
292+ When I run `reveal-ck generate`
293+ Then the exit status should be 0
294+ And the file "slides/index.html" should have html matching the xpath:
295+ | //section [1 ]/h1 [text ()="First "] | First slide |
296+ | //section [2 ]/section [1 ]/h1 [text ()="Column 1 , Slide 1 "] | Column 1 , Slide 1 |
297+ | //section [2 ]/section [2 ]/h1 [text ()="Column 1 , Slide 2 "] | Column 1 , Slide 2 |
298+ | //section [2 ]/section [3 ]/h1 [text ()="Column 1 , Slide 3 "] | Column 1 , Slide 3 |
299+ | //section [3 ]/h1 [text ()="Last "] | Last Slide |
300+
301+ Scenario : Creating a slide, two columns of vertical slides, and final slide
302+ Given a file named "slides.md" with:
303+ """
304+ # First
305+ ***
306+ # Column 1, Slide 1
307+ ---
308+ # Column 1, Slide 2
309+ ---
310+ # Column 1, Slide 3
311+ ***
312+ ***
313+ # Column 2, Slide 1
314+ ---
315+ # Column 2, Slide 2
316+ ---
317+ # Column 2, Slide 3
318+ ***
319+ # Last
320+ """
321+ When I run `reveal-ck generate`
322+ Then the exit status should be 0
323+ And the file "slides/index.html" should have html matching the xpath:
324+ | //section [1 ]/h1 [text ()="First "] | First slide |
325+ | //section [2 ]/section [1 ]/h1 [text ()="Column 1 , Slide 1 "] | Column 1 , Slide 1 |
326+ | //section [2 ]/section [2 ]/h1 [text ()="Column 1 , Slide 2 "] | Column 1 , Slide 2 |
327+ | //section [2 ]/section [3 ]/h1 [text ()="Column 1 , Slide 3 "] | Column 1 , Slide 3 |
328+ | //section [3 ]/section [1 ]/h1 [text ()="Column 2 , Slide 1 "] | Column 2 , Slide 1 |
329+ | //section [3 ]/section [2 ]/h1 [text ()="Column 2 , Slide 2 "] | Column 2 , Slide 2 |
330+ | //section [3 ]/section [3 ]/h1 [text ()="Column 2 , Slide 3 "] | Column 2 , Slide 3 |
331+ | //section [4 ]/h1 [text ()="Last "] | Last Slide |
332+
333+ Scenario : Creating a slide, a column, a slide, a column, and a final slide
334+ Given a file named "slides.md" with:
335+ """
336+ # First
337+ ***
338+ # Column 1, Slide 1
339+ ---
340+ # Column 1, Slide 2
341+ ---
342+ # Column 1, Slide 3
343+ ***
344+ # Middle
345+ ***
346+ # Column 2, Slide 1
347+ ---
348+ # Column 2, Slide 2
349+ ---
350+ # Column 2, Slide 3
351+ ***
352+ # Last
353+ """
354+ When I run `reveal-ck generate`
355+ Then the exit status should be 0
356+ And the file "slides/index.html" should have html matching the xpath:
357+ | //section [1 ]/h1 [text ()="First "] | First slide |
358+ | //section [2 ]/section [1 ]/h1 [text ()="Column 1 , Slide 1 "] | Column 1 , Slide 1 |
359+ | //section [2 ]/section [2 ]/h1 [text ()="Column 1 , Slide 2 "] | Column 1 , Slide 2 |
360+ | //section [2 ]/section [3 ]/h1 [text ()="Column 1 , Slide 3 "] | Column 1 , Slide 3 |
361+ | //section [3 ]/h1 [text ()="Middle "] | Middle slide |
362+ | //section [4 ]/section [1 ]/h1 [text ()="Column 2 , Slide 1 "] | Column 2 , Slide 1 |
363+ | //section [4 ]/section [2 ]/h1 [text ()="Column 2 , Slide 2 "] | Column 2 , Slide 2 |
364+ | //section [4 ]/section [3 ]/h1 [text ()="Column 2 , Slide 3 "] | Column 2 , Slide 3 |
365+ | //section [5 ]/h1 [text ()="Last "] | Last Slide |
0 commit comments