Choosing a presentation framework
ASQ currently supports two frameworks: impress.js
(we use our own forked version which can be found here) and reveal.js
. In general, impress.js
offers a lot of control in the positioning of the slides in the expense of ease of use and performance in mobile (it uses a lot of 3D transformations). reveal.js
does more out of the box, is easier to use and has a nice plugin architecture.
impress.js
The full documentation of impress.js can be found here. The following guide covers just the basics to get you started.
Setup
You need to include the impress.js script for testing locally. When you upload the presentation it will be replaced by ASQ.
Important: Use the ASQ fork of impress which adds some extra functionality like substeps and better event handling.
1 | $ bower install --save ASQ-USI/impress.js |
Let’s include it in the presentation
1 | <!-- in index.html --> |
Include your CSS styles
1 | <!-- in index.html --> |
Starting impress
When you upload the presentation to ASQ, impress will be automatically initialized for you. However when you test locally you need to initialize it yourself. To avoid initializing twice, add the following code for initialization
1 | if (! document.body.classList.contains('asq')){ |
Container
All slides go inside a div with id="impress"
1 | <!-- in index.html --> |
Slides
Basic
Each slide, minimally, needs id
(must be unique) and a class="step"
attributes.
1 | <!-- in index.html --> |
Positioning
To position slides use data-*
attributes. If you omit them, the default values are 0
except from data-scale
which is 1
. The available attributes are
- Translation:
data-x
,data-y
anddata-z
. - Rotation:
data-rotate
,data-rotate-x
,data-rotate-y
anddata-rotate-z
. - Scale:
data-scale
,data-scale-x
anddata-scale-y
.
1 | <!-- in index.html --> |
Substeps
The ASQ fork of impress.js
has support for substeps (or fragments in reveal.js
lingo). This allows you to gradually step into sections inslide a slide (for example to reveal bullets one after another). To use them simply add the class .substep
.
1 | <!-- in index.html --> |
reveal.js
TBD