sozi-ui/README.md

49 lines
1 KiB
Markdown
Raw Permalink Normal View History

2018-05-14 13:52:30 +02:00
Sozi UI
=======
Add controlers on embeded Sozi presentations.
Usage
-----
```
var soziUi = new SoziUi(element, options);
soziUi.addControls();
soziUi.addEvents();
```
Example
-------
```
<link rel="stylesheet" href="/path/to/sozi-ui.css">
<div class="sozi-container">
<iframe src="/presentation.svg" frameborder="0" class="presentation"></iframe>
</div>
<script src="/path/to/sozi-ui.js"></script>
<script>
window.addEventListener('load', function() {
var presentations = document.querySelectorAll('.presentation');
presentations.forEach(function(presentation) {
var soziUi = new SoziUi(presentation, {
2018-05-14 14:00:02 +02:00
summary: true,
allowFullscreen: true,
2018-05-14 13:52:30 +02:00
position: 'bottom' // or 'top',
2018-05-14 14:00:02 +02:00
lang: {
next: 'Suivant',
previous: 'Précédent',
fullscrenOn: 'Plein écran',
fullscrenOff: 'Réduire'
}
2018-05-14 13:52:30 +02:00
});
soziUi.addControls();
soziUi.addEvents();
});
}, false)
</script>
```