Skip to content

Commit e73fc8b

Browse files
author
Marcin Szczepanski
committed
Fix README after refactor
1 parent e0750fe commit e73fc8b

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ I wanted to show a small gallery inside a reveal.js presentation (slideshow with
44

55
## Installing
66

7-
* copy `gallery.js` to `plugins/gallery/gallery.js` in your reveal.js presentation
7+
* copy `gallery.plugin.js` to `plugins/gallery/gallery.plugin.js` in your reveal.js presentation
88
* copy `gallery.css` to `plugins/gallery/gallery.css` or integrate into your CSS your preferred way, customise the styles as required. You will need to set the width and height of the `.gallery` selector to match the natural size of your presentation defined in `reveal.js`
99
* add the following to the head of `index.html` after other stylesheets are loaded:
1010
```<link rel="stylesheet" href="plugins/gallery/gallery.css">```
1111
* add the following to the bottom of `index.html`, where the other plugins are defined:
1212
```js
13-
{ src: 'plugin/gallery/gallery.js', async: true, condition: function() { return !!document.querySelector('.gallery'); } }
13+
{ src: 'plugin/gallery/gallery.plugin.js', async: true, condition: function() { return !!document.querySelector('.gallery'); } }
1414
```
1515
* add a gallery somewhere in your slide:
1616

@@ -32,4 +32,14 @@ There's only really two configurable options at the moment, both set as data ele
3232
* **data-iterations** how many times to loop through the slideshow - default is once and stop on the last slide. Set
3333
to 0 to repeat indefinitely
3434

35-
You can also customise how the labels will look by editing the `label` style in `gallery.css`.
35+
You can also customise how the labels will look by editing the `label` style in `gallery.css`.
36+
37+
## Contributing
38+
39+
### Building
40+
41+
Just for kicks this codebase is a bit overengineered. The Reveal specific code has been split from the generic Gallery code to allow it to be tested. Gallery code is in `src/gallery.js`, Reveal plugin code is in `src/gallery.reveal.js`. To build a single JS file for use with Reveal there is a `Makefile` - so just run `make` in the root of the project and you'll get a `gallery.plugin.js`.
42+
43+
### Testing
44+
45+
Tests are browser based using Mocha & Chai, run these by running `tests/index.html`.

0 commit comments

Comments
 (0)