Skip to content

Commit 01efcf2

Browse files
committed
merge support for multiple notes on same slide
2 parents b23d15c + 62a85d5 commit 01efcf2

File tree

18 files changed

+52
-32
lines changed

18 files changed

+52
-32
lines changed

dist/reveal.css

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/reveal.esm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/reveal.esm.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/reveal.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/reveal.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@
1717
<div class="reveal">
1818
<div class="slides">
1919
<section>Slide 1</section>
20-
<section>Slide 2</section>
20+
<section>Slide 2
21+
<aside class="notes">
22+
<p>Some notes</p>
23+
</aside>
24+
<p>Some slide text</p>
25+
<aside class="notes">
26+
<p>and some more notes</p>
27+
</aside>
28+
</section>
2129
</div>
2230
</div>
2331

js/controllers/notes.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Handles the showing and
2+
* Handles the showing of speaker notes
33
*/
44
export default class Notes {
55

@@ -89,7 +89,7 @@ export default class Notes {
8989
* Retrieves the speaker notes from a slide. Notes can be
9090
* defined in two ways:
9191
* 1. As a data-notes attribute on the slide <section>
92-
* 2. As an <aside class="notes"> inside of the slide
92+
* 2. With <aside class="notes"> elements inside the slide
9393
*
9494
* @param {HTMLElement} [slide=currentSlide]
9595
* @return {(string|null)}
@@ -101,10 +101,14 @@ export default class Notes {
101101
return slide.getAttribute( 'data-notes' );
102102
}
103103

104-
// ... or using an <aside class="notes"> element
105-
let notesElement = slide.querySelector( 'aside.notes' );
106-
if( notesElement ) {
107-
return notesElement.innerHTML;
104+
// ... or using <aside class="notes"> elements
105+
let notesElements = slide.querySelectorAll( 'aside.notes' );
106+
if( notesElements ) {
107+
let notes = "";
108+
for (let i = 0; i < notesElements.length; i++) {
109+
notes += notesElements[i].innerHTML + "\n";
110+
}
111+
return notes;
108112
}
109113

110114
return null;

plugin/highlight/highlight.esm.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/highlight/highlight.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/markdown/markdown.esm.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)