Commit Graph

20 Commits

Author SHA1 Message Date
Meng Weng Wong
d0ba7ff884 New "bookmark" plugin allows hotkey fast-travel to specific steps (#852)
add plugin bookmark supporting direct access via hotkeys
similar to "click", we can now fast travel using hotkeys e.g. 1 2 3
2023-11-01 01:13:40 +02:00
Falco Nogatz
64d66bf77f Replace backslashes by slashes in href to CSS (#828) 2022-12-11 17:03:49 -08:00
thawk
0d52faa60d Fix incorrect tag in 3D-positions example (#822) 2022-10-09 23:16:02 +03:00
thawk
f8dd0e92b4 Improve markdown support. (#817)
1. Support `marked`, you can using it instead. #811
2. Auto trim the indentation, so it can be indent like regular HTML.
   #812
2022-08-19 11:57:48 +03:00
thawk
629f7686f3 Add relative move and rotate to rel plugin (#794)
The relative position in rel plugin is currently based on the world coordinate. So for the same effect, like fly in from the right-hand side, we must use different `data-rel-x/y/z` value. Why not let the plugin do the hard part?

So I introduce a `data-rel-position`, when set to `relative`, all relative attribute is based on the position and rotation of previous slide. So no matter the rotation of previous slide, data-rel-x="1000" always looks like fly in from the right-hand side. We can change the position and rotation of one slide, and the position of all following slides will be changed too.

When `data-rel-position` is set to `relative`, relative rotation has a clear meaning. It describes the relative rotations between slides. We don't need to set rotations for all slide, setting the key slides is enough. If `data-rel-position` is not relative, the effect of `data-rel-rotate-x/y/z` is not clear, so they're only used when `data-rel-position="relative"`.

After the introduction of relative rotation, there're 6 attribute that will inherit from previous slide. If we want to set a relative X move, we have to set all other 5 attributes to 0. It's boring. So a `data-rel-clear` is used to set all 6 attributes to 0, and then the value specified in current slide is applied. 

The `examples/3D-positions/index.html` shows some usage. As you can see, the html code of two slide ring is the same, and slides except for the first two in a ring has no position attributes. It work by inheriting the previous one.

This PR invokes a lot math calculations. Basically, the rotation of a slide is translated into the coordinate describing the directions of X/Y/Z axes. And `data-rel-x/y/z` can be easily calculated by that. The rotations is the hard part, I mainly use the algorithm in the Quaternions and spatial rotation - Wikipedia to compose two and more rotations.  I'm not a math guy, hope I don't make much mistakes.
2022-04-24 21:37:50 +03:00
Henrik Ingo
f68e5fff29 Pimp the cube demo a bit.
I always wanted to do it this way. Today finally had some free time to
hack it this weekend.
2021-02-27 14:52:33 +02:00
IngridRegina
a5e5b96291 created impress-common.css (#760)
Co-authored-by: Ingrid-Regina Vähi <ingrid.vahi@adm.ee>
2020-04-05 17:14:18 +03:00
Mohamed Feddad
203b85808c Add markdown dialect attribute. (#763)
Resolves #724
2020-04-01 10:08:27 +03:00
Henrik Ingo
d3c467b0fd Use darker text for classic-slides
Based on audience feedback from conference talk.
2020-03-23 14:43:12 +02:00
Henrik Ingo
64dd0f4064 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.
2020-03-23 14:25:15 +02:00
Henrik Ingo
d5bbbc40ae Remove dead link from demo slides 2019-10-29 21:04:49 +02:00
Henrik Ingo
4b326d4164 Remove edits to example presentation, used to test previous commit 2018-05-08 20:09:58 +03:00
Henrik Ingo
194ae3bb62 Fixes to data-rel-to
Fixes 80ffff0e8f
2018-05-08 20:01:11 +03:00
Henrik Ingo
e92e02ccb4 Make impress-console-button actually clickable (#651)
Changed the onclick handler to trigger the impress:console:open event
and not use the impressConsole() global function any more. The latter
is considered deprecated now that impressConsole is integrated into
impress.js itself.

Also catch some errors that appear in event handlers when the target
for the click event was immediately removed from DOM.

Fixes #651
2018-01-01 15:05:55 +02:00
Henrik Ingo
1946c5be55 Change hyperlinks to github.com/henrikingo/impress.js back to upstream repo 2017-11-05 18:42:27 +02:00
Henrik Ingo
ff036a5dbd Add demo examples/2D-navigation
Show cases the new non-linear navigation possibilities of goto plugin.
2017-11-05 18:42:27 +02:00
Henrik Ingo
cfd1200dcc Add new demo presentation examples/3D-rotations
...to showcase a truly 3-dimensional presentation and also the
use of the new data-rotate-order="" attribute.
2017-11-05 18:42:27 +02:00
Henrik Ingo
4a62376145 Add new demo examples/cube to showcase a simple 3-dimensional presentation.
Also nice demo of multi-dimensional navigation from impress#465
2017-11-05 18:42:27 +02:00
Henrik Ingo
a37723fd82 Add demo presentation: examples/markdown
This demo presentation is written entirely in Markdown, as provided
by the combination of the extras plugin, and extras/markdown/markdown.js

The idea for using Markdown instead of HTML came from users who felt that
sometimes when you just need to quickly toss together some slides, using
Markdown is faster than HTML. Same approach is also familiar to Hovercraft
users, where RST is converted to a traditional HTML based impress.js presentation.

Unlike Hovercraft, using Markdown.js allows you to write Markdown directly into
your html file that is the presentation. It is converted in the browser, and no
separate command line tool is necessary. As a result you can also mix and match:
some slides can be HTML (when needed) and some in Markdown.
2017-11-05 18:42:27 +02:00
Henrik Ingo
e847fb4fb4 Add another demo presentation: examples/classic-slides
Add one presentation that provides a very simple demo, using
impress.js to create a very traditional "slide show". Possibly
it's an easier way to learn impress.js (it's commented, just like
the official demo.) It uses the relative positioning plugin and
uses "speaker notes", which aren't shown in the presentation,
but are picked up and shown in the speaker console (press 'P').
Also uses autoplay, forms... and includes short demo of all the extra
addons from extras/. (Highlight.js, Markdown.js, Mathjax.js, Mermaid.js)
2017-11-05 18:42:27 +02:00