Add documentation and examples for scaling to larger screens.
Document all attributes to root element (#impress) in DOCUMENTATION.md. For the main demo (/index.html) add width, height, max-scale, min-scale attributes to the main demo. These just use the defaults, except data-max-scale="3" which allows to scale to larger screens (HD, 4K). For examples/classic-slides, add attributes to root element and set it to target Full HD 1920 x 1080 resolution. Adjust CSS to match. Add notification everywhere that defaults will change in 2021.
This commit is contained in:
31
index.html
31
index.html
@@ -130,25 +130,40 @@
|
||||
That's the wrapper for your presentation steps. In this element all the impress.js magic happens.
|
||||
It doesn't have to be a `<div>`. Only `id` is important here as that's how the script find it.
|
||||
|
||||
You probably won't need it now, but there are some configuration options that can be set on this element.
|
||||
|
||||
Often you don't need to use any attributes here, but for educational purposes I have used all of them below.
|
||||
|
||||
To change the duration of the transition between slides use `data-transition-duration="2000"` giving it
|
||||
a number of ms. It defaults to 1000 (1s).
|
||||
|
||||
When authoring impress.js presentations, you should target some screen size, which you can define here.
|
||||
The default is 1024 x 768. You should write your CSS as if this is the screen size used for the
|
||||
presentation. When you present your presentation on a screen (or browser window) of different size,
|
||||
impress.js will automatically scale the presentation to fit the screen. The minimum and maximum limits
|
||||
to this scaling can also be defined here.
|
||||
|
||||
NOTE: I intend to change the defaults to target HD screens in 2021. So you may want to make a habit
|
||||
of explicitly defining these attributes for now, to avoid any disruption when the defaults change.
|
||||
|
||||
You can also control the perspective with `data-perspective="500"` giving it a number of pixels.
|
||||
It defaults to 1000. You can set it to 0 if you don't want any 3D effects.
|
||||
If you are willing to change this value make sure you understand how CSS perspective works:
|
||||
https://developer.mozilla.org/en/CSS/perspective
|
||||
|
||||
But as I said, you won't need it for now, so don't worry - there are some simple but interesting things
|
||||
right around the corner of this tag ;)
|
||||
Plugins:
|
||||
|
||||
----------
|
||||
Plugins: We set the default time for autoplay plugin to 6 seconds. Autoplay will automatically advance
|
||||
We set the default time for autoplay plugin to 7 seconds. Autoplay will automatically advance
|
||||
to next slide after a timeout expires.
|
||||
|
||||
-->
|
||||
<div id="impress" data-autoplay="7">
|
||||
<div id="impress"
|
||||
data-transition-duration="1000"
|
||||
|
||||
data-width="1024"
|
||||
data-height="768"
|
||||
data-max-scale="3"
|
||||
data-min-scale="0"
|
||||
data-perspective="1000"
|
||||
|
||||
data-autoplay="7">
|
||||
|
||||
<!--
|
||||
|
||||
|
||||
Reference in New Issue
Block a user