From 6aebb90392ac42098ef4cebce7785f78c377a546 Mon Sep 17 00:00:00 2001 From: thawk Date: Sun, 30 Jan 2022 17:21:25 +0800 Subject: [PATCH] update classic-slides example to show how relative position works --- examples/classic-slides/index.html | 34 +++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/examples/classic-slides/index.html b/examples/classic-slides/index.html index 50cae1c85..0354d112a 100644 --- a/examples/classic-slides/index.html +++ b/examples/classic-slides/index.html @@ -188,7 +188,7 @@

Bullet points

Notation shouldn't be a surprise. We use `data-rotate="30"` attribute, meaning that this element should be rotated by 30 degrees clockwise. --> -
+

A blockquote & image

Mother Teresa holding a newborn babyA blockquote & image
+ We use data-rel-position="relative" to make data-rel-rotate-* work, + and make data-rel-x/data-rel-y/data-rel-y be calculated at the coordination related to previous slide. + The relative position and rotation will be inherited by following slides, + so it's not necessary to repeat it again and again.
-
+

More text styles

As usual, use em to emphasize,
strong for strong, u for underline,
@@ -216,7 +220,7 @@

More text styles

-
+

Motion effects 101

Items on the slide can

Fly in

@@ -246,22 +250,32 @@

Motion effects 101

-
+
+
+

This step zoom in to left bottom of previous slide to see to small text.

+

It's a empty and transparent.

+

data-rel-reset is used to prevent this step from inheriting the relative positioning from previous slide.

+
+
+ +

Add-ons

This version of impress.js includes several add-ons, striving to make this a full featured presentation app.

+

The previous step breaks the slide flow, changes the relative position and rotation.

+

This slide use data-rel-inherit to inherit relative position and rotation from the slide before previous slide, and use data-rel-to to make the relative calculation based on specified slide.

-
+

Impress.js plugins

  • A new plugin framework allows for rich extensibility, without bloating the core rendering library.
    • Press 'P' to open a presenter console.
    • -
    • When you move the mouse, navigation controls are visible on your bottom left
    • +
    • When you move the mouse, navigation controls are visible on your bottom right
    • Autoplay makes the slides advance after a timeout
    • Relative positioning plugin is often a more convenient way to position your slides when editing. (See html for this presentation.)
    @@ -277,7 +291,7 @@

    Impress.js plugins

-
+

Highlight.js


         // `init` API function that initializes (and runs) the presentation.
@@ -303,7 +317,7 @@ 

Highlight.js

-
+

Mermaid.js

%% This is a comment in mermaid markup @@ -330,7 +344,7 @@

MathJax.js

-
+
# Markdown.js * [Markdown.js](https://github.com/evilstreak/markdown-js) integration: for authors in a hurry! @@ -344,7 +358,7 @@

MathJax.js

* [A more advanced Markdown presentation is here.](../markdown/)
-
+
  • Remember, in impress.js the full power of HTML5, CSS3 & JavaScript is always at your fingertips!
  • For example, you can use tables, forms, or dynamic charts as you would on any web page: