Repository: impress/impress.js Branch: master Commit: c9f6c67457ce Files: 106 Total size: 756.7 KB Directory structure: gitextract_4ddgpgrz/ ├── .circleci/ │ └── config.yml ├── .eslintrc.js ├── .gitattributes ├── .github/ │ └── workflows/ │ └── pipeline.yaml ├── .gitignore ├── .gitmodules ├── .jscsrc ├── .jshintrc ├── .npmignore ├── DOCUMENTATION.md ├── GettingStarted.md ├── LICENSE ├── README.md ├── build.js ├── css/ │ ├── impress-common.css │ └── impress-demo.css ├── examples/ │ ├── 2D-navigation/ │ │ ├── css/ │ │ │ ├── fonts.css │ │ │ └── presentation.css │ │ └── index.html │ ├── 3D-positions/ │ │ └── index.html │ ├── 3D-rotations/ │ │ ├── css/ │ │ │ ├── 3D-rotations.css │ │ │ └── fonts.css │ │ └── index.html │ ├── classic-slides/ │ │ ├── css/ │ │ │ ├── classic-slides.css │ │ │ └── fonts.css │ │ └── index.html │ ├── cube/ │ │ ├── css/ │ │ │ ├── cube.css │ │ │ └── fonts.css │ │ └── index.html │ ├── index.html │ └── markdown/ │ ├── css/ │ │ ├── devopsy.css │ │ ├── effects.css │ │ ├── fonts.css │ │ └── markdown-slides.css │ └── index.html ├── index.html ├── js/ │ └── impress.js ├── karma.conf.js ├── npm-readme.md ├── package.json ├── qunit_test_runner.html ├── src/ │ ├── impress.js │ ├── lib/ │ │ ├── README.md │ │ ├── gc.js │ │ ├── rotation.js │ │ └── util.js │ └── plugins/ │ ├── README.md │ ├── autoplay/ │ │ ├── README.md │ │ └── autoplay.js │ ├── blackout/ │ │ ├── README.md │ │ └── blackout.js │ ├── bookmark/ │ │ ├── README.md │ │ └── bookmark.js │ ├── extras/ │ │ ├── README.md │ │ └── extras.js │ ├── form/ │ │ ├── README.md │ │ └── form.js │ ├── fullscreen/ │ │ ├── README.md │ │ └── fullscreen.js │ ├── goto/ │ │ ├── README.md │ │ └── goto.js │ ├── help/ │ │ ├── README.md │ │ └── help.js │ ├── impressConsole/ │ │ ├── README.md │ │ └── impressConsole.js │ ├── media/ │ │ ├── README.md │ │ └── media.js │ ├── mobile/ │ │ ├── README.md │ │ └── mobile.js │ ├── mouse-timeout/ │ │ ├── README.md │ │ └── mouse-timeout.js │ ├── navigation/ │ │ ├── README.md │ │ ├── navigation.js │ │ └── navigation_tests.js │ ├── navigation-ui/ │ │ ├── README.md │ │ └── navigation-ui.js │ ├── progress/ │ │ ├── README.md │ │ └── progress.js │ ├── rel/ │ │ ├── README.md │ │ └── rel.js │ ├── resize/ │ │ ├── README.md │ │ └── resize.js │ ├── skip/ │ │ ├── README.md │ │ └── skip.js │ ├── stop/ │ │ ├── README.md │ │ └── stop.js │ ├── substep/ │ │ ├── README.md │ │ └── substep.js │ ├── toolbar/ │ │ ├── README.md │ │ └── toolbar.js │ └── touch/ │ ├── README.md │ └── touch.js └── test/ ├── HOWTO.md ├── core_tests.js ├── core_tests_presentation.html ├── helpers.js ├── non_default.html ├── non_default.js └── plugins/ └── rel/ ├── padding_tests.js ├── padding_tests_presentation.html ├── rel_to_tests.js ├── rel_to_tests_presentation.html ├── relative_to_screen_size_tests.js ├── relative_to_screen_size_tests_presentation.html ├── rotation_tests.js └── rotation_tests_presentation.html ================================================ FILE CONTENTS ================================================ ================================================ FILE: .circleci/config.yml ================================================ version: 2 jobs: build: working_directory: ~/impress.js docker: - image: circleci/node:current-browsers steps: - checkout - restore_cache: key: dependency-cache-{{ checksum "package.json" }} - run: name: install-npm command: npm install - save_cache: key: dependency-cache-{{ checksum "package.json" }} paths: - ./node_modules - run: name: build command: npm run build - run: name: lint command: npm run lint - run: name: test command: npm test ================================================ FILE: .eslintrc.js ================================================ module.exports = { "env": { "browser": true, "es6": true }, "extends": "eslint:recommended", "globals": { "Atomics": "readonly", "SharedArrayBuffer": "readonly" }, "parserOptions": { "ecmaVersion": 2018 }, "rules": { "accessor-pairs": "error", "array-bracket-newline": "error", "array-bracket-spacing": "error", "array-callback-return": "error", "array-element-newline": "error", "arrow-body-style": "error", "arrow-parens": "error", "arrow-spacing": "error", "block-scoped-var": "off", "block-spacing": [ "error", "always" ], "brace-style": [ "error", "1tbs", { "allowSingleLine": true } ], "callback-return": "error", "camelcase": "error", "capitalized-comments": "off", "class-methods-use-this": "error", "comma-dangle": "error", "comma-spacing": [ "error", { "after": true, "before": false } ], "comma-style": [ "error", "last" ], "complexity": "error", "computed-property-spacing": [ "error", "always" ], "consistent-return": "error", "consistent-this": "off", "curly": "error", "default-case": "error", "dot-location": "error", "dot-notation": "error", "eol-last": "error", "eqeqeq": "error", "func-call-spacing": "error", "func-name-matching": "error", "func-names": "off", "func-style": [ "error", "expression" ], "function-paren-newline": "error", "generator-star-spacing": "error", "global-require": "error", "guard-for-in": "error", "handle-callback-err": "error", "id-blacklist": "error", "id-length": "off", "id-match": "error", "implicit-arrow-linebreak": "error", "indent": "error", "indent-legacy": "error", "init-declarations": "off", "jsx-quotes": "error", "key-spacing": "off", "keyword-spacing": [ "error", { "after": true, "before": true } ], "line-comment-position": "off", "linebreak-style": [ "error", "unix" ], "lines-around-comment": "error", "lines-around-directive": "off", "lines-between-class-members": "error", "max-classes-per-file": "error", "max-depth": "error", "max-len": "off", "max-lines": "error", "max-lines-per-function": "off", "max-nested-callbacks": "error", "max-params": "error", "max-statements": "off", "max-statements-per-line": "off", "multiline-comment-style": [ "error", "separate-lines" ], "new-cap": "error", "new-parens": "error", "newline-after-var": "off", "newline-before-return": "off", "newline-per-chained-call": "error", "no-alert": "error", "no-array-constructor": "error", "no-async-promise-executor": "error", "no-await-in-loop": "error", "no-bitwise": "error", "no-buffer-constructor": "error", "no-caller": "error", "no-catch-shadow": "error", "no-confusing-arrow": "error", "no-continue": "error", "no-div-regex": "error", "no-duplicate-imports": "error", "no-else-return": "error", "no-empty-function": "error", "no-eq-null": "error", "no-eval": "error", "no-extend-native": "error", "no-extra-bind": "error", "no-extra-label": "error", "no-extra-parens": "off", "no-floating-decimal": "error", "no-implicit-coercion": "error", "no-implicit-globals": "error", "no-implied-eval": "error", "no-inline-comments": "off", "no-inner-declarations": [ "error", "functions" ], "no-invalid-this": "off", "no-iterator": "error", "no-label-var": "error", "no-labels": "error", "no-lone-blocks": "error", "no-lonely-if": "error", "no-loop-func": "error", "no-magic-numbers": "off", "no-misleading-character-class": "error", "no-mixed-operators": "error", "no-mixed-requires": "error", "no-multi-assign": "error", "no-multi-spaces": "off", "no-multi-str": "error", "no-multiple-empty-lines": "error", "no-native-reassign": "error", "no-negated-condition": "off", "no-negated-in-lhs": "error", "no-nested-ternary": "error", "no-new": "error", "no-new-func": "error", "no-new-object": "error", "no-new-require": "error", "no-new-wrappers": "error", "no-octal-escape": "error", "no-param-reassign": "off", "no-path-concat": "error", "no-plusplus": "off", "no-process-env": "error", "no-process-exit": "error", "no-proto": "error", "no-prototype-builtins": "error", "no-restricted-globals": "error", "no-restricted-imports": "error", "no-restricted-modules": "error", "no-restricted-properties": "error", "no-restricted-syntax": "error", "no-return-assign": "error", "no-return-await": "error", "no-script-url": "error", "no-self-compare": "error", "no-sequences": "error", "no-shadow": "off", "no-shadow-restricted-names": "error", "no-spaced-func": "error", "no-sync": "error", "no-tabs": "error", "no-template-curly-in-string": "error", "no-ternary": "off", "no-throw-literal": "error", "no-trailing-spaces": "error", "no-undef-init": "error", "no-undefined": "off", "no-underscore-dangle": "error", "no-unmodified-loop-condition": "error", "no-unneeded-ternary": "error", "no-unused-expressions": "error", "no-use-before-define": "off", "no-useless-call": "error", "no-useless-catch": "error", "no-useless-computed-key": "error", "no-useless-concat": "error", "no-useless-constructor": "error", "no-useless-rename": "error", "no-useless-return": "error", "no-var": "off", "no-void": "error", "no-warning-comments": "error", "no-whitespace-before-property": "error", "no-with": "error", "nonblock-statement-body-position": "error", "object-curly-newline": "error", "object-curly-spacing": [ "error", "always" ], "object-shorthand": "off", "one-var": "off", "one-var-declaration-per-line": "off", "operator-assignment": "error", "operator-linebreak": "error", "padded-blocks": "off", "padding-line-between-statements": "error", "prefer-arrow-callback": "off", "prefer-const": "error", "prefer-destructuring": "off", "prefer-numeric-literals": "error", "prefer-object-spread": "error", "prefer-promise-reject-errors": "error", "prefer-reflect": "off", "prefer-rest-params": "off", "prefer-spread": "error", "prefer-template": "off", "quote-props": "off", "quotes": [ "error", "double" ], "radix": "error", "require-atomic-updates": "error", "require-await": "error", "require-jsdoc": "error", "require-unicode-regexp": "off", "rest-spread-spacing": "error", "semi": "error", "semi-spacing": [ "error", { "after": true, "before": false } ], "semi-style": [ "error", "last" ], "sort-imports": "error", "sort-keys": "off", "sort-vars": "off", "space-before-blocks": "error", "space-before-function-paren": "off", "space-in-parens": [ "error", "always" ], "space-infix-ops": "error", "space-unary-ops": "error", "spaced-comment": [ "error", "always" ], "strict": "error", "switch-colon-spacing": "error", "symbol-description": "error", "template-curly-spacing": "error", "template-tag-spacing": "error", "unicode-bom": [ "error", "never" ], "valid-jsdoc": "error", "vars-on-top": "off", "wrap-regex": "error", "yield-star-spacing": "error", "yoda": [ "error", "never" ] } }; ================================================ FILE: .gitattributes ================================================ * text=auto ================================================ FILE: .github/workflows/pipeline.yaml ================================================ name: Automates the Verification, Testing, and Building Process env: NPM_CONFIG_LOGLEVEL: "warn" NPM_CONFIG_PREFER_OFFLINE: "true" jobs: verification: runs-on: ubuntu-latest steps: - name: Check out repository uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 22.x - name: Install dependencies run: npm clean-install - name: Lint code run: npm run lint testing: needs: verification runs-on: ubuntu-latest steps: - name: Check out repository uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 22.x - name: Install dependencies run: npm clean-install - name: Run test suite run: npm run test assembly: needs: testing runs-on: ubuntu-latest steps: - name: Check out repository uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 22.x - name: Install dependencies run: npm clean-install - name: Build artifact(s) run: npm run build on: pull_request: branches: - master push: branches: - master permissions: contents: read ================================================ FILE: .gitignore ================================================ /js/impress.min.js.map /js/impress.min.js /node_modules /npm-debug.log /*.tgz # Files for editors and other tools /.brackets.json ================================================ FILE: .gitmodules ================================================ [submodule "extras"] path = extras url = https://github.com/impress/impress-extras ================================================ FILE: .jscsrc ================================================ { "preset": "jquery", // Since we check quotemarks already in jshint, this can be turned off "validateQuoteMarks": false } ================================================ FILE: .jshintrc ================================================ { "globals": { "module": true }, "boss": true, "browser": true, "curly": true, "esversion": 6, "eqeqeq": true, "eqnull": true, "expr": true, "immed": true, "noarg": true, "quotmark": "double", "undef": true, "unused": true } ================================================ FILE: .npmignore ================================================ /.*/ /.* /examples /extras/* /circle.yml ================================================ FILE: DOCUMENTATION.md ================================================ # Reference API ## HTML ### Root Element impress.js requires a Root Element. All the content of the presentation will be created inside that element. It is not recommended to manipulate any of the styles, attributes or classes that are created by impress.js inside the Root Element after initialization. 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. All impress.js steps are wrapped inside a div element of 0 size! This means that in your CSS you can't use relative values for width and height (example: `width: 100%`) to define the size of step elements. You need to use pixel values. The pixel values used here correspond to the `data-width` and `data-height` given to the `#impress` root element. When the presentation is viewed on a larger or smaller screen, impress.js will automatically scale the steps to fit the screen. **NOTE:** The default width and height have been changed to target HD screens in v1.2.0. If you don't set target width and height explicitly, layout and dimensions of your presentations are likely to be affected. In order to get back the old target resolution, use:
``` ### Step Element A Step Element is an element that contains metadata that defines how it is going to be presented in the screen. A Step Element should contain a `.step` class and an optional `id` attribute. The content represents an html fragment that will be positioned at the center of the camera. In the Step Element, you can define a specific set of default attributes and positioning, that are documented below. **Example:** ```html
Aren’t you just bored with all those slides-based presentations?
``` #### 2D Coordinates Positioning (data-x, data-y) Define the pixel based position in which the **center** of the [Step Element](#step-element) will be positioned inside the infinite canvas. **Attributes** Attribute | Default | Explanation -------------------------|-----------|------------ data-x | 0 | X coordinate for step position data-y | 0 | Y coordinate for step position **Example:** ```html
Aren’t you just bored with all those slides-based presentations?
``` #### 2D Scaling (data-scale) Defines the scaling multiplier of the [Step Element](#step-element) relative to other Step Elements. For example, `data-scale="4"` means that the element will appear to be 4 times larger than the others. From the presentation and transitions point of view, it means that it will have to be scaled down (4 times) to make it back to its correct size. **Example:** ```html
then you should try

impress.js*

* no rhyme intended
``` #### 2D Rotation (data-rotate) Represents the amount of clockwise rotation of the element relative to 360 degrees. **Example:** ```html

It’s a presentation tool
inspired by the idea behind prezi.com
and based on the power of CSS3 transforms and transitions in modern browsers.

``` #### 3D Coordinates Positioning (data-z) Define the pixel based position in which the **center** of the [Step Element](#step-element) will be positioned inside the infinite canvas on the third dimension (Z) axis. For example, if we use `data-z="-3000"`, it means that the [Step Element](#step-element) will be positioned far away from the camera (by 3000px). **Example:** ```html

and tiny ideas

``` **Note:** The introduction of the [rel](src/plugins/rel/README.md) plugin includes a slight backward incompatible change. Previously the default value for `data-x`, `data-y` and `data-z` was zero. The `rel` plugin changes the default to inherit the value of the previous slide. This means, you need to explicitly set these values to zero, if they ever were non-zero. #### 3D Rotation (data-rotate-x, data-rotate-y, data-rotate-z) You can not only position a [Step Element](#step-element) in 3D, but also rotate it around any axis. **Example:** The example below will get rotated by -40 degrees (40 degrees anticlockwise) around X axis and 10 degrees (clockwise) around Y axis. You can of course rotate it around Z axis with `data-rotate-z` - it has exactly the same effect as `data-rotate` (these two are basically aliases). ```HTML

have you noticed it’s in 3D*?

* beat that, prezi ;)
``` #### 3D Rotation Order (data-rotate-order) The order in which the CSS `rotateX(), rotateY(), rotateZ()` transforms are applied matters. This is because each rotation is relative to the then current position of the element. By default the rotation order is `data-rotate-order="xyz"`. For some advanced uses you may need to change it. The demo presentation [3D rotations](examples/3D-rotations/index.html) sets this attribute to rotate some steps into positions that are impossible to reach with the default order. ## CSS ### 4D States (.past, .present and .future classes) The `.future` class is added to all [Step Elements](#step-element) that haven't been visited yet. **Example:** ```CSS .future { display: none; } ``` The `.present` class is added to the [Step Element](#step-element) that is currently at the center of the camera. This is useful to create animations inside the step once the camera navigates to it. **Example:** ```CSS .present .rotating { transform: rotate(-10deg); transition-delay: 0.25s; } ``` The `.past` class is added to all [Step Elements](#step-element) that have been visited at least once. **Example:** ```CSS .past { display: none; } ``` ### Current Active Step (.active class) The `.active` class is added to the [Step Element](#step-element) that is currently visible at the center of the camera. **Example:** ```CSS .step { opacity: 0.3; transition: opacity 1s; } .step.active { opacity: 1 } ``` At the same time, the `impress-on-*` class is added to the body element, the class name represents the active [Step Element](#step-element) id. This allows for custom global styling, since you can't match a CSS class backwards from the active [Step Element](#step-element) to the `body`. **Example:** ```CSS .impress-on-overview .step { opacity: 1; cursor: pointer; } .impress-on-step-1, .impress-on-step-2, .impress-on-step-3 { background: LightBlue; } ``` ### Progressive Enhancement (.impress-not-supported class) The `.impress-not-supported` class is added to the `body` element if the browser doesn't support the features required by impress.js to work, it is useful to apply some fallback styles in the CSS. It's not necessary to add it manually on the `body` element. If the script detects that the browser lacks important features it will add this class. It is recommended to add the class manually to the `body` element though, because that means that users without JavaScript will also get fallback styles. When impress.js script detects that the browser supports all required features, the `.impress-not-support` class will be removed from the `body` element. **Example:** ```CSS .impress-not-supported .step { display: inline-block; } ``` ## Plugins Many new features are implemented as plugins. The [Plugins documentation](src/plugins/README.md) is the starting place to learn about those, as well as the README.md of [each plugin](src/plugins/). ## JavaScript ### impress( [ id ] ) A factory function that creates the [ImpressAPI](#impressapi). Accepts a [`String`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) that represents the id of the root element in the page. If omitted, impress.js will lookup for the element with the id "impress" by default. **Example:** ```JavaScript var impressAPI = impress( "root" ); ``` ### ImpressAPI The main impress.js API that handles common operations of impress.js, listed below. #### .init() Initializes impress.js globally in the page. Only one instance of impress.js is supported per document. **Example:** ```JavaScript impress().init(); ``` Triggers the `impress:init` event in the [Root Element](#root-element) after the presentation is initialized. **Example:** ```JavaScript var rootElement = document.getElementById( "impress" ); rootElement.addEventListener( "impress:init", function() { console.log( "Impress init" ); }); impress().init(); ``` #### .tear() Resets the DOM to its original state, as it was before `init()` was called. This can be used to "unload" impress.js. A particular use case for this is, if you want to do dynamic changes to the presentation, you can do a teardown, apply changes, then call `init()` again. (In most cases, this will not cause flickering or other visible effects to the user, beyond the intended dynamic changes.) **Example:** ```JavaScript impress().tear(); ``` #### .next() Navigates to the next step of the presentation using the [`goto()` function](#impressgotostepindexstepelementidstepelement-duration). **Example:** ```JavaScript var api = impress(); api.init(); api.next(); ``` #### .prev() Navigates to the previous step of the presentation using the [`goto()` function](#impressgotostepindexstepelementidstepelement-duration). **Example:** ```JavaScript var api = impress(); api.init(); api.prev(); ``` #### .goto( stepIndex | stepElementId | stepElement, [ duration ] ) Accepts a [`Number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) that represents the step index. Navigates to the step given the provided step index. **Example:** ```JavaScript var api = impress(); api.init(); api.goto(7); ``` Accepts a [`String`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) that represents the [Step Element](#step-element) id. Navigates to the step given the provided [Step Element](#step-element) id. **Example:** ```JavaScript var api = impress(); api.init(); api.goto( "overview" ); ``` Accepts an [`HTMLElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement) that represents the [Step Element](#step-element). Navigates to the step given the provided [Step Element](#step-element). **Example:** ```JavaScript var overview = document.getElementById( "overview" ); var api = impress(); api.init(); api.goto( overview ); ``` Accepts an optional [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) in the last argument that represents the duration of the transition in milliseconds. If not provided, the default transition duration for the presentation will be used. Triggers the `impress:stepenter` event in the [Root Element](#root-element) when the presentation navigates to the target [Step Element](#step-element). **Example:** ```JavaScript var rootElement = document.getElementById( "impress" ); rootElement.addEventListener( "impress:stepenter", function(event) { var currentStep = event.target; console.log( "Entered the Step Element '" + currentStep.id + "'" ); }); ``` Triggers the `impress:stepleave` event in the [Root Element](#root-element) when the presentation navigates away from the current [Step Element](#step-element). **Example:** ```JavaScript var rootElement = document.getElementById( "impress" ); rootElement.addEventListener( "impress:stepleave", function(event) { var currentStep = event.target; var nextStep = event.detail.next; console.log( "Left the Step Element '" + currentStep.id + "' and about to enter '" + nextStep.id ); }); ``` # Improve The Docs Did you find something that can be improved? Then [create an issue](https://github.com/impress/impress.js/issues/new) so that we can discuss it! ================================================ FILE: GettingStarted.md ================================================ # Introduction Welcome to impress.js! This presentation framework allows you to create stunning presentations with the power of CSS3 transformations. **NOTE:** This Guide is not made for you if you have never written HTML and/or CSS before. Knowing your way around in JavaScript certainly helps, but it is not a necessity. You may still continue this tutorial and try to understand what we do as you go. For more advanced and complete documentation, you might prefer the [DOCUMENTATION](DOCUMENTATION.md). # Getting started with impress.js ## Installation / acquiring the framework First of all, you need to know if you are going to have a WiFi connection when you hold your presentation. If you are not sure, please use the method where you download the file instead of the CDN. ### Including from CDN Loading the script from the CDN is quite straightforward. If you copy the example code below, you need to do nothing else; impress.js will be loaded automatically. **Direct links to different versions of the impress.js file** - V2.0.0: https://cdn.jsdelivr.net/gh/impress/impress.js@2.0.0/js/impress.js - V1.1.0: https://cdn.jsdelivr.net/gh/impress/impress.js@1.1.0/js/impress.js - Source: https://cdn.jsdelivr.net/gh/impress/impress.js/js/impress.js ### Download the file to your PC Head to the releases tab and download the source code as a zip or a tarball. Go ahead and unzip/untar it. You need to copy the folder */js/* into the folder you are working in. Optionally, to make your life a bit easier, you can also copy the */css/* folder into the same location. ## Setting up the project Open up your favorite text editor / IDE, for example, Visual Studio Code, Atom, Notepad++, ... Now, create a new file called *index.html* and create the basic HTML structure: ``` My first presentation

Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

My first Slide

``` Now, head into a file manager, navigate to the file you just created (*index.html*), and open it. You should end up in a browser where you should see "My first Slide" displayed. Since this isn't exciting, we won't change anything and will review what you just typed. What do these lines mean? Well, first things first, you should probably give your presentation a title. You may do this in normal HTML fashion by changing the *title* HTML tag. So now, we have reached the HTML body. You can see that it already belongs to a class. This class just tells impress.js that this is the body where the "fallback-message" should be displayed when it detects, that your browser does not support CSS3 and therefore impress.js won't work. You can easily omit that class though, including the "fallback-message" div with its content, if you only intend to use the presentation for yourself and you know about the fact that some browsers might not work. Now, probably the most important part of all is the *div* that belongs to the ```impress``` class. This *div* should contain all the HTML code you write, as everything outside that class will not be animated by impress.js. Finally, we load the ```impress.js``` script from your local copy (if you have one) or from the CDN, if you do not have a local copy, and execute ``` impress().init() ``` to initialize impress.js. Now, let's continue to explore more features of this amazing tool! ## Creating slides Creating slides is fairly easy. You create a *div* that belongs to the class ```step``` and you are off to the races! Let me give you an example: ```
Hello World
``` Now, if you reload the presentation, you start to see a \*slight\* problem. All your text is stacked... How do we work around that? Obviously, impress.js has an answer to it. You can add the following additional attributes to your div to make it work: Attribute | Explanation ----------------|------------ data-x | Position the element along the x-axis (from left to right) data-y | Position the element along the y-axis (from top to bottom) data-z | Position the element along the z-axis (3D-Effect, move the element behind another one) data-rotate | Rotate the element (if not using data-z!) data-rotate-x | Rotate the element along the x-axis data-rotate-y | Rotate the element along the y-axis data-rotate-z | Rotate the element along the z-axis data-scale | Scale the element. These are the basic positioning options in impress.js. All of the attributes take Strings as arguments, so be aware that you need to put quotation marks around the numbers! The *data-rotate* attributes take an angle in the form of a String as an argument. Now that you have created the slides, you might want to style them. This is where CSS comes into play. Add another file to your project called, e.g., ```style.css```. **NOTE:** Whatever you do, do not mess with the positioning and rotation of the div that belongs to the class *step*, but add a div inside of it, if you really have to mess with these properties. See the example below. Always position *steps* with the *data-* attribute! ```

Powerful, yet still simple

``` **NOTE:** You may also use negative numbers for all these properties! ## More advanced features You might want to change some default settings, like the transition speed, the width & height of the target screen, etc. This table is from the [DOCUMENTATION](DOCUMENTATION.md) and was slightly adapted. Attribute | Default | Explanation -------------------------|-----------|------------ data-transition-duration | 1000 (ms) | Speed of transition between steps. data-width | 1920 (px) | Width of target screen size. When presentation is viewed on a larger or smaller screen, impress.js will scale all content automatically. data-height | 1080 (px) | Height of target screen size. data-max-scale | 3 | Maximum scale factor. (Note that the default 1 will not increase content size on larger screens!) data-min-scale | 0 | Minimum scale factor. data-perspective | 1000 | Perspective for 3D rendering. See https://developer.mozilla.org/en/CSS/perspective ### **Renaming Steps** You can give each step an ID. The name of the ID will be displayed in the browser's navigation bar instead of the default *step-x*, where x is replaced by the current step number. This can be especially helpful when trying to jump between steps and go back to a previous one. If you want to know how to move to a specific slide, you should take a look at the [README](./src/plugins/goto/README.md) of the "Goto" plugin. # Using PLUGINS Impress.js is limited to everything we have discussed so far, along with some additional details; we won't cover them here. Check the [DOCUMENTATION](DOCUMENTATION.md) for that. impress.js has accumulated a lot of very useful plugins. You may find all of them [here](./src/plugins/)! Each Plugin has a README.md file, which you may read to get an idea of how to use it. Some plugins run unnoticed in the background, such as the *resize* plugin, which automatically resizes the presentation whenever the browser window changes size. Here, I will give you an overview of some of the plugins that impress.js includes by default. **NOTE:** As previously mentioned, if you'd like to get more info about how it works, take a look at the [DOCUMENTATION](DOCUMENTATION.md) or the README.md files of the plugins. ## [impressConsole](/src/plugins/impressConsole/README.md) This plugin opens up an additional browser tab that contains a speaker console. There you can see the current slide, the past slide, and your notes. You add notes to your presentation by adding a *div* that belongs to the class "notes" to your *div* that belongs to the class "step". ### **adding notes to your presentation** You may add notes to your presentation by adding a div of class *notes* into the div of class *step*, like so: ```
Some text that is being displayed on your slides
this won't be displayed in your presentation
``` Now that you have added the notes to your HTML, it is time to hide them. You need to add the following code to your CSS file (or in the style tag in the header): ``` .notes { display: none; } ``` To enter it, press P. ## [Goto](/src/plugins/goto/README.md) This plugin allows you to directly go to a certain step by either passing in a number or the ID of the step you'd like to go to. ## [Progress](/src/plugins/progress/README.md) This plugin, as its name implies, displays the progress in your presentation. ## [Blackout](/src/plugins/blackout/blackout.js) This plugin hides the screen when you press B, which is handy in many situations. ## Other plugins You may find the other plugins [here](/src/plugins/). It certainly helps if you familiarise yourself with the plugins. # Thank you for reading this If you want to know more, you can always read the [DOCUMENTATION](DOCUMENTATION.md) or, even better, read the Source Code and try to understand how it works! ================================================ FILE: LICENSE ================================================ The MIT License (MIT) Copyright (c) 2011-2016 Bartek Szopka Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ impress.js ============ [![CircleCI](https://circleci.com/gh/impress/impress.js.svg?style=svg)](https://circleci.com/gh/impress/impress.js) It's a presentation framework based on the power of CSS3 transforms and transitions in modern browsers and inspired by the idea behind prezi.com. **WARNING** impress.js may not help you if you have nothing interesting to say ;) HOW TO USE IT --------------- ### Getting Started Guide Check out our new [Getting Started](GettingStarted.md) guide if you want a quick introduction to the project! ### Direct download link to only impress.js You can include this link directly inside of your HTML file in its header. If you want to learn how to do this, you can find a how-to in the [Getting Started](GettingStarted.md) guide. - V2.0.0: https://cdn.jsdelivr.net/gh/impress/impress.js@2.0.0/js/impress.js - V1.1.0: https://cdn.jsdelivr.net/gh/impress/impress.js@1.1.0/js/impress.js - Source: https://cdn.jsdelivr.net/gh/impress/impress.js/js/impress.js ### Getting Started Guide Check out our new [Getting Started](GettingStarted.md) guide if you want a quick introduction to the project! ### Checking out and initializing the git repository git clone --recursive https://github.com/impress/impress.js.git cd impress.js Note: For a minimal checkout, omit the `--recursive` option. This will leave out extra plugins. **Stable releases** New features and fixes are continuously merged into the master branch, which is what the above command will check out. For the latest stable release, see the [Github Releases page](https://github.com/impress/impress.js/releases). ### Documentation Reference documentation of core impress.js features and API you can find it in [DOCUMENTATION.md](DOCUMENTATION.md). The [HTML source code](index.html) of the official [impress.js demo](http://impress.github.io/impress.js/) serves as a good example usage and contains comments explaining various features of impress.js. For more information about styling you can look into [CSS code](css/impress-demo.css) which shows how classes provided by impress.js can be used. Last but not least [JavaScript code of impress.js](js/impress.js) has some useful comments if you are interested in how everything works. Feel free to explore! ### Official demo [impress.js demo](http://impress.github.io/impress.js/) by [@bartaz](http://twitter.com/bartaz) ### Examples and demos The [Classic Slides](http://impress.github.io/impress.js/examples/classic-slides/) demo is targeted towards beginners, or can be used as a template for presentations that look like the traditional PowerPoint slide deck. Over time, it also grew into the example presentation that uses most of the features and addons available. More examples and demos can be found on [Examples and demos wiki page](http://github.com/impress/impress.js/wiki/Examples-and-demos). Feel free to add your own example presentations (or websites) there. ### Other tutorials and learning resources If you want to learn even more there is a [list of tutorials and other learning resources](https://github.com/impress/impress.js/wiki/impress.js-tutorials-and-other-learning-resources) on the wiki, too. There is also a book available about [Building impressive presentations with impress.js](http://www.packtpub.com/building-impressive-presentations-with-impressjs/book) by Rakhitha Nimesh Ratnayake. You may want to check out the sibling project [Impressionist](https://github.com/henrikingo/impressionist): a 3D GUI editor that can help you in creating impress.js presentations. ### Mailing list You're welcome to ask impress.js related questions on the [impressionist-presentations](https://groups.google.com/forum/#!forum/impressionist-presentations) mailing list. REPOSITORY STRUCTURE -------------------- * [index.html](index.html): This is the official impress.js demo, showcasing all of the features of the original impress.js, as well as some new plugins as we add them. * As already mentioned, this file is well commented and acts as the official tutorial. * [examples/](examples/): Contains several demos showcasing additional features available. * [Classic Slides](examples/classic-slides/index.html) is a simple demo that you can use as template if you want to create very simple, rectangular, PowerPoint-like presentations. * [src/](src/): The main file is [src/impress.js](src/impress.js). Additional functionality is implemented as plugins in [src/plugins/](src/plugins/). * See [src/plugins/README.md](src/plugins/README.md) for information about the plugin API and how to write plugins. * [test/](test/): Contains QUnit and Syn libraries that we use for writing tests, as well as some test coverage for core functionality. (Yes, more tests are much welcome.) Tests for plugins are in the directory of each plugin. * [js/](js/): Contains [js/impress.js](js/impress.js), which contains a concatenation of the core `src/impress.js` and all the plugins. Traditionally this is the file that you'll link to in a browser. In fact both the demo and test files do exactly that. * [css/](css/): Contains a CSS file used by the demo. This file is **not required for using impress.js** in your own presentations. Impress.js creates the CSS it needs dynamically. * [extras/](extras/) contains plugins that for various reasons aren't enabled by default. You have to explicitly add them with their own `script` element to use them. * [build.js](build.js): Simple build file that creates `js/impress.js`. It also creates a minified version `impress.min.js`, but that one is not included in the github repository. * [package.json](build.js): An NPM package specification. This was mainly added so you can easily install [buildify](https://www.npmjs.com/package/buildify) and run `node build.js`. Other than the build process, which is really just doing roughly `cat src/impress.js src/plugins/*/*.js > js/impress.js`, and testing, `impress.js` itself doesn't depend on Node or any NPM modules. WANT TO CONTRIBUTE? --------------------- For developers, once you've made changes to the code, you should run these commands for testing: npm install npm run all Note that running `firefox qunit_test_runner.html` is usually more informative than running `karma` with `npm run test`. They both run the same tests. More info about the [src/](src/) directory can be found in [src/plugins/README.md](src/plugins/README.md). ### Requirements * >= node 7.6 * npm ABOUT THE NAME ---------------- impress.js name is [courtesy of @skuzniak](http://twitter.com/skuzniak/status/143627215165333504). It's an (un)fortunate coincidence that an Open/LibreOffice presentation tool is called Impress ;) Reference API -------------- See the [Reference API](DOCUMENTATION.md) BROWSER SUPPORT ----------------- The design goal for impress.js has been to showcase awesome CSS3 features as found in modern browser versions. We also use some new DOM functionality, and specifically do not use jQuery or any other JavaScript libraries, nor our own functions, to support older browsers. In general, recent versions of Firefox and Chrome are known to work well. Reportedly IE now works too. The typical use case for impress.js is to create presentations that you present from your own laptop, with a browser version you know works well. Some people also use impress.js successfully to embed animations or presentations in a web page, however, be aware that in this some of your visitors may not see the presentation correctly, or at all. In particular, impress.js makes use of the following JS and CSS features: * [DataSet API](http://caniuse.com/#search=dataset) * [ClassList API](http://caniuse.com/#search=classlist) * [CSS 3D Transforms](http://caniuse.com/#search=css%203d) * [CSS Transitions](http://caniuse.com/#search=css%20transition) COPYRIGHT AND LICENSE --------------------- Copyright 2011-2012 Bartek Szopka (@bartaz), 2016-2023 Henrik Ingo (@henrikingo) and [70+ other contributors](https://github.com/impress/impress.js/graphs/contributors) Released under the MIT [License](LICENSE) ================================================ FILE: build.js ================================================ const fs = require('fs'); var ls = require('ls'); var path = require('path'); var Terser = require("terser"); var files = ['src/impress.js']; // Libraries from src/lib files.push('src/lib/gc.js', 'src/lib/util.js', 'src/lib/rotation.js') // Plugins from src/plugins files.push('src/plugins/autoplay/autoplay.js', 'src/plugins/blackout/blackout.js', 'src/plugins/extras/extras.js', 'src/plugins/form/form.js', 'src/plugins/fullscreen/fullscreen.js', 'src/plugins/goto/goto.js', 'src/plugins/bookmark/bookmark.js', 'src/plugins/help/help.js', 'src/plugins/impressConsole/impressConsole.js', 'src/plugins/media/media.js', 'src/plugins/mobile/mobile.js', 'src/plugins/mouse-timeout/mouse-timeout.js', 'src/plugins/navigation/navigation.js', 'src/plugins/navigation-ui/navigation-ui.js', 'src/plugins/progress/progress.js', 'src/plugins/rel/rel.js', 'src/plugins/resize/resize.js', 'src/plugins/skip/skip.js', 'src/plugins/stop/stop.js', 'src/plugins/substep/substep.js', 'src/plugins/touch/touch.js', 'src/plugins/toolbar/toolbar.js') var output = files.map((f)=>{ return fs.readFileSync(f).toString(); }).join('\n') var filename = 'js/impress.js'; fs.writeFileSync(filename, '// This file was automatically generated from files in src/ directory.\n\n' + output) console.log(filename); // terser --compress --mangle --comments '/^!/' --source-map --output js/impress.min.js js/impress.js var code = fs.readFileSync('js/impress.js').toString(); var options = { sourceMap: { filename: 'js/impress.js', url: 'js/impress.min.js.map' }, output: { comments: /^!/ } }; var result = Terser.minify({'js/impress.js': code}, options); filename = 'js/impress.min.js'; fs.writeFileSync(filename, result.code); console.log(filename); filename = 'js/impress.min.js.map'; fs.writeFileSync(filename, result.map); console.log(filename); /* Auto generate an index.html that lists all the directories under examples/ * This is useful for gh-pages, so you can link to http://impress.github.io/impress.js/examples */ var html_list = '\n' var html = '\n\nExample presentations\n\n' html += '

Example presentations

\n' + html_list html += '\n' filename = path.resolve(__dirname, 'examples', 'index.html'); fs.writeFileSync(filename, html); console.log(filename); ================================================ FILE: css/impress-common.css ================================================ /* impress.js doesn't require any particular CSS file. Each author should create their own, to achieve the visual style they want. Yet in practice many plugins will not do anything useful without CSS. (See for example mouse-timeout plugin.) This file contains sample CSS that you may want to use in your presentation. It is focused on plugin functionality, not the visual style of your presentation. */ /* Using the substep plugin, hide bullet points at first, then show them one by one. */ #impress .step .substep { opacity: 0; } #impress .step .substep.substep-visible { opacity: 1; transition: opacity 1s; } /* Speaker notes allow you to write comments within the steps, that will not be displayed as part of the presentation. However, they will be picked up and displayed by impressConsole.js when you press P. */ .notes { display: none; } /* Toolbar plugin */ .impress-enabled div#impress-toolbar { position: fixed; right: 1px; bottom: 1px; opacity: 0.6; z-index: 10; } .impress-enabled div#impress-toolbar > span { margin-right: 10px; } .impress-enabled div#impress-toolbar.impress-toolbar-show { display: block; } .impress-enabled div#impress-toolbar.impress-toolbar-hide { display: none; } /* Progress bar */ .impress-progress { position: absolute; left: 59px; bottom: 1px; text-align: left; font-size: 10pt; opacity: 0.6; } .impress-enabled .impress-progressbar { position: absolute; right: 318px; bottom: 1px; left: 118px; border-radius: 7px; border: 2px solid rgba(100, 100, 100, 0.2); } .impress-progressbar { right: 118px; } .impress-progressbar DIV { width: 0; height: 2px; border-radius: 5px; background: rgba(75, 75, 75, 0.4); transition: width 1s linear; } .impress-enabled .impress-progress { position: absolute; left: 59px; bottom: 1px; text-align: left; opacity: 0.6; } .impress-enabled #impress-help { background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5); color: #EEEEEE; font-size: 80%; position: fixed; left: 2em; bottom: 2em; width: 24em; border-radius: 1em; padding: 1em; text-align: center; z-index: 100; font-family: Verdana, Arial, Sans; } .impress-enabled #impress-help td { padding-left: 1em; padding-right: 1em; } /* We might want to hide the help, toolbar, progress and progress bar in the preView window of the impressConsole that is displayed when you press P. */ .impress-console.preView .impress-progress, .impress-console.preView .impress-progressbar, .impress-console.preView #impress-toolbar, .impress-console.preView #impress-help { display: none; } /* Hide the help in the slideView as well. */ .impress-console.slideView #impress-help { display: none; } /* With help from the mouse-timeout plugin, we can hide the toolbar and have it show only when you move/click/touch the mouse. */ body.impress-mouse-timeout div#impress-toolbar { display: none; } /* In fact, we can hide the mouse cursor itself too, when mouse isn't used. */ body.impress-mouse-timeout { cursor: none; } /* And as the last thing there is a workaround for quite strange bug. It happens a lot in Chrome. I don't remember if I've seen it in Firefox. Sometimes the element positioned in 3D (especially when it's moved back along Z axis) is not clickable, because it falls 'behind' the element. To prevent this, I decided to make non clickable by setting pointer-events property to `none` value. Value if this property is inherited, so to make everything else clickable I bring it back on the #impress element. If you want to know more about `pointer-events` here are some docs: https://developer.mozilla.org/en/CSS/pointer-events There is one very important thing to notice about this workaround - it makes everything 'unclickable' except what's in #impress element. So use it wisely ... or don't use at all. */ .impress-enabled { pointer-events: none } .impress-enabled #impress { pointer-events: auto } /*If you disable pointer-events, you need to re-enable them for the toolbar. And the speaker console while at it.*/ .impress-enabled #impress-toolbar { pointer-events: auto } .impress-enabled #impress-console-button { pointer-events: auto } /* There is one funny thing I just realized. Thanks to this workaround above everything except #impress element is invisible for click events. That means that the hint element is also not clickable. So basically all of this transforms and delayed transitions trickery was probably not needed at all... But it was fun to learn about it, wasn't it? */ ================================================ FILE: css/impress-demo.css ================================================ /* So you like the style of impress.js demo? Or maybe you are just curious how it was done? You couldn't find a better place to find out! Welcome to the stylesheet impress.js demo presentation. Please remember that it is not meant to be a part of impress.js and is not required by impress.js. I expect that anyone creating a presentation for impress.js would create their own set of styles. But feel free to read through it and learn how to get the most of what impress.js provides. And let me be your guide. Shall we begin? */ /* We start with a good ol' reset. That's the one by Eric Meyer http://meyerweb.com/eric/tools/css/reset/ You can probably argue if it is needed here, or not, but for sure it doesn't do any harm and gives us a fresh start. */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } body { line-height: 1; } ol, ul { list-style: none; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } table { border-collapse: collapse; border-spacing: 0; } /* Now here is when interesting things start to appear. We set up styles with default font and nice gradient in the background. And yes, there is a lot of repetition there because of -prefixes but we don't want to leave anybody behind. */ body { font-family: 'PT Sans', sans-serif; min-height: 740px; background: rgb(215, 215, 215); background: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 500, from(rgb(240, 240, 240)), to(rgb(190, 190, 190))); background: -webkit-radial-gradient(rgb(240, 240, 240), rgb(190, 190, 190)); background: -moz-radial-gradient(rgb(240, 240, 240), rgb(190, 190, 190)); background: -ms-radial-gradient(rgb(240, 240, 240), rgb(190, 190, 190)); background: -o-radial-gradient(rgb(240, 240, 240), rgb(190, 190, 190)); background: radial-gradient(rgb(240, 240, 240), rgb(190, 190, 190)); } /* Now let's bring some text styles back ... */ b, strong { font-weight: bold } i, em { font-style: italic } /* ... and give links a nice look. */ a { color: inherit; text-decoration: none; padding: 0 0.1em; background: rgba(255,255,255,0.5); text-shadow: -1px -1px 2px rgba(100,100,100,0.9); border-radius: 0.2em; -webkit-transition: 0.5s; -moz-transition: 0.5s; -ms-transition: 0.5s; -o-transition: 0.5s; transition: 0.5s; } a:hover, a:focus { background: rgba(255,255,255,1); text-shadow: -1px -1px 2px rgba(100,100,100,0.5); } /* Because the main point behind the impress.js demo is to demo impress.js we display a fallback message for users with browsers that don't support all the features required by it. All of the content will be still fully accessible for them, but I want them to know that they are missing something - that's what the demo is about, isn't it? And then we hide the message, when support is detected in the browser. */ .fallback-message { font-family: sans-serif; line-height: 1.3; width: 780px; padding: 10px 10px 0; margin: 20px auto; border: 1px solid #E4C652; border-radius: 10px; background: #EEDC94; } .fallback-message p { margin-bottom: 10px; } .impress-supported .fallback-message { display: none; } /* Now let's style the presentation steps. We start with basics to make sure it displays correctly in everywhere ... */ .step { position: relative; width: 900px; padding: 40px; margin: 20px auto; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box; font-family: 'PT Serif', georgia, serif; font-size: 48px; line-height: 1.5; } /* ... and we enhance the styles for impress.js. Basically we remove the margin and make inactive steps a little bit transparent. */ .impress-enabled .step { margin: 0; opacity: 0.3; -webkit-transition: opacity 1s; -moz-transition: opacity 1s; -ms-transition: opacity 1s; -o-transition: opacity 1s; transition: opacity 1s; } .impress-enabled .step.active { opacity: 1 } /* These 'slide' step styles were heavily inspired by HTML5 Slides: http://html5slides.googlecode.com/svn/trunk/styles.css ;) They cover everything what you see on first three steps of the demo. All impress.js steps are wrapped inside a div element of 0 size! This means that relative values for width and height (example: `width: 100%`) will not work. You need to use pixel values. The pixel values used here correspond to the data-width and data-height given to the #impress root element. When the presentation is viewed on a larger or smaller screen, impress.js will automatically scale the steps to fit the screen. */ .slide { display: block; width: 900px; height: 700px; padding: 40px 60px; background-color: white; border: 1px solid rgba(0, 0, 0, .3); border-radius: 10px; box-shadow: 0 2px 6px rgba(0, 0, 0, .1); color: rgb(102, 102, 102); text-shadow: 0 2px 2px rgba(0, 0, 0, .1); font-family: 'Open Sans', Arial, sans-serif; font-size: 30px; line-height: 36px; letter-spacing: -1px; } .slide q { display: block; font-size: 50px; line-height: 72px; margin-top: 100px; } .slide q strong { white-space: nowrap; } /* And now we start to style each step separately. I agree that this may be not the most efficient, object-oriented and scalable way of styling, but most of steps have quite a custom look and typography tricks here and there, so they had to be styled separately. First is the title step with a big

(no room for padding) and some 3D positioning along Z axis. */ #title { padding: 0; } #title .try { font-size: 64px; position: absolute; top: -0.5em; left: 1.5em; -webkit-transform: translateZ(20px); -moz-transform: translateZ(20px); -ms-transform: translateZ(20px); -o-transform: translateZ(20px); transform: translateZ(20px); } #title h1 { font-size: 180px; -webkit-transform: translateZ(50px); -moz-transform: translateZ(50px); -ms-transform: translateZ(50px); -o-transform: translateZ(50px); transform: translateZ(50px); } #title .footnote { font-size: 32px; } /* Second step is nothing special, just a text with a link, so it doesn't need any special styling. Let's move to 'big thoughts' with centered text and custom font sizes. */ #big { width: 600px; text-align: center; font-size: 60px; line-height: 1; } #big strong, #big b { display: block; font-size: 250px; line-height: 250px; } #big .thoughts { font-size: 90px; line-height: 150px; } /* 'Tiny ideas' just need some tiny styling. */ #tiny { width: 500px; text-align: center; } /* This step has some animated text ... */ #ing { width: 500px } /* ... so we define display to `inline-block` to enable transforms and transition duration to 0.5s ... */ #ing b { display: inline-block; -webkit-transition: 0.5s; -moz-transition: 0.5s; -ms-transition: 0.5s; -o-transition: 0.5s; transition: 0.5s; } /* ... and we want 'positioning` word to move up a bit when the step gets `present` class ... */ #ing.present .positioning { -webkit-transform: translateY(-10px); -moz-transform: translateY(-10px); -ms-transform: translateY(-10px); -o-transform: translateY(-10px); transform: translateY(-10px); } /* ... 'rotating' to rotate a quarter of a second later ... */ #ing.present .rotating { -webkit-transform: rotate(-10deg); -moz-transform: rotate(-10deg); -ms-transform: rotate(-10deg); -o-transform: rotate(-10deg); transform: rotate(-10deg); -webkit-transition-delay: 0.25s; -moz-transition-delay: 0.25s; -ms-transition-delay: 0.25s; -o-transition-delay: 0.25s; transition-delay: 0.25s; } /* ... and 'scaling' to scale down after another quarter of a second. */ #ing.present .scaling { -webkit-transform: scale(0.7); -moz-transform: scale(0.7); -ms-transform: scale(0.7); -o-transform: scale(0.7); transform: scale(0.7); -webkit-transition-delay: 0.5s; -moz-transition-delay: 0.5s; -ms-transition-delay: 0.5s; -o-transition-delay: 0.5s; transition-delay: 0.5s; } /* The 'imagination' step is again some boring font-sizing. */ #imagination { width: 600px; } #imagination .imagination { font-size: 78px; } /* There is nothing really special about 'use the source, Luke' step, too, except maybe of the Yoda background. As you can see below I've 'hard-coded' it in data URL. That's not the best way to serve images, but because that's just this one I decided it will be OK to have it this way. Just make sure you don't blindly copy this approach. */ #source { width: 700px; padding-bottom: 300px; /* Yoda Icon :: Pixel Art from Star Wars http://www.pixeljoint.com/pixelart/1423.htm */ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAEYCAMAAACwUBm+AAAAAXNSR0IArs4c6QAAAKtQTFRFsAAAvbWSLUUrLEQqY1s8UYJMqJ1vNTEgOiIdIzYhjIFVLhsXZ6lgSEIsP2U8JhcCVzMsSXZEgXdOO145XJdWOl03LzAYMk4vSXNExr+hwcuxRTs1Qmk+RW9Am49eFRANQz4pUoNMQWc+OSMDTz0wLBsCNVMxa2NBOyUDUoNNSnlEWo9VRGxAVzYFl6tXCggHbLNmMUIcHhwTXkk5f3VNRT8wUT8xAAAACQocRBWFFwAAAAF0Uk5TAEDm2GYAAAPCSURBVHja7d3JctNAFIZRMwRCCGEmzPM8z/D+T8bu/ptbXXJFdij5fMt2Wuo+2UgqxVmtttq5WVotLzBgwIABAwYMGDCn0qVqbo69psPqVpWx+1XG5iaavF8wYMCAAQMGDBgwi4DJ6Y6qkxB1HNlcN3a92gbR5P2CAQMGDBgwYMCAWSxMlrU+UY5yu2l9okfV4bAxUVbf7TJnAwMGDBgwYMCAAbMLMHeqbGR82Zy+VR1Ht81nVca6R+UdTLaU24Ruzd3qM/e4yjnAgAEDBgwYMGDA7AJMd1l/3NRdVGcj3eX/2WEhCmDGxnM7yqygu8XIPjJj8iN/MGDAgAEDBgwYMAuDGb8q0RGlLCHLv1t9qDKWn3vdNHVuEI6HPaxO9Jo3GDBgwIABAwYMmIXBdC9ShGgMk+XnkXUeuGcsP/e1+lhNnZsL/G5Vs3OAAQMGDBgwYMCAWSxMR3SzOmraG5atdy9wZKzb+vg16qyqe2FltbnAgAEDBgwYMGDALAxmTJSuN3WA76rnVca6GTnemGN1WoEBAwYMGDBgwIBZGMxUomy4+xO899V4LAg5Xnc2MGDAgAEDBgwYMGA218Wq+2K1LDqvY9xZu8zN8fICdM6btYABAwYMGDBgwIABMzfH0+pGU5afze2tXebmeAfVz+p8BQYMGDBgwIABAwbMPBzZ+oWmfJrln1273FhkbHzee9WWbw7AgAEDBgwYMGDALAKm43hcdctKgblcPamOhuXnXlY5Xs6bsW4FGyQCAwYMGDBgwIABswiYMceZKgvMo+h8mrHLTdn676rj+FEFoTtHd8MwOxEYMGDAgAEDBgyYRcBM5UhXqiymW3R3c9ARhWO/OmjqfjVZy+xEYMCAAQMGDBgwYBYG073OnCV0RFNhMhaOa9WfKmOB6XjHMN1tQmaAAQMGDBgwYMCA2VWY7vXjz1U4croAzgPztwIDBgwYMGDAgAEDZhswh035NBw59Dww3RgYMGDAgAEDBgwYMJuD6f4tXT7NUqfCdBvZLkxXdgQGDBgwYMCAAQNmt2DGj8WzwAfV/w7T/aq7mxwwYMCAAQMGDBgwuwqTOo7uTwTngflSzQ3TdaJvAwEDBgwYMGDAgAED5gSvgbyo5oHZ4Pc+gwEDBgwYMGDAgAEzhOm+5G0qTGaAAQMGDBgwYMCAAXNaMOcnls3tNwWm+zRzp54NDBgwYMCAAQMGDJh5YNL36k1TLuGvVq+qnKMbS5n7tulT9asCAwYMGDBgwIABA2ZumKuztLnjgQEDBgwYMGDAgNl5mH/4/ltKA6vBNAAAAABJRU5ErkJggg==); background-position: bottom right; background-repeat: no-repeat; } #source q { font-size: 60px; } /* And the "it's in 3D" step again brings some 3D typography - just for fun. Because we want to position elements in 3D we set transform-style to `preserve-3d` on the paragraph. It is not needed by webkit browsers, but it is in Firefox. It's hard to say which behaviour is correct as 3D transforms spec is not very clear about it. */ #its-in-3d p { -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; /* Y U need this Firefox?! */ -ms-transform-style: preserve-3d; -o-transform-style: preserve-3d; transform-style: preserve-3d; } /* Below we position each word separately along Z axis and we want it to transition to default position in 0.5s when the step gets `present` class. Quite a simple idea, but lot's of styles and prefixes. */ #its-in-3d span, #its-in-3d b { display: inline-block; -webkit-transform: translateZ(40px); -moz-transform: translateZ(40px); -ms-transform: translateZ(40px); -o-transform: translateZ(40px); transform: translateZ(40px); -webkit-transition: 0.5s; -moz-transition: 0.5s; -ms-transition: 0.5s; -o-transition: 0.5s; transition: 0.5s; } #its-in-3d .have { -webkit-transform: translateZ(-40px); -moz-transform: translateZ(-40px); -ms-transform: translateZ(-40px); -o-transform: translateZ(-40px); transform: translateZ(-40px); } #its-in-3d .you { -webkit-transform: translateZ(20px); -moz-transform: translateZ(20px); -ms-transform: translateZ(20px); -o-transform: translateZ(20px); transform: translateZ(20px); } #its-in-3d .noticed { -webkit-transform: translateZ(-40px); -moz-transform: translateZ(-40px); -ms-transform: translateZ(-40px); -o-transform: translateZ(-40px); transform: translateZ(-40px); } #its-in-3d .its { -webkit-transform: translateZ(60px); -moz-transform: translateZ(60px); -ms-transform: translateZ(60px); -o-transform: translateZ(60px); transform: translateZ(60px); } #its-in-3d .in { -webkit-transform: translateZ(-10px); -moz-transform: translateZ(-10px); -ms-transform: translateZ(-10px); -o-transform: translateZ(-10px); transform: translateZ(-10px); } #its-in-3d .footnote { font-size: 32px; -webkit-transform: translateZ(-10px); -moz-transform: translateZ(-10px); -ms-transform: translateZ(-10px); -o-transform: translateZ(-10px); transform: translateZ(-10px); } #its-in-3d.present span, #its-in-3d.present b { -webkit-transform: translateZ(0px); -moz-transform: translateZ(0px); -ms-transform: translateZ(0px); -o-transform: translateZ(0px); transform: translateZ(0px); } /* The last step is an overview. There is no content in it, so we make sure it's not visible because we want to be able to click on other steps. */ #overview { display: none } /* We also make other steps visible and give them a pointer cursor using the `impress-on-` class. */ .impress-on-overview .step { opacity: 1; cursor: pointer; } /* Now, when we have all the steps styled let's give users a hint how to navigate around the presentation. The best way to do this would be to use JavaScript, show a delayed hint for a first time users, then hide it and store a status in cookie or localStorage... But I wanted to have some CSS fun and avoid additional scripting... Let me explain it first, so maybe the transition magic will be more readable when you read the code. First of all I wanted the hint to appear only when user is idle for a while. You can't detect the 'idle' state in CSS, but I delayed a appearing of the hint by 5s using transition-delay. You also can't detect in CSS if the user is a first-time visitor, so I had to make an assumption that I'll only show the hint on the first step. And when the step is changed hide the hint, because I can assume that user already knows how to navigate. To summarize it - hint is shown when the user is on the first step for longer than 5 seconds. The other problem I had was caused by the fact that I wanted the hint to fade in and out. It can be easily achieved by transitioning the opacity property. But that also meant that the hint was always on the screen, even if totally transparent. It covered part of the screen and you couldn't correctly clicked through it. Unfortunately you cannot transition between display `block` and `none` in pure CSS, so I needed a way to not only fade out the hint but also move it out of the screen. I solved this problem by positioning the hint below the bottom of the screen with CSS transform and moving it up to show it. But I also didn't want this move to be visible. I wanted the hint only to fade in and out visually, so I delayed the fade in transition, so it starts when the hint is already in its correct position on the screen. I know, it sounds complicated ... maybe it would be easier with the code? */ .hint { /* We hide the hint until presentation is started and from browsers not supporting impress.js, as they will have a linear scrollable view ... */ display: none; /* ... and give it some fixed position and nice styles. */ position: fixed; left: 0; right: 0; bottom: 200px; background: rgba(0,0,0,0.5); color: #EEE; text-align: center; font-size: 50px; padding: 20px; z-index: 100; /* By default we don't want the hint to be visible, so we make it transparent ... */ opacity: 0; /* ... and position it below the bottom of the screen (relative to it's fixed position) */ -webkit-transform: translateY(400px); -moz-transform: translateY(400px); -ms-transform: translateY(400px); -o-transform: translateY(400px); transform: translateY(400px); /* Now let's imagine that the hint is visible and we want to fade it out and move out of the screen. So we define the transition on the opacity property with 1s duration and another transition on transform property delayed by 1s so it will happen after the fade out on opacity finished. This way user will not see the hint moving down. */ -webkit-transition: opacity 1s, -webkit-transform 0.5s 1s; -moz-transition: opacity 1s, -moz-transform 0.5s 1s; -ms-transition: opacity 1s, -ms-transform 0.5s 1s; -o-transition: opacity 1s, -o-transform 0.5s 1s; transition: opacity 1s, transform 0.5s 1s; } /* Now we 'enable' the hint when presentation is initialized ... */ .impress-enabled .hint { display: block } /* ... and we will show it when the first step (with id 'bored') is active. */ .impress-on-bored .hint { /* We remove the transparency and position the hint in its default fixed position. */ opacity: 1; -webkit-transform: translateY(0px); -moz-transform: translateY(0px); -ms-transform: translateY(0px); -o-transform: translateY(0px); transform: translateY(0px); /* Now for fade in transition we have the oposite situation from the one above. First after 4.5s delay we animate the transform property to move the hint into its correct position and after that we fade it in with opacity transition. */ -webkit-transition: opacity 1s 5s, -webkit-transform 0.5s 4.5s; -moz-transition: opacity 1s 5s, -moz-transform 0.5s 4.5s; -ms-transition: opacity 1s 5s, -ms-transform 0.5s 4.5s; -o-transition: opacity 1s 5s, -o-transform 0.5s 4.5s; transition: opacity 1s 5s, transform 0.5s 4.5s; } /* That's all I have for you in this file. Thanks for reading. I hope you enjoyed it at least as much as I enjoyed writing it for you. */ ================================================ FILE: examples/2D-navigation/css/fonts.css ================================================ /* latin-ext */ @font-face { font-family: 'Cutive Mono'; font-style: normal; font-weight: 400; src: local('Cutive Mono'), local('CutiveMono-Regular'), url(http://fonts.gstatic.com/s/cutivemono/v4/N5odNRruTwjvCM8y77PhQSYE0-AqJ3nfInTTiDXDjU4.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Cutive Mono'; font-style: normal; font-weight: 400; src: local('Cutive Mono'), local('CutiveMono-Regular'), url(http://fonts.gstatic.com/s/cutivemono/v4/N5odNRruTwjvCM8y77PhQY4P5ICox8Kq3LLUNMylGO4.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/K88pR3goAWT7BTt32Z01mxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/RjgO7rYTmqiVp7vzi-Q5URJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/LWCjsQkB6EMdfHrEVqA1KRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/xozscpT2726on7jbcb_pAhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/59ZRklaO5bWGqF5A9baEERJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/u-WUoqrET9fUeobQW7jkRRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/cJZKeOuBrn4kERxqtaUH3VtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSq-j2U0lmluP9RWlSytm3ho.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSpX5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNShWV49_lSm1NYrwo-zkhivY.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSqaRobkAwv3vxw3jMhVENGA.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSv8zf_FOSsgRmwsS7Aa9k2w.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSj0LW-43aMEzIO6XUTLjad8.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSugdm0LZdjqr5-oayXSOefg.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBjTOQ_MqJVwkKsUn0wKzc2I.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBjUj_cnvWIuuBMVgbX098Mw.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBkbcKLIaa1LC45dFaAfauRA.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBmo_sUJ8uO4YLWRInS22T3Y.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBr6up8jxqWt8HVA3mDhkV_0.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBiYE0-AqJ3nfInTTiDXDjU4.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBo4P5ICox8Kq3LLUNMylGO4.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxmgpAmOCqD37_tyH_8Ri5MM.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxsPNMTLbnS9uQzHQlYieHUU.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxgyhumQnPMBCoGYhRaNxyyY.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxhUVAXEdVvYDDqrz3aeR0Yc.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxlf4y_3s5bcYyyLIFUSWYUU.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxnywqdtBbUHn3VPgzuFrCy8.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxl2umOyRU7PgRiv8DXcgJjk.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/JX7MlXqjSJNjQvI4heMMGvY6323mHUZFJMgTvxaG2iE.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/vtwNVMP8y9C17vLvIBNZI_Y6323mHUZFJMgTvxaG2iE.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/9kaD4V2pNPMMeUVBHayd7vY6323mHUZFJMgTvxaG2iE.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/ATKpv8nLYAKUYexo8iqqrg.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/kTYfCWJhlldPf5LnG4ZnHCEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/g46X4VH_KHOWAAa-HpnGPiEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/hpORcvLZtemlH8gI-1S-7iEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/0XxGQsSc1g4rdRdjJKZrNPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/GpWpM_6S4VQLPNAQ3iWvVRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/7dSh6BcuqDLzS2qAASIeuhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/DVKQJxMmC9WF_oplMzlQqRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/PIPMHY90P7jtyjpXuZ2cLFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkK-j2U0lmluP9RWlSytm3ho.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkJX5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkD0LW-43aMEzIO6XUTLjad8.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkOgdm0LZdjqr5-oayXSOefg.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/5hX15RUpPERmeybVlLQEWBTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/fU0HAfLiPHGlZhZpY6M7dBTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/CPRt--GVMETgA6YEaoGitxTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/I-OtoJZa3TeyH6D9oli3ifesZW2xOQ-xsNqO47m55DA.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpDTOQ_MqJVwkKsUn0wKzc2I.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpDUj_cnvWIuuBMVgbX098Mw.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpCYE0-AqJ3nfInTTiDXDjU4.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpI4P5ICox8Kq3LLUNMylGO4.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/O_WhD9hODL16N4KLHLX7xSEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/3Nwg9VzlwLXPq3fNKwVRMCEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/b31S45a_TNgaBApZhTgE6CEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/03aPdn7fFF3H6ngCgAlQzPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9ede9INZm0R8ZMJUtfOsxrw.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9bpHcMS0zZe4mIYvDKG2oeM.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9RHJTnCUrjaAm2S9z52xC3Y.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9YWiMMZ7xLd792ULpGE4W_Y.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } ================================================ FILE: examples/2D-navigation/css/presentation.css ================================================ /* A common approach is to use googleapis.com to generate css for the webfonts you want to use. The downside of this approach is that you have to be online. So below I have simply saved the output of the googleapis url into a file. Then you of course also have to make sure the webfonts are locally installed to make offline usage work. For Ubuntu (or Debian) I successfully used the script from here to do that: http://www.webupd8.org/2011/01/automatically-install-all-google-web.html */ /* @import url(http://fonts.googleapis.com/css?family=Open+Sans:regular,semibold,italic,italicsemibold|PT+Sans:400,700,400italic,700italic|PT+Serif:400,700,400italic,700italic|Cutive+Mono); */ @import url(fonts.css); /* We display a fallback message for users with browsers that don't support all the features required by it. All of the content will be still fully accessible for them, but some more advanced effects would be missing. When impress.js detects that browser supports all necessary CSS3 features, the fallback-message style is hidden. */ .fallback-message { font-family: sans-serif; line-height: 1.3; width: 780px; padding: 10px 10px 0; margin: 20px auto; border: 1px solid #E4C652; border-radius: 10px; background: #EEDC94; } .fallback-message p { margin-bottom: 10px; } .impress-supported .fallback-message { display: none; } /* The body background is the bacgkround of "everything". Many impress.js tools call it the "surface". It could also be a picture or pattern, but we leave it as light gray. */ body { font-family: 'PT Sans', sans-serif; min-height: 740px; background: #aaccbb; color: #ff4466; } /* Now let's style the presentation steps. */ .step { position: relative; display: block; width: 900px; height: 700px; margin: 20px auto; padding: 40px 60px; text-shadow: 0 2px 2px rgba(0, 10, 0, .5); font-family: 'Open Sans', Arial, sans-serif; font-size: 30px; letter-spacing: -1px; } /* Make inactive steps a little bit transparent. */ .impress-enabled .step { margin: 0; opacity: 0.3; transition: opacity 1s; } .impress-enabled .step.active { opacity: 1 } h1, h2, h3 { margin-bottom: 0.5em; margin-top: 0.5em; text-align: center; } p { text-align: center; margin: 0.7em; } li { margin: 0.2em; } /* Highlight.js used for coloring pre > code blocks. */ pre > code { font-size: 14px; text-shadow: 0 0 0 rgba(0, 0, 0, 0); } /* Inline code, no Highlight.js */ code { font-family: "Cutive mono","Courier New", monospace; } a { color: inherit; text-decoration: none; padding: 0 0.1em; background: rgba(200,200,200,0.3); text-shadow: -1px 1px 2px rgba(100,100,100,0.9); border-radius: 0.2em; border-bottom: 1px solid rgba(100,100,100,0.4); border-left: 1px solid rgba(100,100,100,0.4); transition: 0.5s; } a:hover, a:focus { background: rgba(200,200,200,1); text-shadow: -1px 1px 2px rgba(100,100,100,0.5); } blockquote { font-family: 'PT Serif'; font-style: italic; font-weight: 400; } em { text-shadow: 0 2px 2px rgba(0, 0, 0, .3); } strong { text-shadow: -1px 1px 2px rgba(100,100,100,0.5); } q { font-family: 'PT Serif'; font-style: italic; font-weight: 400; text-shadow: 0 2px 2px rgba(0, 0, 0, .3); } strike { opacity: 0.7; } small { font-size: 0.4em; } img { width: 300px } /****************** Background images **********************************************/ img.bg { position: fixed; z-index: -100; opacity: 0; height: 50%; width: auto; transition: opacity 2s; } #applepie-image { left: 0px; bottom: 0px; } body.impress-on-applepie #applepie-image, body.impress-on-applepie-pro #applepie-image, body.impress-on-applepie-con #applepie-image, body.impress-on-conclusion #applepie-image, body.impress-on-overview #applepie-image { opacity: 0.7; transition: opacity 2s; } #icecream-image { right: 0px; top: 0px; } body.impress-on-icecream #icecream-image, body.impress-on-icecream-pro #icecream-image, body.impress-on-icecream-con #icecream-image, body.impress-on-conclusion #icecream-image, body.impress-on-overview #icecream-image { opacity: 0.7; transition: opacity 2s; } #crisps-image { right: 0px; bottom: 0px; } body.impress-on-crisps #crisps-image, body.impress-on-crisps-pro #crisps-image, body.impress-on-crisps-con #crisps-image, body.impress-on-conclusion #crisps-image, body.impress-on-overview #crisps-image { opacity: 0.7; transition: opacity 2s; } /*************** Slide specific things ****************************/ #image-credits { color: #779988; } ================================================ FILE: examples/2D-navigation/index.html ================================================ Desserts (2D navigation demo)

Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

2D navigation

  • Impress.js allows you to layout your presentation in a 3D space
  • The goto plugin allows you to specify non-linear navigation!
  • This demo can be navigated by
    • continuously pressing Space
    • continuously pressing Right Arrow
    • continuously pressing Down Arrow
    • (or freely, pressing Up, Down, Right, Left as you choose)
  • It's up to you to decide which is the better structure

Using bookmark hotkeys

  • The bookmark plugin also allows you to specify non-linear navigation, in a different way.
  • This demo can also be navigated by
    • pressing 1 2 3 4 5 6 7 8 9 to fast travel directly
    • pressing J J J, K K K, L L L to cycle vertically
    • pressing U U U, I I I, O O O to cycle horizontally
    • pressing Z or [ to zoom out to the full view
    • pressing 0 to come back to this text
  • It's up to you to decide which is the better structure

Choosing a treat

  • You can choose your preferred treat from:
    • Ice cream
    • Crisps
    • Apple pie
  • We will make a structured pro's & con's analysis to arrive at a conclusion

Ice cream

  • Cold
  • Creamy
  • Vanilla or flavored
  • Caramel sauce, jams & other toppings

Ice cream: Pro's

  • Great for dessert or snack
  • Great in the Summer

Ice cream: Con's

  • Not so great in the Winter
  • If you're allergic to lactose/milk
  • Diet alternatives are not real ice cream

Crisps

  • Potatoes fried in oil and salted
  • Various flavors
  • Dips
  • Can be used as ingredient in subs (Cliff Huxtable style)

Crisps: Pro's

  • Simple yet tasty concept
  • Great for snack
  • Salty / spicy (not sweet)
  • Finger food
  • Diet alternatives are often ok

Crisps: Con's

  • Commonly not used as dessert
  • Not sweet

Apple pie

  • Apple's in a pie
  • Many recipes exist. (Grandma's is the best.)
  • Vanilla sauce or cream on top

Apple pie: Pro's

  • Great for dessert
  • Or just with a cup of tea or glass of milk
  • Best when warm

Apple pie: Con's

  • I'm allergic to apple (but a small slice is worth it)
  • Not finger food

Conclusion

Can I choose all three ;-)

Image credits: reimagingerica@Flickr, mixedmolly@Flickr, stevepj2009@Flickr

================================================ FILE: examples/3D-positions/index.html ================================================ relative rotations

Demo of data-rel-position

This demo use data-rel-position="relative"
and data-rel-rotate-x/y/z
to easy 3D positioning of slides.

Front

There's two nested box here.

Inside Front
Inside Right
Right
Back
Inside Back
Inside Top
Top
Left
Inside Left
Inside Bottom
Bottom

Slide one

This is a ring of 8 slides.

It's easy constucted with data-rel-position="relative" without calculates the coordinates of all slides.

Slide two

The position of this slide is calculated as relatived position and rotation of the first slide.

The following slides don't need to set any position attributes, they are inherit from this slide.

Slide three

Slide four

Slide five

Slide six

Slide seven

Slide eight

Slide one

This is another ring of slides.

Except for the this slide, its code is just cloned from the yellow ring.

Just change the position of first slide, all the following slides are position relatived to it.

Slide two

Slide three

Slide four

Slide five

Slide six

Slide seven

Slide eight

================================================ FILE: examples/3D-rotations/css/3D-rotations.css ================================================ @import url(fonts.css); /* Fallback message */ .fallback-message { font-family: sans-serif; line-height: 1.3; width: 780px; padding: 10px 10px 0; margin: 20px auto; border: 1px solid #E4C652; border-radius: 10px; background: #EEDC94; } .fallback-message p { margin-bottom: 10px; } .impress-supported .fallback-message { display: none; } /* Body & steps */ body { font-family: 'PT Sans', sans-serif; min-height: 740px; background: #00000f; color: rgb(102, 102, 102); } .step { position: relative; width: 700px; height: 700px; padding: 40px 60px; margin: 20px auto; box-sizing: border-box; line-height: 1.5; background-color: white; border-radius: 10px; box-shadow: 0 2px 6px rgba(0, 0, 0, .1); text-shadow: 0 2px 2px rgba(0, 0, 0, .1); font-family: 'Open Sans', Arial, sans-serif; font-size: 40pt; letter-spacing: -1px; } /* Overview step has no background or border */ .overview { background-color: transparent; border: none; box-shadow: none; pointer-events: none; display: none; } .overview.active { display: block; pointer-events: auto; } /* Make inactive steps a little bit transparent. */ .impress-enabled .step { margin: 0; opacity: 0.1; transition: opacity 1s; } .impress-enabled .step.active { opacity: 1 } /* Content */ h1, h2, h3 { margin-bottom: 0.5em; margin-top: 0.5em; text-align: center; } p { margin: 0.7em; } li { margin: 0.2em; } /* Highlight.js used for coloring pre > code blocks. */ pre > code { font-size: 14px; text-shadow: 0 0 0 rgba(0, 0, 0, 0); } /* Inline code, no Highlight.js */ code { font-family: "Cutive mono","Courier New", monospace; } a { color: inherit; text-decoration: none; padding: 0 0.1em; background: rgba(200,200,200,0.2); text-shadow: -1px 1px 2px rgba(100,100,100,0.9); border-radius: 0.2em; border-bottom: 1px solid rgba(100,100,100,0.2); border-left: 1px solid rgba(100,100,100,0.2); transition: 0.5s; } a:hover, a:focus { background: rgba(200,200,200,1); text-shadow: -1px 1px 2px rgba(100,100,100,0.5); } blockquote { font-family: 'PT Serif'; font-style: italic; font-weight: 400; } em { text-shadow: 0 2px 2px rgba(0, 0, 0, .3); } strong { text-shadow: -1px 1px 2px rgba(100,100,100,0.5); } q { font-family: 'PT Serif'; font-style: italic; font-weight: 400; text-shadow: 0 2px 2px rgba(0, 0, 0, .3); } strike { opacity: 0.7; } small { font-size: 0.4em; } /* Styles specific to each step */ #overview2 { font-size: 20pt; padding-left: 200px; text-align: right; } ================================================ FILE: examples/3D-rotations/css/fonts.css ================================================ /* latin-ext */ @font-face { font-family: 'Cutive Mono'; font-style: normal; font-weight: 400; src: local('Cutive Mono'), local('CutiveMono-Regular'), url(http://fonts.gstatic.com/s/cutivemono/v4/N5odNRruTwjvCM8y77PhQSYE0-AqJ3nfInTTiDXDjU4.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Cutive Mono'; font-style: normal; font-weight: 400; src: local('Cutive Mono'), local('CutiveMono-Regular'), url(http://fonts.gstatic.com/s/cutivemono/v4/N5odNRruTwjvCM8y77PhQY4P5ICox8Kq3LLUNMylGO4.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/K88pR3goAWT7BTt32Z01mxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/RjgO7rYTmqiVp7vzi-Q5URJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/LWCjsQkB6EMdfHrEVqA1KRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/xozscpT2726on7jbcb_pAhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/59ZRklaO5bWGqF5A9baEERJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/u-WUoqrET9fUeobQW7jkRRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/cJZKeOuBrn4kERxqtaUH3VtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSq-j2U0lmluP9RWlSytm3ho.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSpX5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNShWV49_lSm1NYrwo-zkhivY.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSqaRobkAwv3vxw3jMhVENGA.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSv8zf_FOSsgRmwsS7Aa9k2w.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSj0LW-43aMEzIO6XUTLjad8.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSugdm0LZdjqr5-oayXSOefg.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBjTOQ_MqJVwkKsUn0wKzc2I.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBjUj_cnvWIuuBMVgbX098Mw.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBkbcKLIaa1LC45dFaAfauRA.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBmo_sUJ8uO4YLWRInS22T3Y.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBr6up8jxqWt8HVA3mDhkV_0.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBiYE0-AqJ3nfInTTiDXDjU4.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBo4P5ICox8Kq3LLUNMylGO4.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxmgpAmOCqD37_tyH_8Ri5MM.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxsPNMTLbnS9uQzHQlYieHUU.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxgyhumQnPMBCoGYhRaNxyyY.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxhUVAXEdVvYDDqrz3aeR0Yc.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxlf4y_3s5bcYyyLIFUSWYUU.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxnywqdtBbUHn3VPgzuFrCy8.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxl2umOyRU7PgRiv8DXcgJjk.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/JX7MlXqjSJNjQvI4heMMGvY6323mHUZFJMgTvxaG2iE.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/vtwNVMP8y9C17vLvIBNZI_Y6323mHUZFJMgTvxaG2iE.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/9kaD4V2pNPMMeUVBHayd7vY6323mHUZFJMgTvxaG2iE.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/ATKpv8nLYAKUYexo8iqqrg.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/kTYfCWJhlldPf5LnG4ZnHCEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/g46X4VH_KHOWAAa-HpnGPiEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/hpORcvLZtemlH8gI-1S-7iEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/0XxGQsSc1g4rdRdjJKZrNPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/GpWpM_6S4VQLPNAQ3iWvVRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/7dSh6BcuqDLzS2qAASIeuhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/DVKQJxMmC9WF_oplMzlQqRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/PIPMHY90P7jtyjpXuZ2cLFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkK-j2U0lmluP9RWlSytm3ho.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkJX5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkD0LW-43aMEzIO6XUTLjad8.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkOgdm0LZdjqr5-oayXSOefg.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/5hX15RUpPERmeybVlLQEWBTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/fU0HAfLiPHGlZhZpY6M7dBTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/CPRt--GVMETgA6YEaoGitxTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/I-OtoJZa3TeyH6D9oli3ifesZW2xOQ-xsNqO47m55DA.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpDTOQ_MqJVwkKsUn0wKzc2I.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpDUj_cnvWIuuBMVgbX098Mw.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpCYE0-AqJ3nfInTTiDXDjU4.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpI4P5ICox8Kq3LLUNMylGO4.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/O_WhD9hODL16N4KLHLX7xSEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/3Nwg9VzlwLXPq3fNKwVRMCEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/b31S45a_TNgaBApZhTgE6CEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/03aPdn7fFF3H6ngCgAlQzPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9ede9INZm0R8ZMJUtfOsxrw.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9bpHcMS0zZe4mIYvDKG2oeM.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9RHJTnCUrjaAm2S9z52xC3Y.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9YWiMMZ7xLd792ULpGE4W_Y.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } ================================================ FILE: examples/3D-rotations/index.html ================================================ A Study in 3D Rotations| by Henrik Ingo @henrikingo

Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

A Study in 3D Rotations

Unlike the x/y/z coordinates (aka translations), the rotate-x/y/z rotations are applied in a specific order, and order matters. This demo presentation exhibits the use of the new data-rotate- order attribute. Instead of the default "xyz" order, the steps use the reversed "zyx" order in applying rotations around each axis. Some of the steps (3 & 7), are in positions that are not possible with the default "xyz" order.

Slide one

Slide two

Slide three

Slide four

Slide five

Slide six

Slide seven

Slide eight

================================================ FILE: examples/classic-slides/css/classic-slides.css ================================================ /* A common approach is to use googleapis.com to generate css for the webfonts you want to use. The downside of this approach is that you have to be online. So below I have simply saved the output of the googleapis url into a file. Then you of course also have to make sure the webfonts are locally installed to make offline usage work. For Ubuntu (or Debian) I successfully used the script from here to do that: http://www.webupd8.org/2011/01/automatically-install-all-google-web.html */ /* @import url(https://fonts.googleapis.com/css?family=Open+Sans:regular,semibold,italic,italicsemibold|PT+Sans:400,700,400italic,700italic|PT+Serif:400,700,400italic,700italic|Cutive+Mono); */ @import url(fonts.css); /* We display a fallback message for users with browsers that don't support all the features required by it. All of the content will be still fully accessible for them, but some more advanced effects would be missing. When impress.js detects that browser supports all necessary CSS3 features, the fallback-message style is hidden. */ .fallback-message { font-family: sans-serif; line-height: 1.3; width: 780px; padding: 10px 10px 0; margin: 20px auto; border: 1px solid #E4C652; border-radius: 10px; background: #EEDC94; } .fallback-message p { margin-bottom: 10px; } .impress-supported .fallback-message { display: none; } /* The body background is the bacgkround of "everything". Many impress.js tools call it the "surface". It could also be a picture or pattern, but we leave it as light gray. */ body { font-family: 'PT Sans', sans-serif; min-height: 740px; background: rgb(215, 215, 215); color: rgb(70, 70, 70); } /* Now let's style the presentation steps. */ .step { position: relative; width: 1800px; padding: 60px; margin: 60px auto; box-sizing: border-box; font-family: 'PT Serif', georgia, serif; font-size: 60px; line-height: 1.5; } /* Make inactive steps a little bit transparent. */ .impress-enabled .step { margin: 0; opacity: 0.3; transition: opacity 1s; } .impress-enabled .step.active { opacity: 1 } /* These 'slide' step styles were heavily inspired by HTML5 Slides: http://html5slides.googlecode.com/svn/trunk/styles.css Note that we also use a background image, again just to facilitate a common feature from PowerPoint and LibreOffice worlds. In this case the background image is just the impress.js favicon - as if it were a company logo or something. */ .slide { display: block; width: 1850px; height: 1000px; padding: 40px 60px; background-image: url(../images/background.png); background-color: white; border: 2px solid rgba(0, 0, 0, .3); border-radius: 30px; box-shadow: 0 4px 8px rgba(0, 0, 0, .1); text-shadow: 0 3px 3px rgba(0, 0, 0, .2); font-family: 'Open Sans', Arial, sans-serif; font-size: 45px; letter-spacing: -2px; } .slide h1, .slide h2, .slide h3 { margin-bottom: 0.5em; margin-top: 0.5em; text-align: center; } .slide p { text-align: center; margin: 0.7em; } .slide li { margin-top: 0.2em; margin-bottom: 0.2em; margin-left: 3em; margin-right: 3em; } /* Highlight.js used for coloring pre > code blocks. */ .slide pre > code { font-size: 30px; text-shadow: 0 0 0 rgba(0, 0, 0, 0); } .slide input { font-size: 1em; } /* Inline code, no Highlight.js */ code { font-family: "Cutive mono","Courier New", monospace; } a { color: inherit; text-decoration: none; padding: 0 0.1em; background: rgba(200,200,200,0.2); text-shadow: -2px 2px 4px rgba(100,100,100,0.9); border-radius: 0.2em; border-bottom: 3px solid rgba(100,100,100,0.2); border-left: 3px solid rgba(100,100,100,0.2); transition: 0.5s; } a:hover, a:focus { background: rgba(200,200,200,1); text-shadow: -2px 2px 3px rgba(100,100,100,0.5); } blockquote { font-family: 'PT Serif'; font-style: italic; font-weight: 400; } em { text-shadow: 0 6px 6px rgba(0, 0, 0, .3); } strong { text-shadow: -3px 3px 6px rgba(100,100,100,0.5); } q { font-family: 'PT Serif'; font-style: italic; font-weight: 400; text-shadow: 0 6px 6px rgba(0, 0, 0, .3); } strike { opacity: 0.7; } small { font-size: 0.4em; } img { width: 600px } td { padding: 0.2em; } .slide .right { float: right; margin-left: 60px; margin-right: 0px; margin-top: 40px; margin-bottom: 40px; } .slide .left { float: left; margin-right: 60px; margin-left: 0px; margin-top: 40px; margin-bottom: 40px; } .slide .top { position: absolute; top: 40px; margin-bottom: 40px; margin-top: 0px; } .slide .bottom { position: absolute; bottom: 40px; margin-bottom: 0px; margin-top: 40px; } /* Specific styles for: .title slides */ .title { background-image: url(../images/background-title.png); } .title h1, .title h2, .title h3 { position: absolute; left: 90px; /* slide width is 1800px, so this is like a 5% margin on both sides */ width: 90%; text-align: center; } .title h1 { top: 50px; } .title h2 { top: 600px; } .title h3 { top: 800px; } /* Styles for animating the contents of a slide, such as a img, p, li or span element. ********/ /* fly-in class starts from a position outside the slide, then flies into it's correct position. */ .future .fly-in { transform: translateY(-2100px); opacity: 0.0; /* Make it invisible, just so it doesn't clutter some other slide that might be in the position where we moved it */ } .present .fly-in { transform: translateY(0px); opacity: 1.0; transition: 2s; } .past .fly-out { transform: translateY(2100px); opacity: 0.0; transition: 2s; } /* Fade-in/out is a straightforward fade. Give it enough seconds that all browsers render it clearly. */ .future .fade-in { opacity: 0.0; } .present .fade-in { opacity: 1.0; transition: 3s; } .past .fade-out { opacity: 0.0; transition: 3s; } /* Zoom-in. */ .future .zoom-in { transform: scale(10); opacity: 0.0; } .present .zoom-in { transform: scale(1); opacity: 1.0; transition: 3s; } .past .zoom-out { transform: scale(10); opacity: 0.0; } /* Styles for specific slides. */ /* The bar graph for Acme Inc profits */ #acme-graph-bottom { position: absolute; bottom: 100px; right: 200px; background-color: black; width: 900px; height: 3px; } /* height: is set from javascript */ #acme-graph-q1, #acme-graph-q2, #acme-graph-q3, #acme-graph-q4 { border: solid 1px black; width: 140px; margin-left: 30px; position: absolute; bottom: 100px; } #acme-graph-q1 { background-color: red; right: 900px; } #acme-graph-q2 { background-color: blue; right: 700px; } #acme-graph-q3 { background-color: green; right: 500px; } #acme-graph-q4 { background-color: purple; left: 750px; right: 300px; } /* And as the last thing there is a workaround for quite strange bug. It happens a lot in Chrome. I don't remember if I've seen it in Firefox. Sometimes the element positioned in 3D (especially when it's moved back along Z axis) is not clickable, because it falls 'behind' the element. To prevent this, I decided to make non clickable by setting pointer-events property to `none` value. Value if this property is inherited, so to make everything else clickable I bring it back on the #impress element. If you want to know more about `pointer-events` here are some docs: https://developer.mozilla.org/en/CSS/pointer-events There is one very important thing to notice about this workaround - it makes everything 'unclickable' except what's in #impress element. So use it wisely ... or don't use at all. */ .impress-enabled { pointer-events: none } .impress-enabled #impress { pointer-events: auto } .impress-enabled #impress-toolbar { pointer-events: auto } .impress-enabled #impress-console-button { pointer-events: auto } ================================================ FILE: examples/classic-slides/css/fonts.css ================================================ /* latin-ext */ @font-face { font-family: 'Cutive Mono'; font-style: normal; font-weight: 400; src: local('Cutive Mono'), local('CutiveMono-Regular'), url(http://fonts.gstatic.com/s/cutivemono/v4/N5odNRruTwjvCM8y77PhQSYE0-AqJ3nfInTTiDXDjU4.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Cutive Mono'; font-style: normal; font-weight: 400; src: local('Cutive Mono'), local('CutiveMono-Regular'), url(http://fonts.gstatic.com/s/cutivemono/v4/N5odNRruTwjvCM8y77PhQY4P5ICox8Kq3LLUNMylGO4.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/K88pR3goAWT7BTt32Z01mxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/RjgO7rYTmqiVp7vzi-Q5URJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/LWCjsQkB6EMdfHrEVqA1KRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/xozscpT2726on7jbcb_pAhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/59ZRklaO5bWGqF5A9baEERJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/u-WUoqrET9fUeobQW7jkRRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/cJZKeOuBrn4kERxqtaUH3VtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSq-j2U0lmluP9RWlSytm3ho.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSpX5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNShWV49_lSm1NYrwo-zkhivY.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSqaRobkAwv3vxw3jMhVENGA.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSv8zf_FOSsgRmwsS7Aa9k2w.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSj0LW-43aMEzIO6XUTLjad8.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSugdm0LZdjqr5-oayXSOefg.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBjTOQ_MqJVwkKsUn0wKzc2I.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBjUj_cnvWIuuBMVgbX098Mw.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBkbcKLIaa1LC45dFaAfauRA.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBmo_sUJ8uO4YLWRInS22T3Y.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBr6up8jxqWt8HVA3mDhkV_0.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBiYE0-AqJ3nfInTTiDXDjU4.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBo4P5ICox8Kq3LLUNMylGO4.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxmgpAmOCqD37_tyH_8Ri5MM.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxsPNMTLbnS9uQzHQlYieHUU.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxgyhumQnPMBCoGYhRaNxyyY.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxhUVAXEdVvYDDqrz3aeR0Yc.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxlf4y_3s5bcYyyLIFUSWYUU.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxnywqdtBbUHn3VPgzuFrCy8.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxl2umOyRU7PgRiv8DXcgJjk.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/JX7MlXqjSJNjQvI4heMMGvY6323mHUZFJMgTvxaG2iE.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/vtwNVMP8y9C17vLvIBNZI_Y6323mHUZFJMgTvxaG2iE.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/9kaD4V2pNPMMeUVBHayd7vY6323mHUZFJMgTvxaG2iE.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/ATKpv8nLYAKUYexo8iqqrg.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/kTYfCWJhlldPf5LnG4ZnHCEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/g46X4VH_KHOWAAa-HpnGPiEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/hpORcvLZtemlH8gI-1S-7iEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/0XxGQsSc1g4rdRdjJKZrNPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/GpWpM_6S4VQLPNAQ3iWvVRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/7dSh6BcuqDLzS2qAASIeuhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/DVKQJxMmC9WF_oplMzlQqRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/PIPMHY90P7jtyjpXuZ2cLFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkK-j2U0lmluP9RWlSytm3ho.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkJX5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkD0LW-43aMEzIO6XUTLjad8.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkOgdm0LZdjqr5-oayXSOefg.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/5hX15RUpPERmeybVlLQEWBTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/fU0HAfLiPHGlZhZpY6M7dBTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/CPRt--GVMETgA6YEaoGitxTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/I-OtoJZa3TeyH6D9oli3ifesZW2xOQ-xsNqO47m55DA.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpDTOQ_MqJVwkKsUn0wKzc2I.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpDUj_cnvWIuuBMVgbX098Mw.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpCYE0-AqJ3nfInTTiDXDjU4.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpI4P5ICox8Kq3LLUNMylGO4.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/O_WhD9hODL16N4KLHLX7xSEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/3Nwg9VzlwLXPq3fNKwVRMCEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/b31S45a_TNgaBApZhTgE6CEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/03aPdn7fFF3H6ngCgAlQzPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9ede9INZm0R8ZMJUtfOsxrw.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9bpHcMS0zZe4mIYvDKG2oeM.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9RHJTnCUrjaAm2S9z52xC3Y.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9YWiMMZ7xLd792ULpGE4W_Y.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } ================================================ FILE: examples/classic-slides/index.html ================================================ Classic Slides with impress.js | Simple example impress.js slide show | by Henrik Ingo @henrikingo

Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

Example Presentation:
Classic Slides

Henrik Ingo

2015

Any element with the class="notes" will not be displayed. This can be used for speaker notes. In fact, the impressConsole plugin will show it in the speaker console!

Table of Contents

Table of Contents, with links to other slides of this same presentation.

Note that instead of absolute positioning we use relative positioning, with the data-rel-x and data-rel-y attributes. This means the step is positioned relative to the foregoing step. In other words, this is equivalent to data-x="0" data-y="-3000".

A slide with text

This slide has a few paragraphs
(p element) of normal text.

Personally I like centered or even justified text, as it looks less boring. This can of course be set in the css file.

I really like the style on links in these presentations. I modified the border to be beveled, but it's mostly from @bartaz' original demo. @bartaz is the creator of impress.js.

In this slide, we don't even specify the relative position, rather that too is inherited. So this slide will again be 1000px to the right of the previous one.

Bullet points

  • A slide with bullet points. This is the first point.
  • Second point
  • Third point. Under this point we also have some sub-bullets:
    • Sub-bullet 1
    • Sub-bullet 2

A blockquote & image

Mother Teresa holding a newborn baby
Spread love everywhere you go.
Let no one ever come to you without leaving happier.

Mother Teresa

Image credit: Peta_de_Aztlan@Flickr. CC-BY 2.0

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,
strike for strikethrough and q for inline quotations.

If you're a software engineer like me, you will often use the <code> tag for monospaced inline text.

Motion effects 101

Items on the slide can

Fly in

Fade in

And zoom in

...just like in PowerPoint. Yeah, I know I'm being lame, but it was fun to learn to do this in CSS3.

This step here doesn't introduce anything new when it comes to data attributes, but you should notice in the demo that some words of this text are being animated. It's a very basic CSS transition that is applied to the elements when this step element is reached.

At the very beginning of the presentation all step elements are given the class of `future`. It means that they haven't been visited yet.

When the presentation moves to given step `future` is changed to `present` class name. That's how animation on this step works - text moves when the step has `present` class.

Finally when the step is left the `present` class is removed from the element and `past` class is added.

So basically every step element has one of three classes: `future`, `present` and `past`. Only one current step has the `present` class.

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-to to inherit relative position and rotation from the slide before previous 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 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.)

This presentation also uses speaker notes. They are not visible in the presentation, but shown in the impress console.

If you pressed P only now, this is the first time you see these notes. In fact, there has been notes on preceding slides as well. You can use the navigation controls at the bottom of the impress console to browse back to them.

And did you notice how those bullet points appear one by one as you press space/arrow? That's another plugin, called substeps.

Highlight.js


        // `init` API function that initializes (and runs) the presentation.
        var init = function () {
            if (initialized) { return; }
            execPreInitPlugins();
            
            // First we set up the viewport for mobile devices.
            // For some reason iPad goes nuts when it is not done properly.
            var meta = $("meta[name='viewport']") || document.createElement("meta");
            meta.content = "width=device-width, minimum-scale=1, maximum-scale=1, user-scalable=no";
            if (meta.parentNode !== document.head) {
                meta.name = 'viewport';
                document.head.appendChild(meta);
            }        
        

The Highlight.js library provides really nice color coding of source code. It automatically applies to any code inside a <pre><code> element.

Highlight.js is found under the extras/ directory, since it is an independent third party plugin, not really an impress.js plugin. You have to include it via it's own <link> and <script> tags.

Mermaid.js

%% This is a comment in mermaid markup graph LR A(Support for
diagrams) B[Provided by
mermaid.js] C{Already
know
mermaid?} D(Tutorial) E(Great, hope you enjoy!) A-->B B-->C C--No-->D C--Yes-->E classDef startEnd fill:#fcc,stroke:#353,stroke-width:2px; class A,D,E startEnd;

MathJax.js

Use \(\LaTeX\), MathML or AsciiMath to properly show mathematical formula.

Mermaid.js, likewise in extras/ directory, draws SVG diagrams from a MarkDown-like syntax. To learn more about it read the fine manual.
# Markdown.js * [Markdown.js](https://github.com/evilstreak/markdown-js) integration: for authors in a hurry! * ...or lazy ;-) * Jot down bullet points in *Markdown* * ...have it automatically converted to HTML * Markdown is converted into a presentation client side, in the browser. This is unlike existing tools like [Hovercraft](https://github.com/regebro/hovercraft) and markdown-impress where you generate a new html file on the command line. * [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:

Acme Inc Quarterly Profits

Q1234€
Q2255€
Q3(insert here)
Q4

More info

================================================ FILE: examples/cube/css/cube.css ================================================ @import url(fonts.css); /* Specific to this presentation */ div.step p { border: solid 2px black; border-radius: 120px; width: 170px; height: 110px; text-align: center; padding-top: 65px; background-color: black; color: white; } div.step img { border: solid 2px black; border-radius: 120px; width: 170px; height: 170px; text-align: center; background-color: black; color: white; } /* Fallback message */ .fallback-message { font-family: sans-serif; line-height: 1.3; width: 780px; padding: 10px 10px 0; margin: 20px auto; border: 1px solid #E4C652; border-radius: 10px; background: #EEDC94; } .fallback-message p { margin-bottom: 10px; } .impress-supported .fallback-message { display: none; } /* Body & steps */ body { font-family: 'PT Sans', sans-serif; min-height: 740px; background: #00000f; color: rgb(102, 102, 102); } .step { position: relative; width: 700px; height: 700px; padding: 40px 60px; margin: 20px auto; box-sizing: border-box; line-height: 1.5; background-color: white; border-radius: 10px; box-shadow: 0 2px 6px rgba(0, 0, 0, .1); text-shadow: 0 2px 2px rgba(0, 0, 0, .1); font-family: 'Open Sans', Arial, sans-serif; font-size: 30px; letter-spacing: -1px; } #overview { background-color: transparent; border: none; box-shadow: none; } h1, h2, h3 { margin-bottom: 0.5em; margin-top: 0.5em; text-align: center; } p { margin: 0.7em; } li { margin: 0.2em; } /* Highlight.js used for coloring pre > code blocks. */ pre > code { font-size: 14px; text-shadow: 0 0 0 rgba(0, 0, 0, 0); } /* Inline code, no Highlight.js */ code { font-family: "Cutive mono","Courier New", monospace; } a { color: #ddd; text-decoration: underline; } a:hover, a:focus { background: rgba(200,200,200,1); text-shadow: -1px 1px 2px rgba(100,100,100,0.5); padding: 0 0.1em; background: rgba(200,200,200,0.2); border-radius: 0.2em; border-bottom: 1px solid rgba(100,100,100,0.2); border-left: 1px solid rgba(100,100,100,0.2); } blockquote { font-family: 'PT Serif'; font-style: italic; font-weight: 400; } em { text-shadow: 0 2px 2px rgba(0, 0, 0, .3); } strong { text-shadow: -1px 1px 2px rgba(100,100,100,0.5); } q { font-family: 'PT Serif'; font-style: italic; font-weight: 400; text-shadow: 0 2px 2px rgba(0, 0, 0, .3); } strike { opacity: 0.7; } small { font-size: 0.4em; } ================================================ FILE: examples/cube/css/fonts.css ================================================ /* latin-ext */ @font-face { font-family: 'Cutive Mono'; font-style: normal; font-weight: 400; src: local('Cutive Mono'), local('CutiveMono-Regular'), url(http://fonts.gstatic.com/s/cutivemono/v4/N5odNRruTwjvCM8y77PhQSYE0-AqJ3nfInTTiDXDjU4.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Cutive Mono'; font-style: normal; font-weight: 400; src: local('Cutive Mono'), local('CutiveMono-Regular'), url(http://fonts.gstatic.com/s/cutivemono/v4/N5odNRruTwjvCM8y77PhQY4P5ICox8Kq3LLUNMylGO4.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/K88pR3goAWT7BTt32Z01mxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/RjgO7rYTmqiVp7vzi-Q5URJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/LWCjsQkB6EMdfHrEVqA1KRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/xozscpT2726on7jbcb_pAhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/59ZRklaO5bWGqF5A9baEERJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/u-WUoqrET9fUeobQW7jkRRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/cJZKeOuBrn4kERxqtaUH3VtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSq-j2U0lmluP9RWlSytm3ho.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSpX5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNShWV49_lSm1NYrwo-zkhivY.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSqaRobkAwv3vxw3jMhVENGA.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSv8zf_FOSsgRmwsS7Aa9k2w.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSj0LW-43aMEzIO6XUTLjad8.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSugdm0LZdjqr5-oayXSOefg.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBjTOQ_MqJVwkKsUn0wKzc2I.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBjUj_cnvWIuuBMVgbX098Mw.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBkbcKLIaa1LC45dFaAfauRA.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBmo_sUJ8uO4YLWRInS22T3Y.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBr6up8jxqWt8HVA3mDhkV_0.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBiYE0-AqJ3nfInTTiDXDjU4.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBo4P5ICox8Kq3LLUNMylGO4.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxmgpAmOCqD37_tyH_8Ri5MM.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxsPNMTLbnS9uQzHQlYieHUU.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxgyhumQnPMBCoGYhRaNxyyY.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxhUVAXEdVvYDDqrz3aeR0Yc.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxlf4y_3s5bcYyyLIFUSWYUU.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxnywqdtBbUHn3VPgzuFrCy8.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxl2umOyRU7PgRiv8DXcgJjk.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/JX7MlXqjSJNjQvI4heMMGvY6323mHUZFJMgTvxaG2iE.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/vtwNVMP8y9C17vLvIBNZI_Y6323mHUZFJMgTvxaG2iE.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/9kaD4V2pNPMMeUVBHayd7vY6323mHUZFJMgTvxaG2iE.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/ATKpv8nLYAKUYexo8iqqrg.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/kTYfCWJhlldPf5LnG4ZnHCEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/g46X4VH_KHOWAAa-HpnGPiEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/hpORcvLZtemlH8gI-1S-7iEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/0XxGQsSc1g4rdRdjJKZrNPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/GpWpM_6S4VQLPNAQ3iWvVRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/7dSh6BcuqDLzS2qAASIeuhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/DVKQJxMmC9WF_oplMzlQqRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/PIPMHY90P7jtyjpXuZ2cLFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkK-j2U0lmluP9RWlSytm3ho.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkJX5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkD0LW-43aMEzIO6XUTLjad8.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkOgdm0LZdjqr5-oayXSOefg.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/5hX15RUpPERmeybVlLQEWBTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/fU0HAfLiPHGlZhZpY6M7dBTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/CPRt--GVMETgA6YEaoGitxTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/I-OtoJZa3TeyH6D9oli3ifesZW2xOQ-xsNqO47m55DA.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpDTOQ_MqJVwkKsUn0wKzc2I.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpDUj_cnvWIuuBMVgbX098Mw.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpCYE0-AqJ3nfInTTiDXDjU4.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpI4P5ICox8Kq3LLUNMylGO4.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/O_WhD9hODL16N4KLHLX7xSEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/3Nwg9VzlwLXPq3fNKwVRMCEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/b31S45a_TNgaBApZhTgE6CEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/03aPdn7fFF3H6ngCgAlQzPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9ede9INZm0R8ZMJUtfOsxrw.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9bpHcMS0zZe4mIYvDKG2oeM.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9RHJTnCUrjaAm2S9z52xC3Y.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9YWiMMZ7xLd792ULpGE4W_Y.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } ================================================ FILE: examples/cube/index.html ================================================ Cube | Explore impress.js in 3D | by Henrik Ingo @henrikingo

Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

Slides

In

3D

Check

impress.js

out

CSS

Positioning

is

amazing

By

hingo

Henrik Ingo portrait, with mustache

bartaz

+70 contributors

Open

Source

&

HTML

CSS

JavaScript

================================================ FILE: examples/index.html ================================================ Example presentations

Example presentations

================================================ FILE: examples/markdown/css/devopsy.css ================================================ /***** Menu where this style is selected *****/ .devopsy .css-menu-devopsy { border: solid 1px #aaaaaa; } /***** Presentation *****/ body.devopsy { background: #000; } .devopsy .step { color: #ffff00; } /***** Styles *****/ .devopsy h1, .devopsy h2, .devopsy h3 { color: #ff6600; } .devopsy a { color: #00ffff; } .devopsy blockquote { text-shadow: 3px 3px 3px rgba(255, 100, 0, .7); } .devopsy em { text-shadow: 3px 3px 3px rgba(255, 100, 0, .7); } .devopsy strong { text-shadow: 3px 3px 3px rgba(255, 100, 0, .7); } .devopsy q { text-shadow: 3px 3px 3px rgba(255, 100, 0, .7); } .devopsy strike { opacity: 0.7; } ================================================ FILE: examples/markdown/css/effects.css ================================================ /***** Menu where this style is selected *****/ .effects .css-menu-effects { border: solid 1px #aaaaaa; } /***** Presentation *****/ body.effects { font-family: 'PT Sans', sans-serif; min-height: 740px; background: #dde5dd; } .effects .step { } /* Color effect. */ .effects .past > *, .effects .future > * { color: inherit; transition: 3s; } .effects .present > * { color: rgb(200, 102, 102); transition: 3s; } /* Fly right */ .effects .past h1, .effects .future h1 { transform: scale(3); transition: 1s; } .effects .present h1 { transform: scale(1); transition: 1s; } ================================================ FILE: examples/markdown/css/fonts.css ================================================ /* latin-ext */ @font-face { font-family: 'Cutive Mono'; font-style: normal; font-weight: 400; src: local('Cutive Mono'), local('CutiveMono-Regular'), url(http://fonts.gstatic.com/s/cutivemono/v4/N5odNRruTwjvCM8y77PhQSYE0-AqJ3nfInTTiDXDjU4.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Cutive Mono'; font-style: normal; font-weight: 400; src: local('Cutive Mono'), local('CutiveMono-Regular'), url(http://fonts.gstatic.com/s/cutivemono/v4/N5odNRruTwjvCM8y77PhQY4P5ICox8Kq3LLUNMylGO4.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/K88pR3goAWT7BTt32Z01mxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/RjgO7rYTmqiVp7vzi-Q5URJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/LWCjsQkB6EMdfHrEVqA1KRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/xozscpT2726on7jbcb_pAhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/59ZRklaO5bWGqF5A9baEERJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/u-WUoqrET9fUeobQW7jkRRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v13/cJZKeOuBrn4kERxqtaUH3VtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSq-j2U0lmluP9RWlSytm3ho.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSpX5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNShWV49_lSm1NYrwo-zkhivY.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSqaRobkAwv3vxw3jMhVENGA.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSv8zf_FOSsgRmwsS7Aa9k2w.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSj0LW-43aMEzIO6XUTLjad8.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(http://fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSugdm0LZdjqr5-oayXSOefg.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBjTOQ_MqJVwkKsUn0wKzc2I.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBjUj_cnvWIuuBMVgbX098Mw.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBkbcKLIaa1LC45dFaAfauRA.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBmo_sUJ8uO4YLWRInS22T3Y.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBr6up8jxqWt8HVA3mDhkV_0.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBiYE0-AqJ3nfInTTiDXDjU4.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 400; src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v13/xjAJXh38I15wypJXxuGMBo4P5ICox8Kq3LLUNMylGO4.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxmgpAmOCqD37_tyH_8Ri5MM.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxsPNMTLbnS9uQzHQlYieHUU.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* greek-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxgyhumQnPMBCoGYhRaNxyyY.woff2) format('woff2'); unicode-range: U+1F00-1FFF; } /* greek */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxhUVAXEdVvYDDqrz3aeR0Yc.woff2) format('woff2'); unicode-range: U+0370-03FF; } /* vietnamese */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxlf4y_3s5bcYyyLIFUSWYUU.woff2) format('woff2'); unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; } /* latin-ext */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxnywqdtBbUHn3VPgzuFrCy8.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'Open Sans'; font-style: italic; font-weight: 600; src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url(http://fonts.gstatic.com/s/opensans/v13/PRmiXeptR36kaC0GEAetxl2umOyRU7PgRiv8DXcgJjk.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/JX7MlXqjSJNjQvI4heMMGvY6323mHUZFJMgTvxaG2iE.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/vtwNVMP8y9C17vLvIBNZI_Y6323mHUZFJMgTvxaG2iE.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/9kaD4V2pNPMMeUVBHayd7vY6323mHUZFJMgTvxaG2iE.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 400; src: local('PT Sans'), local('PTSans-Regular'), url(http://fonts.gstatic.com/s/ptsans/v8/ATKpv8nLYAKUYexo8iqqrg.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/kTYfCWJhlldPf5LnG4ZnHCEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/g46X4VH_KHOWAAa-HpnGPiEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/hpORcvLZtemlH8gI-1S-7iEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: normal; font-weight: 700; src: local('PT Sans Bold'), local('PTSans-Bold'), url(http://fonts.gstatic.com/s/ptsans/v8/0XxGQsSc1g4rdRdjJKZrNPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/GpWpM_6S4VQLPNAQ3iWvVRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/7dSh6BcuqDLzS2qAASIeuhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/DVKQJxMmC9WF_oplMzlQqRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 400; src: local('PT Sans Italic'), local('PTSans-Italic'), url(http://fonts.gstatic.com/s/ptsans/v8/PIPMHY90P7jtyjpXuZ2cLFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkK-j2U0lmluP9RWlSytm3ho.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkJX5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkD0LW-43aMEzIO6XUTLjad8.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Sans'; font-style: italic; font-weight: 700; src: local('PT Sans Bold Italic'), local('PTSans-BoldItalic'), url(http://fonts.gstatic.com/s/ptsans/v8/lILlYDvubYemzYzN7GbLkOgdm0LZdjqr5-oayXSOefg.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/5hX15RUpPERmeybVlLQEWBTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/fU0HAfLiPHGlZhZpY6M7dBTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/CPRt--GVMETgA6YEaoGitxTbgVql8nDJpwnrE27mub0.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 400; src: local('PT Serif'), local('PTSerif-Regular'), url(http://fonts.gstatic.com/s/ptserif/v8/I-OtoJZa3TeyH6D9oli3ifesZW2xOQ-xsNqO47m55DA.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpDTOQ_MqJVwkKsUn0wKzc2I.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpDUj_cnvWIuuBMVgbX098Mw.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpCYE0-AqJ3nfInTTiDXDjU4.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: normal; font-weight: 700; src: local('PT Serif Bold'), local('PTSerif-Bold'), url(http://fonts.gstatic.com/s/ptserif/v8/QABk9IxT-LFTJ_dQzv7xpI4P5ICox8Kq3LLUNMylGO4.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/O_WhD9hODL16N4KLHLX7xSEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/3Nwg9VzlwLXPq3fNKwVRMCEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/b31S45a_TNgaBApZhTgE6CEAvth_LlrfE80CYdSH47w.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 400; src: local('PT Serif Italic'), local('PTSerif-Italic'), url(http://fonts.gstatic.com/s/ptserif/v8/03aPdn7fFF3H6ngCgAlQzPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } /* cyrillic-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9ede9INZm0R8ZMJUtfOsxrw.woff2) format('woff2'); unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; } /* cyrillic */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9bpHcMS0zZe4mIYvDKG2oeM.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } /* latin-ext */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9RHJTnCUrjaAm2S9z52xC3Y.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; } /* latin */ @font-face { font-family: 'PT Serif'; font-style: italic; font-weight: 700; src: local('PT Serif Bold Italic'), local('PTSerif-BoldItalic'), url(http://fonts.gstatic.com/s/ptserif/v8/Foydq9xJp--nfYIx2TBz9YWiMMZ7xLd792ULpGE4W_Y.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; } ================================================ FILE: examples/markdown/css/markdown-slides.css ================================================ /***** Fonts *****/ /* @import url(http://fonts.googleapis.com/css?family=Open+Sans:regular,semibold,italic,italicsemibold|PT+Sans:400,700,400italic,700italic|PT+Serif:400,700,400italic,700italic|Cutive+Mono); */ @import url(fonts.css); /***** Fallback message *****/ .fallback-message { font-family: sans-serif; line-height: 1.3; width: 780px; padding: 10px 10px 0; margin: 20px auto; border: 1px solid #E4C652; border-radius: 10px; background: #EEDC94; } .fallback-message p { margin-bottom: 10px; } .impress-supported .fallback-message { display: none; } /***** Per slide hacks *****/ div#step-4 > p:last-child { margin-top: 150px; font-size: 0.5em; text-align: right; } div#tilted-slide { text-shadow: 20px 20px 10px rgba(0, 0, 0, .4); } div#tilted-slide h1 { margin-top: 200px; } /***** Menu where this style is selected *****/ .css-menu-bw { border: solid 1px rgb(102, 102, 102); } .effects .css-menu-bw, .devopsy .css-menu-bw { border: none; } /***** Presentation *****/ body { font-family: 'PT Sans', sans-serif; min-height: 740px; background: #fff; } .step { position: relative; width: 900px; height: 700px; padding: 40px 60px; margin: 20px auto; box-sizing: border-box; color: rgb(102, 102, 102); text-shadow: 0 2px 2px rgba(0, 0, 0, .1); font-family: 'Open Sans', Arial, sans-serif; font-size: 30px; letter-spacing: -1px; line-height: 1.5; } /* Make inactive steps a little bit transparent. */ .impress-enabled .step { margin: 0; opacity: 0.3; transition: opacity 1s; } .impress-enabled .step.active { opacity: 1 } h1, h2, h3 { margin-bottom: 0.5em; margin-top: 0.5em; text-align: center; } p { margin: 0.7em; } li { margin: 0.2em; } /* Highlight.js used for coloring pre > code blocks. */ pre > code { font-size: 14px; text-shadow: 0 0 0 rgba(0, 0, 0, 0); } /* Inline code, no Highlight.js */ code { font-family: "Cutive mono","Courier New", monospace; } a { color: inherit; text-decoration: none; padding: 0 0.1em; text-shadow: -1px 1px 2px rgba(100,100,100,0.9); border-radius: 0.2em; transition: 0.5s; } a:hover, a:focus { text-shadow: -1px 1px 2px rgba(100,100,100,0.5); } blockquote { font-family: 'PT Serif'; font-style: italic; font-weight: 400; } em { text-shadow: 0 2px 2px rgba(0, 0, 0, .3); } strong { text-shadow: -1px 1px 2px rgba(100,100,100,0.5); } q { font-family: 'PT Serif'; font-style: italic; font-weight: 400; text-shadow: 0 2px 2px rgba(0, 0, 0, .3); } strike { opacity: 0.7; } img { width: 300px; float: right; margin-left: 40px; margin-right: 0px; margin-top: 20px; margin-bottom: 20px; } /* Specific styles for: .title steps */ .title h1, .title h2, .title h3 { position: absolute; left: 45px; /* slide width is 900px, so this is like a 5% margin on both sides */ width: 90%; text-align: center; } .title h1 { top: 50px; } .title h2 { top: 400px; } .title h3 { top: 500px; } ================================================ FILE: examples/markdown/index.html ================================================ Markdown in impress.js | by Henrik Ingo @henrikingo

Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

# Markdown ## to author Impress.js presentations * This presentation was written entirely in Markdown * Added by popular request * Easy way to make quick, simple yet aesthetic, presentations * Authoring without all the clutter of HTML ----- # Markdown.js * Provided by [Markdown.js](https://github.com/evilstreak/markdown-js) in [extras/](https://github.com/impress/impress.js/tree/master/extras) * Jot down your bullet points in *Markdown* & have it automatically converted to HTML * Note: The Markdown is converted into a presentation client side, in the browser. This is unlike existing tools like [Hovercraft](https://github.com/regebro/hovercraft) and markdown-impress where you generate a new html file on the command line. * This combines the ease of typing Markdown with the full power of impress.js HTML5+CSS3+JavaScript! ----- # Styles * You can use *italics* & **bold** * ...and `code` ----- # A blockquote & image ![Mother Teresa holding a newborn baby](images/3476636111_c551295ca4_b.jpg) > Spread love everywhere you go. > Let no one ever come to you without leaving happier. *-- Mother Teresa* Image credit: [Peta de Aztlan](https://www.flickr.com/photos/peta-de-aztlan/3476636111/)@Flickr. CC-BY 2.0 ----- # Code When also using [Highlight.js](https://highlightjs.org/) integration, code blocks in Markdown are converted to HTML first, then colored by Highlight.js: // `init` API function that initializes (and runs) the presentation. var init = function () { if (initialized) { return; } execPreInitPlugins(); // First we set up the viewport for mobile devices. // For some reason iPad goes nuts when it is not done properly. var meta = $("meta[name='viewport']") || document.createElement("meta"); meta.content = "width=device-width, minimum-scale=1, maximum-scale=1, user-scalable=no"; if (meta.parentNode !== document.head) { meta.name = 'viewport'; document.head.appendChild(meta); } ----- # Slide separator * 5 dashes are used to separate slides: `-----` * Attributes from `div.step` element are simply repeated. * Better use relative positioning, lest your slides will all be on top of each other. * If you need to set some attributes, just use HTML and create a div element, then write Markdown inside each div.
# Title slide ## This slide has different CSS class than the previous ones
# Simplicity of Markdown & Full power of Impress.js * This slide sets its own `rotate`, `x`, `y`, and even `z` coordinates * Note that the Mother Teresa slide earlier was pimped with some custom CSS, all the while the content was written in simple Markdown.
This is an example of a slide with a specific Markdown dialect. ===============================================================

CSS & JavaScript magic

Just to emphasize my point, this last slide allows you to use a JavaScript powered menu to toggle the CSS style:

Black & white, Devopsy, Effects overload

Simplicity of Markdown married with full power of Impress.js!

================================================ FILE: index.html ================================================ impress.js | presentation tool based on the power of CSS3 transforms and transitions in modern browsers | by Bartek Szopka @bartaz

Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

Aren’t you just bored with all those slides-based presentations?
Don’t you think that presentations given in modern browsers shouldn’t copy the limits of ‘classic’ slide decks?
Would you like to impress your audience with stunning visualization of your talk?
then you should try

impress.js*

* no rhyme intended

It’s a presentation tool
inspired by the idea behind prezi.com
and based on the power of CSS3 transforms and transitions in modern browsers.

visualize your big thoughts

and tiny ideas

by positioning, rotating and scaling them on an infinite canvas

the only limit is your imagination

want to know more?

use the source, Luke!

one more thing...

have you noticed it’s in 3D*?

* beat that, prezi ;)

Use a spacebar or arrow keys to navigate.
Press 'P' to launch speaker console.

================================================ FILE: js/impress.js ================================================ // This file was automatically generated from files in src/ directory. /*! Licensed under MIT License - http://github.com/impress/impress.js */ /** * impress.js * * impress.js is a presentation tool based on the power of CSS3 transforms and transitions * in modern browsers and inspired by the idea behind prezi.com. * * * Copyright 2011-2012 Bartek Szopka (@bartaz), 2016-2023 Henrik Ingo (@henrikingo) * and 70+ other contributors * * Released under the MIT License. * * ------------------------------------------------ * author: Bartek Szopka, Henrik Ingo * version: 2.0.0 * url: http://impress.js.org * source: http://github.com/impress/impress.js/ */ // You are one of those who like to know how things work inside? // Let me show you the cogs that make impress.js run... ( function( document, window ) { "use strict"; var lib; // HELPER FUNCTIONS // `pfx` is a function that takes a standard CSS property name as a parameter // and returns it's prefixed version valid for current browser it runs in. // The code is heavily inspired by Modernizr http://www.modernizr.com/ var pfx = ( function() { var style = document.createElement( "dummy" ).style, prefixes = "Webkit Moz O ms Khtml".split( " " ), memory = {}; return function( prop ) { if ( typeof memory[ prop ] === "undefined" ) { var ucProp = prop.charAt( 0 ).toUpperCase() + prop.substr( 1 ), props = ( prop + " " + prefixes.join( ucProp + " " ) + ucProp ).split( " " ); memory[ prop ] = null; for ( var i in props ) { if ( style[ props[ i ] ] !== undefined ) { memory[ prop ] = props[ i ]; break; } } } return memory[ prop ]; }; } )(); var validateOrder = function( order, fallback ) { var validChars = "xyz"; var returnStr = ""; if ( typeof order === "string" ) { for ( var i in order.split( "" ) ) { if ( validChars.indexOf( order[ i ] ) >= 0 ) { returnStr += order[ i ]; // Each of x,y,z can be used only once. validChars = validChars.split( order[ i ] ).join( "" ); } } } if ( returnStr ) { return returnStr; } else if ( fallback !== undefined ) { return fallback; } else { return "xyz"; } }; // `css` function applies the styles given in `props` object to the element // given as `el`. It runs all property names through `pfx` function to make // sure proper prefixed version of the property is used. var css = function( el, props ) { var key, pkey; for ( key in props ) { if ( props.hasOwnProperty( key ) ) { pkey = pfx( key ); if ( pkey !== null ) { el.style[ pkey ] = props[ key ]; } } } return el; }; // `translate` builds a translate transform string for given data. var translate = function( t ) { return " translate3d(" + t.x + "px," + t.y + "px," + t.z + "px) "; }; // `rotate` builds a rotate transform string for given data. // By default the rotations are in X Y Z order that can be reverted by passing `true` // as second parameter. var rotate = function( r, revert ) { var order = r.order ? r.order : "xyz"; var css = ""; var axes = order.split( "" ); if ( revert ) { axes = axes.reverse(); } for ( var i = 0; i < axes.length; i++ ) { css += " rotate" + axes[ i ].toUpperCase() + "(" + r[ axes[ i ] ] + "deg)"; } return css; }; // `scale` builds a scale transform string for given data. var scale = function( s ) { return " scale(" + s + ") "; }; // `computeWindowScale` counts the scale factor between window size and size // defined for the presentation in the config. var computeWindowScale = function( config ) { var hScale = window.innerHeight / config.height, wScale = window.innerWidth / config.width, scale = hScale > wScale ? wScale : hScale; if ( config.maxScale && scale > config.maxScale ) { scale = config.maxScale; } if ( config.minScale && scale < config.minScale ) { scale = config.minScale; } return scale; }; // CHECK SUPPORT var body = document.body; var impressSupported = // Browser should support CSS 3D transtorms ( pfx( "perspective" ) !== null ) && // And `classList` and `dataset` APIs ( body.classList ) && ( body.dataset ); if ( !impressSupported ) { // We can't be sure that `classList` is supported body.className += " impress-not-supported "; } // GLOBALS AND DEFAULTS // This is where the root elements of all impress.js instances will be kept. // Yes, this means you can have more than one instance on a page, but I'm not // sure if it makes any sense in practice ;) var roots = {}; var preInitPlugins = []; var preStepLeavePlugins = []; // Some default config values. var defaults = { width: 1920, height: 1080, maxScale: 3, minScale: 0, perspective: 1000, transitionDuration: 1000 }; // Configuration options var config = null; // It's just an empty function ... and a useless comment. var empty = function() { return false; }; // IMPRESS.JS API // And that's where interesting things will start to happen. // It's the core `impress` function that returns the impress.js API // for a presentation based on the element with given id ("impress" // by default). var impress = window.impress = function( rootId ) { // If impress.js is not supported by the browser return a dummy API // it may not be a perfect solution but we return early and avoid // running code that may use features not implemented in the browser. if ( !impressSupported ) { return { init: empty, goto: empty, prev: empty, next: empty, swipe: empty, tear: empty, lib: {} }; } rootId = rootId || "impress"; // If given root is already initialized just return the API if ( roots[ "impress-root-" + rootId ] ) { return roots[ "impress-root-" + rootId ]; } // The gc library depends on being initialized before we do any changes to DOM. lib = initLibraries( rootId ); body.classList.remove( "impress-not-supported" ); body.classList.add( "impress-supported" ); // Data of all presentation steps var stepsData = {}; // Element of currently active step var activeStep = null; // Current state (position, rotation and scale) of the presentation var currentState = null; // Array of step elements var steps = null; // Scale factor of the browser window var windowScale = null; // Root presentation elements var root = lib.util.byId( rootId ); var canvas = document.createElement( "div" ); var initialized = false; // STEP EVENTS // // There are currently two step events triggered by impress.js // `impress:stepenter` is triggered when the step is shown on the // screen (the transition from the previous one is finished) and // `impress:stepleave` is triggered when the step is left (the // transition to next step just starts). // Reference to last entered step var lastEntered = null; // `onStepEnter` is called whenever the step element is entered // but the event is triggered only if the step is different than // last entered step. // We sometimes call `goto`, and therefore `onStepEnter`, just to redraw a step, such as // after screen resize. In this case - more precisely, in any case - we trigger a // `impress:steprefresh` event. var onStepEnter = function( step ) { if ( lastEntered !== step ) { lib.util.triggerEvent( step, "impress:stepenter" ); lastEntered = step; } lib.util.triggerEvent( step, "impress:steprefresh" ); }; // `onStepLeave` is called whenever the currentStep element is left // but the event is triggered only if the currentStep is the same as // lastEntered step. var onStepLeave = function( currentStep, nextStep ) { if ( lastEntered === currentStep ) { lib.util.triggerEvent( currentStep, "impress:stepleave", { next: nextStep } ); lastEntered = null; } }; // `initStep` initializes given step element by reading data from its // data attributes and setting correct styles. var initStep = function( el, idx ) { var data = el.dataset, step = { translate: { x: lib.util.toNumberAdvanced( data.x ), y: lib.util.toNumberAdvanced( data.y ), z: lib.util.toNumberAdvanced( data.z ) }, rotate: { x: lib.util.toNumber( data.rotateX ), y: lib.util.toNumber( data.rotateY ), z: lib.util.toNumber( data.rotateZ || data.rotate ), order: validateOrder( data.rotateOrder ) }, scale: lib.util.toNumber( data.scale, 1 ), transitionDuration: lib.util.toNumber( data.transitionDuration, config.transitionDuration ), el: el }; if ( !el.id ) { el.id = "step-" + ( idx + 1 ); } stepsData[ "impress-" + el.id ] = step; css( el, { position: "absolute", transform: "translate(-50%,-50%)" + translate( step.translate ) + rotate( step.rotate ) + scale( step.scale ), transformStyle: "preserve-3d" } ); }; // Initialize all steps. // Read the data-* attributes, store in internal stepsData, and render with CSS. var initAllSteps = function() { steps = lib.util.$$( ".step", root ); steps.forEach( initStep ); }; // Build configuration from root and defaults var buildConfig = function() { var rootData = root.dataset; return { width: lib.util.toNumber( rootData.width, defaults.width ), height: lib.util.toNumber( rootData.height, defaults.height ), maxScale: lib.util.toNumber( rootData.maxScale, defaults.maxScale ), minScale: lib.util.toNumber( rootData.minScale, defaults.minScale ), perspective: lib.util.toNumber( rootData.perspective, defaults.perspective ), transitionDuration: lib.util.toNumber( rootData.transitionDuration, defaults.transitionDuration ) }; }; // `init` API function that initializes (and runs) the presentation. var init = function() { if ( initialized ) { return; } // Initialize the configuration object, so it can be used by pre-init plugins. config = buildConfig(); execPreInitPlugins( root ); // First we set up the viewport for mobile devices. // For some reason iPad goes nuts when it is not done properly. var meta = lib.util.$( "meta[name='viewport']" ) || document.createElement( "meta" ); meta.content = "width=device-width, minimum-scale=1, maximum-scale=1, user-scalable=no"; if ( meta.parentNode !== document.head ) { meta.name = "viewport"; document.head.appendChild( meta ); } windowScale = computeWindowScale( config ); // Wrap steps with "canvas" element lib.util.arrayify( root.childNodes ).forEach( function( el ) { canvas.appendChild( el ); } ); root.appendChild( canvas ); // Set initial styles document.documentElement.style.height = "100%"; css( body, { height: "100%", overflow: "hidden" } ); var rootStyles = { position: "absolute", transformOrigin: "top left", transition: "all 0s ease-in-out", transformStyle: "preserve-3d" }; css( root, rootStyles ); css( root, { top: "50%", left: "50%", perspective: ( config.perspective / windowScale ) + "px", transform: scale( windowScale ) } ); css( canvas, rootStyles ); body.classList.remove( "impress-disabled" ); body.classList.add( "impress-enabled" ); // Get and init steps initAllSteps(); // Set a default initial state of the canvas currentState = { translate: { x: 0, y: 0, z: 0 }, rotate: { x: 0, y: 0, z: 0, order: "xyz" }, scale: 1 }; initialized = true; lib.util.triggerEvent( root, "impress:init", { api: roots[ "impress-root-" + rootId ] } ); }; // `getStep` is a helper function that returns a step element defined by parameter. // If a number is given, step with index given by the number is returned, if a string // is given step element with such id is returned, if DOM element is given it is returned // if it is a correct step element. var getStep = function( step ) { if ( typeof step === "number" ) { step = step < 0 ? steps[ steps.length + step ] : steps[ step ]; } else if ( typeof step === "string" ) { step = lib.util.byId( step ); } return ( step && step.id && stepsData[ "impress-" + step.id ] ) ? step : null; }; // Used to reset timeout for `impress:stepenter` event var stepEnterTimeout = null; // `goto` API function that moves to step given as `el` parameter (by index, id or element). // `duration` optionally given as second parameter, is the transition duration in css. // `reason` is the string "next", "prev" or "goto" (default) and will be made available to // preStepLeave plugins. // `origEvent` may contain event that caused the call to goto, such as a key press event var goto = function( el, duration, reason, origEvent ) { reason = reason || "goto"; origEvent = origEvent || null; if ( !initialized ) { return false; } // Re-execute initAllSteps for each transition. This allows to edit step attributes // dynamically, such as change their coordinates, or even remove or add steps, and have // that change apply when goto() is called. initAllSteps(); if ( !( el = getStep( el ) ) ) { return false; } // Sometimes it's possible to trigger focus on first link with some keyboard action. // Browser in such a case tries to scroll the page to make this element visible // (even that body overflow is set to hidden) and it breaks our careful positioning. // // So, as a lousy (and lazy) workaround we will make the page scroll back to the top // whenever slide is selected // // If you are reading this and know any better way to handle it, I'll be glad to hear // about it! window.scrollTo( 0, 0 ); var step = stepsData[ "impress-" + el.id ]; duration = ( duration !== undefined ? duration : step.transitionDuration ); // If we are in fact moving to another step, start with executing the registered // preStepLeave plugins. if ( activeStep && activeStep !== el ) { var event = { target: activeStep, detail: {} }; event.detail.next = el; event.detail.transitionDuration = duration; event.detail.reason = reason; if ( origEvent ) { event.origEvent = origEvent; } if ( execPreStepLeavePlugins( event ) === false ) { // PreStepLeave plugins are allowed to abort the transition altogether, by // returning false. // see stop and substep plugins for an example of doing just that return false; } // Plugins are allowed to change the detail values el = event.detail.next; step = stepsData[ "impress-" + el.id ]; duration = event.detail.transitionDuration; } if ( activeStep ) { activeStep.classList.remove( "active" ); body.classList.remove( "impress-on-" + activeStep.id ); } el.classList.add( "active" ); body.classList.add( "impress-on-" + el.id ); // Compute target state of the canvas based on given step var target = { rotate: { x: -step.rotate.x, y: -step.rotate.y, z: -step.rotate.z, order: step.rotate.order }, translate: { x: -step.translate.x, y: -step.translate.y, z: -step.translate.z }, scale: 1 / step.scale }; // Check if the transition is zooming in or not. // // This information is used to alter the transition style: // when we are zooming in - we start with move and rotate transition // and the scaling is delayed, but when we are zooming out we start // with scaling down and move and rotation are delayed. var zoomin = target.scale >= currentState.scale; duration = lib.util.toNumber( duration, config.transitionDuration ); var delay = ( duration / 2 ); // If the same step is re-selected, force computing window scaling, // because it is likely to be caused by window resize if ( el === activeStep ) { windowScale = computeWindowScale( config ); } var targetScale = target.scale * windowScale; // Trigger leave of currently active element (if it's not the same step again) if ( activeStep && activeStep !== el ) { onStepLeave( activeStep, el ); } // Now we alter transforms of `root` and `canvas` to trigger transitions. // // And here is why there are two elements: `root` and `canvas` - they are // being animated separately: // `root` is used for scaling and `canvas` for translate and rotations. // Transitions on them are triggered with different delays (to make // visually nice and "natural" looking transitions), so we need to know // that both of them are finished. css( root, { // To keep the perspective look similar for different scales // we need to "scale" the perspective, too // For IE 11 support we must specify perspective independent // of transform. perspective: ( config.perspective / targetScale ) + "px", transform: scale( targetScale ), transitionDuration: duration + "ms", transitionDelay: ( zoomin ? delay : 0 ) + "ms" } ); css( canvas, { transform: rotate( target.rotate, true ) + translate( target.translate ), transitionDuration: duration + "ms", transitionDelay: ( zoomin ? 0 : delay ) + "ms" } ); // Here is a tricky part... // // If there is no change in scale or no change in rotation and translation, it means // there was actually no delay - because there was no transition on `root` or `canvas` // elements. We want to trigger `impress:stepenter` event in the correct moment, so // here we compare the current and target values to check if delay should be taken into // account. // // I know that this `if` statement looks scary, but it's pretty simple when you know // what is going on - it's simply comparing all the values. if ( currentState.scale === target.scale || ( currentState.rotate.x === target.rotate.x && currentState.rotate.y === target.rotate.y && currentState.rotate.z === target.rotate.z && currentState.translate.x === target.translate.x && currentState.translate.y === target.translate.y && currentState.translate.z === target.translate.z ) ) { delay = 0; } // Store current state currentState = target; activeStep = el; // And here is where we trigger `impress:stepenter` event. // We simply set up a timeout to fire it taking transition duration (and possible delay) // into account. // // I really wanted to make it in more elegant way. The `transitionend` event seemed to // be the best way to do it, but the fact that I'm using transitions on two separate // elements and that the `transitionend` event is only triggered when there was a // transition (change in the values) caused some bugs and made the code really // complicated, cause I had to handle all the conditions separately. And it still // needed a `setTimeout` fallback for the situations when there is no transition at all. // So I decided that I'd rather make the code simpler than use shiny new // `transitionend`. // // If you want learn something interesting and see how it was done with `transitionend` // go back to version 0.5.2 of impress.js: // http://github.com/bartaz/impress.js/blob/0.5.2/js/impress.js window.clearTimeout( stepEnterTimeout ); stepEnterTimeout = window.setTimeout( function() { onStepEnter( activeStep ); }, duration + delay ); return el; }; // `prev` API function goes to previous step (in document order) // `event` is optional, may contain the event that caused the need to call prev() var prev = function( origEvent ) { var prev = steps.indexOf( activeStep ) - 1; prev = prev >= 0 ? steps[ prev ] : steps[ steps.length - 1 ]; return goto( prev, undefined, "prev", origEvent ); }; // `next` API function goes to next step (in document order) // `event` is optional, may contain the event that caused the need to call next() var next = function( origEvent ) { var next = steps.indexOf( activeStep ) + 1; next = next < steps.length ? steps[ next ] : steps[ 0 ]; return goto( next, undefined, "next", origEvent ); }; // Swipe for touch devices by @and3rson. // Below we extend the api to control the animation between the currently // active step and a presumed next/prev step. See touch plugin for // an example of using this api. // Helper function var interpolate = function( a, b, k ) { return a + ( b - a ) * k; }; // Animate a swipe. // // Pct is a value between -1.0 and +1.0, designating the current length // of the swipe. // // If pct is negative, swipe towards the next() step, if positive, // towards the prev() step. // // Note that pre-stepleave plugins such as goto can mess with what is a // next() and prev() step, so we need to trigger the pre-stepleave event // here, even if a swipe doesn't guarantee that the transition will // actually happen. // // Calling swipe(), with any value of pct, won't in itself cause a // transition to happen, this is just to animate the swipe. Once the // transition is committed - such as at a touchend event - caller is // responsible for also calling prev()/next() as appropriate. // // Note: For now, this function is made available to be used by the swipe plugin (which // is the UI counterpart to this). It is a semi-internal API and intentionally not // documented in DOCUMENTATION.md. var swipe = function( pct ) { if ( Math.abs( pct ) > 1 ) { return; } // Prepare & execute the preStepLeave event var event = { target: activeStep, detail: {} }; event.detail.swipe = pct; // Will be ignored within swipe animation, but just in case a plugin wants to read this, // humor them event.detail.transitionDuration = config.transitionDuration; var idx; // Needed by jshint if ( pct < 0 ) { idx = steps.indexOf( activeStep ) + 1; event.detail.next = idx < steps.length ? steps[ idx ] : steps[ 0 ]; event.detail.reason = "next"; } else if ( pct > 0 ) { idx = steps.indexOf( activeStep ) - 1; event.detail.next = idx >= 0 ? steps[ idx ] : steps[ steps.length - 1 ]; event.detail.reason = "prev"; } else { // No move return; } if ( execPreStepLeavePlugins( event ) === false ) { // If a preStepLeave plugin wants to abort the transition, don't animate a swipe // For stop, this is probably ok. For substep, the plugin it self might want to do // some animation, but that's not the current implementation. return false; } var nextElement = event.detail.next; var nextStep = stepsData[ "impress-" + nextElement.id ]; // If the same step is re-selected, force computing window scaling, var nextScale = nextStep.scale * windowScale; var k = Math.abs( pct ); var interpolatedStep = { translate: { x: interpolate( currentState.translate.x, -nextStep.translate.x, k ), y: interpolate( currentState.translate.y, -nextStep.translate.y, k ), z: interpolate( currentState.translate.z, -nextStep.translate.z, k ) }, rotate: { x: interpolate( currentState.rotate.x, -nextStep.rotate.x, k ), y: interpolate( currentState.rotate.y, -nextStep.rotate.y, k ), z: interpolate( currentState.rotate.z, -nextStep.rotate.z, k ), // Unfortunately there's a discontinuity if rotation order changes. Nothing I // can do about it? order: k < 0.7 ? currentState.rotate.order : nextStep.rotate.order }, scale: interpolate( currentState.scale * windowScale, nextScale, k ) }; css( root, { // To keep the perspective look similar for different scales // we need to 'scale' the perspective, too perspective: config.perspective / interpolatedStep.scale + "px", transform: scale( interpolatedStep.scale ), transitionDuration: "0ms", transitionDelay: "0ms" } ); css( canvas, { transform: rotate( interpolatedStep.rotate, true ) + translate( interpolatedStep.translate ), transitionDuration: "0ms", transitionDelay: "0ms" } ); }; // Teardown impress // Resets the DOM to the state it was before impress().init() was called. // (If you called impress(rootId).init() for multiple different rootId's, then you must // also call tear() once for each of them.) var tear = function() { lib.gc.teardown(); delete roots[ "impress-root-" + rootId ]; }; // Adding some useful classes to step elements. // // All the steps that have not been shown yet are given `future` class. // When the step is entered the `future` class is removed and the `present` // class is given. When the step is left `present` class is replaced with // `past` class. // // So every step element is always in one of three possible states: // `future`, `present` and `past`. // // There classes can be used in CSS to style different types of steps. // For example the `present` class can be used to trigger some custom // animations when step is shown. lib.gc.addEventListener( root, "impress:init", function() { // STEP CLASSES steps.forEach( function( step ) { step.classList.add( "future" ); } ); lib.gc.addEventListener( root, "impress:stepenter", function( event ) { event.target.classList.remove( "past" ); event.target.classList.remove( "future" ); event.target.classList.add( "present" ); }, false ); lib.gc.addEventListener( root, "impress:stepleave", function( event ) { event.target.classList.remove( "present" ); event.target.classList.add( "past" ); }, false ); }, false ); // Adding hash change support. lib.gc.addEventListener( root, "impress:init", function() { // Last hash detected var lastHash = ""; // `#/step-id` is used instead of `#step-id` to prevent default browser // scrolling to element in hash. // // And it has to be set after animation finishes, because in Chrome it // makes transition laggy. // BUG: http://code.google.com/p/chromium/issues/detail?id=62820 lib.gc.addEventListener( root, "impress:stepenter", function( event ) { window.location.hash = lastHash = "#/" + event.target.id; }, false ); lib.gc.addEventListener( window, "hashchange", function() { // When the step is entered hash in the location is updated // (just few lines above from here), so the hash change is // triggered and we would call `goto` again on the same element. // // To avoid this we store last entered hash and compare. if ( window.location.hash !== lastHash ) { goto( lib.util.getElementFromHash() ); } }, false ); // START // by selecting step defined in url or first step of the presentation goto( lib.util.getElementFromHash() || steps[ 0 ], 0 ); }, false ); body.classList.add( "impress-disabled" ); // Store and return API for given impress.js root element return ( roots[ "impress-root-" + rootId ] = { init: init, goto: goto, next: next, prev: prev, swipe: swipe, tear: tear, lib: lib } ); }; // Flag that can be used in JS to check if browser have passed the support test impress.supported = impressSupported; // ADD and INIT LIBRARIES // Library factories are defined in src/lib/*.js, and register themselves by calling // impress.addLibraryFactory(libraryFactoryObject). They're stored here, and used to augment // the API with library functions when client calls impress(rootId). // See src/lib/README.md for clearer example. // (Advanced usage: For different values of rootId, a different instance of the libaries are // generated, in case they need to hold different state for different root elements.) var libraryFactories = {}; impress.addLibraryFactory = function( obj ) { for ( var libname in obj ) { if ( obj.hasOwnProperty( libname ) ) { libraryFactories[ libname ] = obj[ libname ]; } } }; // Call each library factory, and return the lib object that is added to the api. var initLibraries = function( rootId ) { //jshint ignore:line var lib = {}; for ( var libname in libraryFactories ) { if ( libraryFactories.hasOwnProperty( libname ) ) { if ( lib[ libname ] !== undefined ) { throw "impress.js ERROR: Two libraries both tried to use libname: " + libname; } lib[ libname ] = libraryFactories[ libname ]( rootId ); } } return lib; }; // `addPreInitPlugin` allows plugins to register a function that should // be run (synchronously) at the beginning of init, before // impress().init() itself executes. impress.addPreInitPlugin = function( plugin, weight ) { weight = parseInt( weight ) || 10; if ( weight <= 0 ) { throw "addPreInitPlugin: weight must be a positive integer"; } if ( preInitPlugins[ weight ] === undefined ) { preInitPlugins[ weight ] = []; } preInitPlugins[ weight ].push( plugin ); }; // Called at beginning of init, to execute all pre-init plugins. var execPreInitPlugins = function( root ) { //jshint ignore:line for ( var i = 0; i < preInitPlugins.length; i++ ) { var thisLevel = preInitPlugins[ i ]; if ( thisLevel !== undefined ) { for ( var j = 0; j < thisLevel.length; j++ ) { thisLevel[ j ]( root, roots[ "impress-root-" + root.id ] ); } } } }; // `addPreStepLeavePlugin` allows plugins to register a function that should // be run (synchronously) at the beginning of goto() impress.addPreStepLeavePlugin = function( plugin, weight ) { //jshint ignore:line weight = parseInt( weight ) || 10; if ( weight <= 0 ) { throw "addPreStepLeavePlugin: weight must be a positive integer"; } if ( preStepLeavePlugins[ weight ] === undefined ) { preStepLeavePlugins[ weight ] = []; } preStepLeavePlugins[ weight ].push( plugin ); }; impress.getConfig = function() { return config; }; // Called at beginning of goto(), to execute all preStepLeave plugins. var execPreStepLeavePlugins = function( event ) { //jshint ignore:line for ( var i = 0; i < preStepLeavePlugins.length; i++ ) { var thisLevel = preStepLeavePlugins[ i ]; if ( thisLevel !== undefined ) { for ( var j = 0; j < thisLevel.length; j++ ) { if ( thisLevel[ j ]( event ) === false ) { // If a plugin returns false, the stepleave event (and related transition) // is aborted return false; } } } } }; } )( document, window ); // THAT'S ALL FOLKS! // // Thanks for reading it all. // Or thanks for scrolling down and reading the last part. // // I've learnt a lot when building impress.js and I hope this code and comments // will help somebody learn at least some part of it. /** * Garbage collection utility * * This library allows plugins to add elements and event listeners they add to the DOM. The user * can call `impress().lib.gc.teardown()` to cause all of them to be removed from DOM, so that * the document is in the state it was before calling `impress().init()`. * * In addition to just adding elements and event listeners to the garbage collector, plugins * can also register callback functions to do arbitrary cleanup upon teardown. * * Henrik Ingo (c) 2016 * MIT License */ ( function( document, window ) { "use strict"; var roots = []; var rootsCount = 0; var startingState = { roots: [] }; var libraryFactory = function( rootId ) { if ( roots[ rootId ] ) { return roots[ rootId ]; } // Per root global variables (instance variables?) var elementList = []; var eventListenerList = []; var callbackList = []; recordStartingState( rootId ); // LIBRARY FUNCTIONS // Definitions of the library functions we return as an object at the end // `pushElement` adds a DOM element to the gc stack var pushElement = function( element ) { elementList.push( element ); }; // `appendChild` is a convenience wrapper that combines DOM appendChild with gc.pushElement var appendChild = function( parent, element ) { parent.appendChild( element ); pushElement( element ); }; // `pushEventListener` adds an event listener to the gc stack var pushEventListener = function( target, type, listenerFunction ) { eventListenerList.push( { target:target, type:type, listener:listenerFunction } ); }; // `addEventListener` combines DOM addEventListener with gc.pushEventListener var addEventListener = function( target, type, listenerFunction ) { target.addEventListener( type, listenerFunction ); pushEventListener( target, type, listenerFunction ); }; // `pushCallback` If the above utilities are not enough, plugins can add their own callback // function to do arbitrary things. var pushCallback = function( callback ) { callbackList.push( callback ); }; pushCallback( function( rootId ) { resetStartingState( rootId ); } ); // `teardown` will // - execute all callbacks in LIFO order // - call `removeChild` on all DOM elements in LIFO order // - call `removeEventListener` on all event listeners in LIFO order // The goal of a teardown is to return to the same state that the DOM was before // `impress().init()` was called. var teardown = function() { // Execute the callbacks in LIFO order var i; // Needed by jshint for ( i = callbackList.length - 1; i >= 0; i-- ) { callbackList[ i ]( rootId ); } callbackList = []; for ( i = 0; i < elementList.length; i++ ) { elementList[ i ].parentElement.removeChild( elementList[ i ] ); } elementList = []; for ( i = 0; i < eventListenerList.length; i++ ) { var target = eventListenerList[ i ].target; var type = eventListenerList[ i ].type; var listener = eventListenerList[ i ].listener; target.removeEventListener( type, listener ); } }; var lib = { pushElement: pushElement, appendChild: appendChild, pushEventListener: pushEventListener, addEventListener: addEventListener, pushCallback: pushCallback, teardown: teardown }; roots[ rootId ] = lib; rootsCount++; return lib; }; // Let impress core know about the existence of this library window.impress.addLibraryFactory( { gc: libraryFactory } ); // CORE INIT // The library factory (gc(rootId)) is called at the beginning of impress(rootId).init() // For the purposes of teardown(), we can use this as an opportunity to save the state // of a few things in the DOM in their virgin state, before impress().init() did anything. // Note: These could also be recorded by the code in impress.js core as these values // are changed, but in an effort to not deviate too much from upstream, I'm adding // them here rather than the core itself. var recordStartingState = function( rootId ) { startingState.roots[ rootId ] = {}; startingState.roots[ rootId ].steps = []; // Record whether the steps have an id or not var steps = document.getElementById( rootId ).querySelectorAll( ".step" ); for ( var i = 0; i < steps.length; i++ ) { var el = steps[ i ]; startingState.roots[ rootId ].steps.push( { el: el, id: el.getAttribute( "id" ) } ); } // In the rare case of multiple roots, the following is changed on first init() and // reset at last tear(). if ( rootsCount === 0 ) { startingState.body = {}; // It is customary for authors to set body.class="impress-not-supported" as a starting // value, which can then be removed by impress().init(). But it is not required. // Remember whether it was there or not. if ( document.body.classList.contains( "impress-not-supported" ) ) { startingState.body.impressNotSupported = true; } else { startingState.body.impressNotSupported = false; } // If there's a element, its contents will be overwritten by init var metas = document.head.querySelectorAll( "meta" ); for ( i = 0; i < metas.length; i++ ) { var m = metas[ i ]; if ( m.name === "viewport" ) { startingState.meta = m.content; } } } }; // CORE TEARDOWN var resetStartingState = function( rootId ) { // Reset body element document.body.classList.remove( "impress-enabled" ); document.body.classList.remove( "impress-disabled" ); var root = document.getElementById( rootId ); var activeId = root.querySelector( ".active" ).id; document.body.classList.remove( "impress-on-" + activeId ); document.documentElement.style.height = ""; document.body.style.height = ""; document.body.style.overflow = ""; // Remove style values from the root and step elements // Note: We remove the ones set by impress.js core. Otoh, we didn't preserve any original // values. A more sophisticated implementation could keep track of original values and then // reset those. var steps = root.querySelectorAll( ".step" ); for ( var i = 0; i < steps.length; i++ ) { steps[ i ].classList.remove( "future" ); steps[ i ].classList.remove( "past" ); steps[ i ].classList.remove( "present" ); steps[ i ].classList.remove( "active" ); steps[ i ].style.position = ""; steps[ i ].style.transform = ""; steps[ i ].style[ "transform-style" ] = ""; } root.style.position = ""; root.style[ "transform-origin" ] = ""; root.style.transition = ""; root.style[ "transform-style" ] = ""; root.style.top = ""; root.style.left = ""; root.style.transform = ""; // Reset id of steps ("step-1" id's are auto generated) steps = startingState.roots[ rootId ].steps; var step; while ( step = steps.pop() ) { if ( step.id === null ) { step.el.removeAttribute( "id" ); } else { step.el.setAttribute( "id", step.id ); } } delete startingState.roots[ rootId ]; // Move step div elements away from canvas, then delete canvas // Note: There's an implicit assumption here that the canvas div is the only child element // of the root div. If there would be something else, it's gonna be lost. var canvas = root.firstChild; var canvasHTML = canvas.innerHTML; root.innerHTML = canvasHTML; if ( roots[ rootId ] !== undefined ) { delete roots[ rootId ]; rootsCount--; } if ( rootsCount === 0 ) { // In the rare case that more than one impress root elements were initialized, these // are only reset when all are uninitialized. document.body.classList.remove( "impress-supported" ); if ( startingState.body.impressNotSupported ) { document.body.classList.add( "impress-not-supported" ); } // We need to remove or reset the meta element inserted by impress.js var metas = document.head.querySelectorAll( "meta" ); for ( i = 0; i < metas.length; i++ ) { var m = metas[ i ]; if ( m.name === "viewport" ) { if ( startingState.meta !== undefined ) { m.content = startingState.meta; } else { m.parentElement.removeChild( m ); } } } } }; } )( document, window ); /** * Common utility functions * * Copyright 2011-2012 Bartek Szopka (@bartaz) * Henrik Ingo (c) 2016 * MIT License */ ( function( document, window ) { "use strict"; var roots = []; var libraryFactory = function( rootId ) { if ( roots[ rootId ] ) { return roots[ rootId ]; } // `$` returns first element for given CSS `selector` in the `context` of // the given element or whole document. var $ = function( selector, context ) { context = context || document; return context.querySelector( selector ); }; // `$$` return an array of elements for given CSS `selector` in the `context` of // the given element or whole document. var $$ = function( selector, context ) { context = context || document; return arrayify( context.querySelectorAll( selector ) ); }; // `arrayify` takes an array-like object and turns it into real Array // to make all the Array.prototype goodness available. var arrayify = function( a ) { return [].slice.call( a ); }; // `byId` returns element with given `id` - you probably have guessed that ;) var byId = function( id ) { return document.getElementById( id ); }; // `getElementFromHash` returns an element located by id from hash part of // window location. var getElementFromHash = function() { // Get id from url # by removing `#` or `#/` from the beginning, // so both "fallback" `#slide-id` and "enhanced" `#/slide-id` will work var encoded = window.location.hash.replace( /^#\/?/, "" ); return byId( decodeURIComponent( encoded ) ); }; // `getUrlParamValue` return a given URL parameter value if it exists // `undefined` if it doesn't exist var getUrlParamValue = function( parameter ) { var chunk = window.location.search.split( parameter + "=" )[ 1 ]; var value = chunk && chunk.split( "&" )[ 0 ]; if ( value !== "" ) { return value; } }; // Throttling function calls, by Remy Sharp // http://remysharp.com/2010/07/21/throttling-function-calls/ var throttle = function( fn, delay ) { var timer = null; return function() { var context = this, args = arguments; window.clearTimeout( timer ); timer = window.setTimeout( function() { fn.apply( context, args ); }, delay ); }; }; // `toNumber` takes a value given as `numeric` parameter and tries to turn // it into a number. If it is not possible it returns 0 (or other value // given as `fallback`). var toNumber = function( numeric, fallback ) { return isNaN( numeric ) ? ( fallback || 0 ) : Number( numeric ); }; /** * Extends toNumber() to correctly compute also relative-to-screen-size values 5w and 5h. * * Returns the computed value in pixels with w/h postfix removed. */ var toNumberAdvanced = function( numeric, fallback ) { if ( typeof numeric !== "string" ) { return toNumber( numeric, fallback ); } var ratio = numeric.match( /^([+-]*[\d\.]+)([wh])$/ ); if ( ratio == null ) { return toNumber( numeric, fallback ); } else { var value = parseFloat( ratio[ 1 ] ); var config = window.impress.getConfig(); var multiplier = ratio[ 2 ] === "w" ? config.width : config.height; return value * multiplier; } }; // `triggerEvent` builds a custom DOM event with given `eventName` and `detail` data // and triggers it on element given as `el`. var triggerEvent = function( el, eventName, detail ) { var event = document.createEvent( "CustomEvent" ); event.initCustomEvent( eventName, true, true, detail ); el.dispatchEvent( event ); }; var lib = { $: $, $$: $$, arrayify: arrayify, byId: byId, getElementFromHash: getElementFromHash, throttle: throttle, toNumber: toNumber, toNumberAdvanced: toNumberAdvanced, triggerEvent: triggerEvent, getUrlParamValue: getUrlParamValue }; roots[ rootId ] = lib; return lib; }; // Let impress core know about the existence of this library window.impress.addLibraryFactory( { util: libraryFactory } ); } )( document, window ); /** * Helper functions for rotation. * * Tommy Tam (c) 2021 * MIT License */ ( function( document, window ) { "use strict"; // Singleton library variables var roots = []; var libraryFactory = function( rootId ) { if ( roots[ "impress-root-" + rootId ] ) { return roots[ "impress-root-" + rootId ]; } /** * Round the number to 2 decimals, it's enough for use */ var roundNumber = function( num ) { return Math.round( ( num + Number.EPSILON ) * 100 ) / 100; }; /** * Get the length/norm of a vector. * * https://en.wikipedia.org/wiki/Norm_(mathematics) */ var vectorLength = function( vec ) { return Math.sqrt( vec.x * vec.x + vec.y * vec.y + vec.z * vec.z ); }; /** * Dot product of two vectors. * * https://en.wikipedia.org/wiki/Dot_product */ var vectorDotProd = function( vec1, vec2 ) { return vec1.x * vec2.x + vec1.y * vec2.y + vec1.z * vec2.z; }; /** * Cross product of two vectors. * * https://en.wikipedia.org/wiki/Cross_product */ var vectorCrossProd = function( vec1, vec2 ) { return { x: vec1.y * vec2.z - vec1.z * vec2.y, y: vec1.z * vec2.x - vec1.x * vec2.z, z: vec1.x * vec2.y - vec1.y * vec2.x }; }; /** * Determine wheter a vector is a zero vector */ var isZeroVector = function( vec ) { return !roundNumber( vec.x ) && !roundNumber( vec.y ) && !roundNumber( vec.z ); }; /** * Scalar triple product of three vectors. * * It can be used to determine the handness of vectors. * * https://en.wikipedia.org/wiki/Triple_product#Scalar_triple_product */ var tripleProduct = function( vec1, vec2, vec3 ) { return vectorDotProd( vectorCrossProd( vec1, vec2 ), vec3 ); }; /** * The world/absolute unit coordinates. * * This coordinate is used by browser to position objects. * It will not be affected by object rotations. * All relative positions will finally be converted to this * coordinate to be used. */ var worldUnitCoordinate = { x: { x:1, y:0, z:0 }, y: { x:0, y:1, z:0 }, z: { x:0, y:0, z:1 } }; /** * Make quaternion from rotation axis and angle. * * q = [ cos(½θ), sin(½θ) axis ] * * If the angle is zero, returns the corresponded quaternion * of axis. * * If the angle is not zero, returns the rotating quaternion * which corresponds to rotation about the axis, by the angle θ. * * https://en.wikipedia.org/wiki/Quaternion * https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation */ var makeQuaternion = function( axis, theta = 0 ) { var r = 0; var t = 1; if ( theta ) { var radians = theta * Math.PI / 180; r = Math.cos( radians / 2 ); t = Math.sin( radians / 2 ) / vectorLength( axis ); } var q = [ r, axis.x * t, axis.y * t, axis.z * t ]; return q; }; /** * Extract vector from quaternion */ var quaternionToVector = function( quaternion ) { return { x: roundNumber( quaternion[ 1 ] ), y: roundNumber( quaternion[ 2 ] ), z: roundNumber( quaternion[ 3 ] ) }; }; /** * Returns the conjugate quaternion of a quaternion * * https://en.wikipedia.org/wiki/Quaternion#Conjugation,_the_norm,_and_reciprocal */ var conjugateQuaternion = function( quaternion ) { return [ quaternion[ 0 ], -quaternion[ 1 ], -quaternion[ 2 ], -quaternion[ 3 ] ]; }; /** * Left multiple two quaternion. * * Is's used to combine two rotating quaternion into one. */ var leftMulQuaternion = function( q1, q2 ) { return [ ( q1[ 0 ] * q2[ 0 ] - q1[ 1 ] * q2[ 1 ] - q1[ 2 ] * q2[ 2 ] - q1[ 3 ] * q2[ 3 ] ), ( q1[ 1 ] * q2[ 0 ] + q1[ 0 ] * q2[ 1 ] - q1[ 3 ] * q2[ 2 ] + q1[ 2 ] * q2[ 3 ] ), ( q1[ 2 ] * q2[ 0 ] + q1[ 3 ] * q2[ 1 ] + q1[ 0 ] * q2[ 2 ] - q1[ 1 ] * q2[ 3 ] ), ( q1[ 3 ] * q2[ 0 ] - q1[ 2 ] * q2[ 1 ] + q1[ 1 ] * q2[ 2 ] + q1[ 0 ] * q2[ 3 ] ) ]; }; /** * Convert a rotation into a quaternion */ var rotationToQuaternion = function( baseCoordinate, rotation ) { var order = rotation.order ? rotation.order : "xyz"; var axes = order.split( "" ); var result = [ 1, 0, 0, 0 ]; for ( var i = 0; i < axes.length; i++ ) { var deg = rotation[ axes[ i ] ]; if ( !deg || ( Math.abs( deg ) < 0.0001 ) ) { continue; } // All CSS rotation is based on the rotated coordinate // So we need to calculate the rotated coordinate first var coordinate = baseCoordinate; if ( i > 0 ) { coordinate = { x: rotateByQuaternion( baseCoordinate.x, result ), y: rotateByQuaternion( baseCoordinate.y, result ), z: rotateByQuaternion( baseCoordinate.z, result ) }; } result = leftMulQuaternion( makeQuaternion( coordinate[ axes[ i ] ], deg ), result ); } return result; }; /** * Rotate a vector by a quaternion. */ var rotateByQuaternion = function( vec, quaternion ) { var q = makeQuaternion( vec ); q = leftMulQuaternion( leftMulQuaternion( quaternion, q ), conjugateQuaternion( quaternion ) ); return quaternionToVector( q ); }; /** * Rotate a vector by rotaion sequence. */ var rotateVector = function( baseCoordinate, vec, rotation ) { var quaternion = rotationToQuaternion( baseCoordinate, rotation ); return rotateByQuaternion( vec, quaternion ); }; /** * Given a rotation, return the rotationed coordinate */ var rotateCoordinate = function( coordinate, rotation ) { var quaternion = rotationToQuaternion( coordinate, rotation ); return { x: rotateByQuaternion( coordinate.x, quaternion ), y: rotateByQuaternion( coordinate.y, quaternion ), z: rotateByQuaternion( coordinate.z, quaternion ) }; }; /** * Return the angle between two vector. * * The axis is used to determine the rotation direction. */ var angleBetweenTwoVector = function( axis, vec1, vec2 ) { var vecLen1 = vectorLength( vec1 ); var vecLen2 = vectorLength( vec2 ); if ( !vecLen1 || !vecLen2 ) { return 0; } var cos = vectorDotProd( vec1, vec2 ) / vecLen1 / vecLen2 ; var angle = Math.acos( cos ) * 180 / Math.PI; if ( tripleProduct( vec1, vec2, axis ) > 0 ) { return angle; } else { return -angle; } }; /** * Return the angle between a vector and a plane. * * The plane is determined by an axis and a vector on the plane. */ var angleBetweenPlaneAndVector = function( axis, planeVec, rotatedVec ) { var norm = vectorCrossProd( axis, planeVec ); if ( isZeroVector( norm ) ) { return 0; } return 90 - angleBetweenTwoVector( axis, rotatedVec, norm ); }; /** * Calculated a order specified rotation sequence to * transform from the world coordinate to required coordinate. */ var coordinateToOrderedRotation = function( coordinate, order ) { var axis0 = order[ 0 ]; var axis1 = order[ 1 ]; var axis2 = order[ 2 ]; var reversedOrder = order.split( "" ).reverse().join( "" ); var rotate2 = angleBetweenPlaneAndVector( coordinate[ axis2 ], worldUnitCoordinate[ axis0 ], coordinate[ axis0 ] ); // The r2 is the reverse of rotate for axis2 // The coordinate1 is the coordinate before rotate of axis2 var r2 = { order: reversedOrder }; r2[ axis2 ] = -rotate2; var coordinate1 = rotateCoordinate( coordinate, r2 ); // Calculate the rotation for axis1 var rotate1 = angleBetweenTwoVector( coordinate1[ axis1 ], worldUnitCoordinate[ axis0 ], coordinate1[ axis0 ] ); // Calculate the rotation for axis0 var rotate0 = angleBetweenTwoVector( worldUnitCoordinate[ axis0 ], worldUnitCoordinate[ axis1 ], coordinate1[ axis1 ] ); var rotation = { }; rotation.order = order; rotation[ axis0 ] = roundNumber( rotate0 ); rotation[ axis1 ] = roundNumber( rotate1 ); rotation[ axis2 ] = roundNumber( rotate2 ); return rotation; }; /** * Returns the possible rotations from unit coordinate * to specified coordinate. */ var possibleRotations = function( coordinate ) { var orders = [ "xyz", "xzy", "yxz", "yzx", "zxy", "zyx" ]; var rotations = [ ]; for ( var i = 0; i < orders.length; ++i ) { rotations.push( coordinateToOrderedRotation( coordinate, orders[ i ] ) ); } return rotations; }; /** * Calculate a degree which in range (-180, 180] of baseDeg */ var nearestAngle = function( baseDeg, deg ) { while ( deg > baseDeg + 180 ) { deg -= 360; } while ( deg < baseDeg - 180 ) { deg += 360; } return deg; }; /** * Given a base rotation and multiple rotations, return the best one. * * The best one is the one has least rotate from base. */ var bestRotation = function( baseRotate, rotations ) { var bestScore; var bestRotation; for ( var i = 0; i < rotations.length; ++i ) { var rotation = { order: rotations[ i ].order, x: nearestAngle( baseRotate.x, rotations[ i ].x ), y: nearestAngle( baseRotate.y, rotations[ i ].y ), z: nearestAngle( baseRotate.z, rotations[ i ].z ) }; var score = Math.abs( rotation.x - baseRotate.x ) + Math.abs( rotation.y - baseRotate.y ) + Math.abs( rotation.z - baseRotate.z ); if ( !i || ( score < bestScore ) ) { bestScore = score; bestRotation = rotation; } } return bestRotation; }; /** * Given a coordinate, return the best rotation to achieve it. * * The baseRotate is used to select the near rotation from it. */ var coordinateToRotation = function( baseRotate, coordinate ) { var rotations = possibleRotations( coordinate ); return bestRotation( baseRotate, rotations ); }; /** * Apply a relative rotation to the base rotation. * * Calculate the coordinate after the rotation on each axis, * and finally find out a one step rotation has the effect * of two rotation. * * If there're multiple way to accomplish, select the one * that is nearest to the base. * * Return one rotation has the same effect. */ var combineRotations = function( rotations ) { // No rotation if ( rotations.length <= 0 ) { return { x:0, y:0, z:0, order:"xyz" }; } // Find out the base coordinate var coordinate = worldUnitCoordinate; // One by one apply rotations in order for ( var i = 0; i < rotations.length; i++ ) { coordinate = rotateCoordinate( coordinate, rotations[ i ] ); } // Calculate one rotation from unit coordinate to rotated // coordinate. Because there're multiple possibles, // select the one nearest to the base var rotate = coordinateToRotation( rotations[ 0 ], coordinate ); return rotate; }; var translateRelative = function( relative, prevRotation ) { var result = rotateVector( worldUnitCoordinate, relative, prevRotation ); result.rotate = combineRotations( [ prevRotation, relative.rotate ] ); return result; }; var lib = { translateRelative: translateRelative }; roots[ "impress-root-" + rootId ] = lib; return lib; }; // Let impress core know about the existence of this library window.impress.addLibraryFactory( { rotation: libraryFactory } ); } )( document, window ); /** * Autoplay plugin - Automatically advance slideshow after N seconds * * Copyright 2016 Henrik Ingo, henrik.ingo@avoinelama.fi * Released under the MIT license. */ /* global clearTimeout, setTimeout, document */ ( function( document ) { "use strict"; var autoplayDefault = 0; var currentStepTimeout = 0; var api = null; var timeoutHandle = null; var root = null; var util; // On impress:init, check whether there is a default setting, as well as // handle step-1. document.addEventListener( "impress:init", function( event ) { util = event.detail.api.lib.util; // Getting API from event data instead of global impress().init(). // You don't even need to know what is the id of the root element // or anything. `impress:init` event data gives you everything you // need to control the presentation that was just initialized. api = event.detail.api; root = event.target; // Element attributes starting with "data-", become available under // element.dataset. In addition hyphenized words become camelCased. var data = root.dataset; var autoplay = util.getUrlParamValue( "impress-autoplay" ) || data.autoplay; if ( autoplay ) { autoplayDefault = util.toNumber( autoplay, 0 ); } var toolbar = document.querySelector( "#impress-toolbar" ); if ( toolbar ) { addToolbarButton( toolbar ); } api.lib.gc.pushCallback( function() { clearTimeout( timeoutHandle ); } ); // Note that right after impress:init event, also impress:stepenter is // triggered for the first slide, so that's where code flow continues. }, false ); document.addEventListener( "impress:autoplay:pause", function( event ) { status = "paused"; reloadTimeout( event ); }, false ); document.addEventListener( "impress:autoplay:play", function( event ) { status = "playing"; reloadTimeout( event ); }, false ); // If default autoplay time was defined in the presentation root, or // in this step, set timeout. var reloadTimeout = function( event ) { var step = event.target; currentStepTimeout = util.toNumber( step.dataset.autoplay, autoplayDefault ); if ( status === "paused" ) { setAutoplayTimeout( 0 ); } else { setAutoplayTimeout( currentStepTimeout ); } }; document.addEventListener( "impress:stepenter", function( event ) { reloadTimeout( event ); }, false ); document.addEventListener( "impress:substep:enter", function( event ) { reloadTimeout( event ); }, false ); /** * Set timeout after which we move to next() step. */ var setAutoplayTimeout = function( timeout ) { if ( timeoutHandle ) { clearTimeout( timeoutHandle ); } if ( timeout > 0 ) { timeoutHandle = setTimeout( function() { api.next(); }, timeout * 1000 ); } setButtonText(); }; /*** Toolbar plugin integration *******************************************/ var status = "not clicked"; var toolbarButton = null; var makeDomElement = function( html ) { var tempDiv = document.createElement( "div" ); tempDiv.innerHTML = html; return tempDiv.firstChild; }; var toggleStatus = function() { if ( currentStepTimeout > 0 && status !== "paused" ) { status = "paused"; } else { status = "playing"; } }; var getButtonText = function() { if ( currentStepTimeout > 0 && status !== "paused" ) { return "||"; // Pause } else { return "▶"; // Play } }; var setButtonText = function() { if ( toolbarButton ) { // Keep button size the same even if label content is changing var buttonWidth = toolbarButton.offsetWidth; var buttonHeight = toolbarButton.offsetHeight; toolbarButton.innerHTML = getButtonText(); if ( !toolbarButton.style.width ) { toolbarButton.style.width = buttonWidth + "px"; } if ( !toolbarButton.style.height ) { toolbarButton.style.height = buttonHeight + "px"; } } }; var addToolbarButton = function( toolbar ) { var html = '"; // jshint ignore:line toolbarButton = makeDomElement( html ); toolbarButton.addEventListener( "click", function() { toggleStatus(); if ( status === "playing" ) { if ( autoplayDefault === 0 ) { autoplayDefault = 7; } if ( currentStepTimeout === 0 ) { currentStepTimeout = autoplayDefault; } setAutoplayTimeout( currentStepTimeout ); } else if ( status === "paused" ) { setAutoplayTimeout( 0 ); } } ); util.triggerEvent( toolbar, "impress:toolbar:appendChild", { group: 10, element: toolbarButton } ); }; } )( document ); /** * Blackout plugin * * Press b or . to hide all slides, and b or . again to show them. * Also navigating to a different slide will show them again (impress:stepleave). * * Copyright 2014 @Strikeskids * Released under the MIT license. */ /* global document */ ( function( document ) { "use strict"; var canvas = null; var blackedOut = false; var util = null; var root = null; var api = null; // While waiting for a shared library of utilities, copying these 2 from main impress.js var css = function( el, props ) { var key, pkey; for ( key in props ) { if ( props.hasOwnProperty( key ) ) { pkey = pfx( key ); if ( pkey !== null ) { el.style[ pkey ] = props[ key ]; } } } return el; }; var pfx = ( function() { var style = document.createElement( "dummy" ).style, prefixes = "Webkit Moz O ms Khtml".split( " " ), memory = {}; return function( prop ) { if ( typeof memory[ prop ] === "undefined" ) { var ucProp = prop.charAt( 0 ).toUpperCase() + prop.substr( 1 ), props = ( prop + " " + prefixes.join( ucProp + " " ) + ucProp ).split( " " ); memory[ prop ] = null; for ( var i in props ) { if ( style[ props[ i ] ] !== undefined ) { memory[ prop ] = props[ i ]; break; } } } return memory[ prop ]; }; } )(); var removeBlackout = function() { if ( blackedOut ) { css( canvas, { display: "block" } ); blackedOut = false; util.triggerEvent( root, "impress:autoplay:play", {} ); } }; var blackout = function() { if ( blackedOut ) { removeBlackout(); } else { css( canvas, { display: ( blackedOut = !blackedOut ) ? "none" : "block" } ); blackedOut = true; util.triggerEvent( root, "impress:autoplay:pause", {} ); } }; // Wait for impress.js to be initialized document.addEventListener( "impress:init", function( event ) { api = event.detail.api; util = api.lib.util; root = event.target; canvas = root.firstElementChild; var gc = api.lib.gc; gc.addEventListener( document, "keydown", function( event ) { // Accept b or . -> . is sent by presentation remote controllers if ( event.keyCode === 66 || event.keyCode === 190 ) { event.preventDefault(); if ( !blackedOut ) { blackout(); } else { removeBlackout(); } } }, false ); gc.addEventListener( document, "keyup", function( event ) { // Accept b or . -> . is sent by presentation remote controllers if ( event.keyCode === 66 || event.keyCode === 190 ) { event.preventDefault(); } }, false ); }, false ); document.addEventListener( "impress:stepleave", function() { removeBlackout(); }, false ); } )( document ); /** * Extras Plugin * * This plugin performs initialization (like calling mermaid.initialize()) * for the extras/ plugins if they are loaded into a presentation. * * See README.md for details. * * Copyright 2016 Henrik Ingo (@henrikingo) * Released under the MIT license. */ /* global markdown, marked, hljs, mermaid, impress */ ( function( document, window ) { "use strict"; const SLIDE_SEPARATOR = /^-----$/m; const getMarkdownParser = function( ) { if ( window.hasOwnProperty( "marked" ) ) { // Using marked return function( elem, src ) { return marked.parse( src ); }; } else if ( window.hasOwnProperty( "markdown" ) ) { // Using builtin markdown engine return function( elem, src ) { var dialect = elem.dataset.markdownDialect; return markdown.toHTML( src, dialect ); }; } return null; }; const getMarkdownSlides = function( elem ) { var text = elem.textContent; // Using first not blank line to detect leading whitespaces. // can't properly handle the mixing of space and tabs var m = text.match( /^([ \t]*)\S/m ); if ( m !== null ) { text = text.replace( new RegExp( "^" + m[ 1 ], "mg" ), "" ); } return text.split( SLIDE_SEPARATOR ); }; const convertMarkdowns = function( selector ) { // Detect markdown engine var parseMarkdown = getMarkdownParser(); if ( !parseMarkdown ) { return; } for ( var elem of document.querySelectorAll( selector ) ) { var id = null; if ( elem.id ) { id = elem.id; elem.id = ""; } var origTitle = null; if ( elem.title ) { origTitle = elem.title; elem.title = ""; } var slides = getMarkdownSlides( elem ); var slideElems = [ elem ]; for ( var j = 1; j < slides.length; ++j ) { var newElem = elem.cloneNode( false ); newElem.id = ""; elem.parentNode.insertBefore( newElem, slideElems[ 0 ] ); slideElems.splice( 0, 0, newElem ); } if ( id ) { slideElems[ 0 ].id = id; } for ( var i = 0; i < slides.length; ++i ) { slideElems[ i ].innerHTML = parseMarkdown( slideElems[ i ], slides[ i ] ); if ( origTitle && ( i === 0 ) ) { slideElems[ i ].title = origTitle; } } } }; var preInit = function() { // Query all .markdown elements and translate to HTML convertMarkdowns( ".markdown" ); if ( window.hljs ) { hljs.initHighlightingOnLoad(); } if ( window.mermaid ) { mermaid.initialize( { startOnLoad:true } ); } }; // Register the plugin to be called in pre-init phase // Note: Markdown.js should run early/first, because it creates new div elements. // So add this with a lower-than-default weight. impress.addPreInitPlugin( preInit, 1 ); } )( document, window ); /** * Form support * * Functionality to better support use of input, textarea, button... elements in a presentation. * * This plugin does two things: * * Set stopPropagation on any element that might take text input. This allows users to type, for * example, the letter 'P' into a form field, without causing the presenter console to spring up. * * On impress:stepleave, de-focus any potentially active * element. This is to prevent the focus from being left in a form element that is no longer visible * in the window, and user therefore typing garbage into the form. * * TODO: Currently it is not possible to use TAB to navigate between form elements. Impress.js, and * in particular the navigation plugin, unfortunately must fully take control of the tab key, * otherwise a user could cause the browser to scroll to a link or button that's not on the current * step. However, it could be possible to allow tab navigation between form elements, as long as * they are on the active step. This is a topic for further study. * * Copyright 2016 Henrik Ingo * MIT License */ /* global document */ ( function( document ) { "use strict"; var root; var api; document.addEventListener( "impress:init", function( event ) { root = event.target; api = event.detail.api; var gc = api.lib.gc; var selectors = [ "input", "textarea", "select", "[contenteditable=true]" ]; for ( var selector of selectors ) { var elements = document.querySelectorAll( selector ); if ( !elements ) { continue; } for ( var i = 0; i < elements.length; i++ ) { var e = elements[ i ]; gc.addEventListener( e, "keydown", function( event ) { event.stopPropagation(); } ); gc.addEventListener( e, "keyup", function( event ) { event.stopPropagation(); } ); } } }, false ); document.addEventListener( "impress:stepleave", function() { document.activeElement.blur(); }, false ); } )( document ); /** * Fullscreen plugin * * Press F5 to enter fullscreen and ESC to exit fullscreen mode. * * Copyright 2019 @giflw * Released under the MIT license. */ /* global document */ ( function( document ) { "use strict"; function enterFullscreen() { var elem = document.documentElement; if ( !document.fullscreenElement ) { elem.requestFullscreen(); } } function exitFullscreen() { if ( document.fullscreenElement ) { document.exitFullscreen(); } } // Wait for impress.js to be initialized document.addEventListener( "impress:init", function( event ) { var api = event.detail.api; var root = event.target; var gc = api.lib.gc; var util = api.lib.util; gc.addEventListener( document, "keydown", function( event ) { // 116 (F5) is sent by presentation remote controllers if ( event.code === "F5" ) { event.preventDefault(); enterFullscreen(); util.triggerEvent( root.querySelector( ".active" ), "impress:steprefresh" ); } // 27 (Escape) is sent by presentation remote controllers if ( event.key === "Escape" || event.key === "F5" ) { event.preventDefault(); exitFullscreen(); util.triggerEvent( root.querySelector( ".active" ), "impress:steprefresh" ); } }, false ); util.triggerEvent( document, "impress:help:add", { command: "F5 / ESC", text: "Fullscreen: Enter / Exit", row: 200 } ); }, false ); } )( document ); /** * Goto Plugin * * The goto plugin is a pre-stepleave plugin. It is executed before impress:stepleave, * and will alter the destination where to transition next. * * Example: * * *
* * *
* * *
* * See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values for a table * of what strings to use for each key. * * Copyright 2016-2017 Henrik Ingo (@henrikingo) * Released under the MIT license. */ /* global window, document, impress */ ( function( document, window ) { "use strict"; var lib; document.addEventListener( "impress:init", function( event ) { lib = event.detail.api.lib; }, false ); var isNumber = function( numeric ) { return !isNaN( numeric ); }; var goto = function( event ) { if ( ( !event ) || ( !event.target ) ) { return; } var data = event.target.dataset; var steps = document.querySelectorAll( ".step" ); // Data-goto-key-list="" & data-goto-next-list="" ////////////////////////////////////////// if ( data.gotoKeyList !== undefined && data.gotoNextList !== undefined && event.origEvent !== undefined && event.origEvent.key !== undefined ) { var keylist = data.gotoKeyList.split( " " ); var nextlist = data.gotoNextList.split( " " ); if ( keylist.length !== nextlist.length ) { window.console.log( "impress goto plugin: data-goto-key-list and data-goto-next-list don't match:" ); window.console.log( keylist ); window.console.log( nextlist ); // Don't return, allow the other categories to work despite this error } else { var index = keylist.indexOf( event.origEvent.key ); if ( index >= 0 ) { var next = nextlist[ index ]; if ( isNumber( next ) ) { event.detail.next = steps[ next ]; // If the new next element has its own transitionDuration, we're responsible // for setting that on the event as well event.detail.transitionDuration = lib.util.toNumber( event.detail.next.dataset.transitionDuration, event.detail.transitionDuration ); return; } else { var newTarget = document.getElementById( next ); if ( newTarget && newTarget.classList.contains( "step" ) ) { event.detail.next = newTarget; event.detail.transitionDuration = lib.util.toNumber( event.detail.next.dataset.transitionDuration, event.detail.transitionDuration ); return; } else { window.console.log( "impress goto plugin: " + next + " is not a step in this impress presentation." ); } } } } } // Data-goto-next="" & data-goto-prev="" /////////////////////////////////////////////////// // Handle event.target data-goto-next attribute if ( isNumber( data.gotoNext ) && event.detail.reason === "next" ) { event.detail.next = steps[ data.gotoNext ]; // If the new next element has its own transitionDuration, we're responsible for setting // that on the event as well event.detail.transitionDuration = lib.util.toNumber( event.detail.next.dataset.transitionDuration, event.detail.transitionDuration ); return; } if ( data.gotoNext && event.detail.reason === "next" ) { var newTarget = document.getElementById( data.gotoNext ); // jshint ignore:line if ( newTarget && newTarget.classList.contains( "step" ) ) { event.detail.next = newTarget; event.detail.transitionDuration = lib.util.toNumber( event.detail.next.dataset.transitionDuration, event.detail.transitionDuration ); return; } else { window.console.log( "impress goto plugin: " + data.gotoNext + " is not a step in this impress presentation." ); } } // Handle event.target data-goto-prev attribute if ( isNumber( data.gotoPrev ) && event.detail.reason === "prev" ) { event.detail.next = steps[ data.gotoPrev ]; event.detail.transitionDuration = lib.util.toNumber( event.detail.next.dataset.transitionDuration, event.detail.transitionDuration ); return; } if ( data.gotoPrev && event.detail.reason === "prev" ) { var newTarget = document.getElementById( data.gotoPrev ); // jshint ignore:line if ( newTarget && newTarget.classList.contains( "step" ) ) { event.detail.next = newTarget; event.detail.transitionDuration = lib.util.toNumber( event.detail.next.dataset.transitionDuration, event.detail.transitionDuration ); return; } else { window.console.log( "impress goto plugin: " + data.gotoPrev + " is not a step in this impress presentation." ); } } // Data-goto="" /////////////////////////////////////////////////////////////////////////// // Handle event.target data-goto attribute if ( isNumber( data.goto ) ) { event.detail.next = steps[ data.goto ]; event.detail.transitionDuration = lib.util.toNumber( event.detail.next.dataset.transitionDuration, event.detail.transitionDuration ); return; } if ( data.goto ) { var newTarget = document.getElementById( data.goto ); // jshint ignore:line if ( newTarget && newTarget.classList.contains( "step" ) ) { event.detail.next = newTarget; event.detail.transitionDuration = lib.util.toNumber( event.detail.next.dataset.transitionDuration, event.detail.transitionDuration ); return; } else { window.console.log( "impress goto plugin: " + data.goto + " is not a step in this impress presentation." ); } } }; // Register the plugin to be called in pre-stepleave phase impress.addPreStepLeavePlugin( goto ); } )( document, window ); /** * Help popup plugin * * Example: * * *
* * For developers: * * Typical use for this plugin, is for plugins that support some keypress, to add a line * to the help popup produced by this plugin. For example "P: Presenter console". * * Copyright 2016 Henrik Ingo (@henrikingo) * Released under the MIT license. */ /* global window, document */ ( function( document, window ) { "use strict"; var rows = []; var timeoutHandle; var triggerEvent = function( el, eventName, detail ) { var event = document.createEvent( "CustomEvent" ); event.initCustomEvent( eventName, true, true, detail ); el.dispatchEvent( event ); }; var renderHelpDiv = function() { var helpDiv = document.getElementById( "impress-help" ); if ( helpDiv ) { var html = []; for ( var row in rows ) { for ( var arrayItem in row ) { html.push( rows[ row ][ arrayItem ] ); } } if ( html ) { helpDiv.innerHTML = "\n" + html.join( "\n" ) + "
\n"; } } }; var toggleHelp = function() { var helpDiv = document.getElementById( "impress-help" ); if ( !helpDiv ) { return; } if ( helpDiv.style.display === "block" ) { helpDiv.style.display = "none"; } else { helpDiv.style.display = "block"; window.clearTimeout( timeoutHandle ); } }; document.addEventListener( "keyup", function( event ) { if ( event.keyCode === 72 || event.keyCode === 191 ) { // "h" || "?" event.preventDefault(); toggleHelp(); } }, false ); // API // Other plugins can add help texts, typically if they support an action on a keypress. /** * Add a help text to the help popup. * * :param: e.detail.command Example: "H" * :param: e.detail.text Example: "Show this help." * :param: e.detail.row Row index from 0 to 9 where to place this help text. Example: 0 */ document.addEventListener( "impress:help:add", function( e ) { // The idea is for the sender of the event to supply a unique row index, used for sorting. // But just in case two plugins would ever use the same row index, we wrap each row into // its own array. If there are more than one entry for the same index, they are shown in // first come, first serve ordering. var rowIndex = e.detail.row; if ( typeof rows[ rowIndex ] !== "object" || !rows[ rowIndex ].isArray ) { rows[ rowIndex ] = []; } rows[ e.detail.row ].push( "" + e.detail.command + "" + e.detail.text + "" ); renderHelpDiv(); } ); document.addEventListener( "impress:init", function( e ) { renderHelpDiv(); // At start, show the help for 7 seconds. var helpDiv = document.getElementById( "impress-help" ); if ( helpDiv ) { helpDiv.style.display = "block"; timeoutHandle = window.setTimeout( function() { var helpDiv = document.getElementById( "impress-help" ); helpDiv.style.display = "none"; }, 7000 ); // Regster callback to empty the help div on teardown var api = e.detail.api; api.lib.gc.pushCallback( function() { window.clearTimeout( timeoutHandle ); helpDiv.style.display = ""; helpDiv.innerHTML = ""; rows = []; } ); } // Use our own API to register the help text for "h" triggerEvent( document, "impress:help:add", { command: "H", text: "Show this help", row: 0 } ); } ); } )( document, window ); /** * Adds a presenter console to impress.js * * MIT Licensed, see license.txt. * * Copyright 2012, 2013, 2015 impress-console contributors (see README.txt) * * version: 1.3-dev * */ // This file contains so much HTML, that we will just respectfully disagree about js /* jshint quotmark:single */ /* global navigator, top, setInterval, clearInterval, document, window */ ( function( document, window ) { 'use strict'; // TODO: Move this to src/lib/util.js var triggerEvent = function( el, eventName, detail ) { var event = document.createEvent( 'CustomEvent' ); event.initCustomEvent( eventName, true, true, detail ); el.dispatchEvent( event ); }; // Create Language object depending on browsers language setting var lang; switch ( navigator.language ) { case 'de': lang = { 'noNotes': '
Keine Notizen hierzu
', 'restart': 'Neustart', 'clickToOpen': 'Klicken um Sprecherkonsole zu öffnen', 'prev': 'zurück', 'next': 'weiter', 'loading': 'initalisiere', 'ready': 'Bereit', 'moving': 'in Bewegung', 'useAMPM': false }; break; case 'zh-CN': case 'zh-cn': lang = { 'noNotes': '
当前帧没有备注
', 'restart': '重新开始', 'clickToOpen': '点击以打开演讲者控制界面', 'prev': '上一帧', 'next': '下一帧', 'loading': '加载中', 'ready': '就绪', 'moving': '移动中', 'useAMPM': false }; break; case 'en': // jshint ignore:line default : // jshint ignore:line lang = { 'noNotes': '
No notes for this step
', 'restart': 'Restart', 'clickToOpen': 'Click to open speaker console', 'prev': 'Prev', 'next': 'Next', 'loading': 'Loading', 'ready': 'Ready', 'moving': 'Moving', 'useAMPM': false }; break; } // Settings to set iframe in speaker console const preViewDefaultFactor = 0.7; const preViewMinimumFactor = 0.5; const preViewGap = 4; // This is the default template for the speaker console window const consoleTemplate = '' + '' + // Order is important: If user provides a cssFile, those will win, because they're later '{{cssStyle}}' + '{{cssLink}}' + '' + '
' + '
' + '' + '' + '
' + '
' + '
' + '
' + '
' + '' + '' + '
--:--
' + '
00m 00s
' + '
{{loading}}
' + '
' + ''; // Default css location var cssFileOldDefault = 'css/impressConsole.css'; var cssFile = undefined; // jshint ignore:line // Css for styling iframs on the console var cssFileIframeOldDefault = 'css/iframe.css'; var cssFileIframe = undefined; // jshint ignore:line // All console windows, so that you can call impressConsole() repeatedly. var allConsoles = {}; // Zero padding helper function: var zeroPad = function( i ) { return ( i < 10 ? '0' : '' ) + i; }; // The console object var impressConsole = window.impressConsole = function( rootId ) { rootId = rootId || 'impress'; if ( allConsoles[ rootId ] ) { return allConsoles[ rootId ]; } // Root presentation elements var root = document.getElementById( rootId ); var consoleWindow = null; var nextStep = function() { var classes = ''; var nextElement = document.querySelector( '.active' ); // Return to parents as long as there is no next sibling while ( !nextElement.nextElementSibling && nextElement.parentNode ) { nextElement = nextElement.parentNode; } nextElement = nextElement.nextElementSibling; while ( nextElement ) { classes = nextElement.attributes[ 'class' ]; if ( classes && classes.value.indexOf( 'step' ) !== -1 ) { consoleWindow.document.getElementById( 'blocker' ).innerHTML = lang.next; return nextElement; } if ( nextElement.firstElementChild ) { // First go into deep nextElement = nextElement.firstElementChild; } else { // Go to next sibling or through parents until there is a next sibling while ( !nextElement.nextElementSibling && nextElement.parentNode ) { nextElement = nextElement.parentNode; } nextElement = nextElement.nextElementSibling; } } // No next element. Pick the first consoleWindow.document.getElementById( 'blocker' ).innerHTML = lang.restart; return document.querySelector( '.step' ); }; // Sync the notes to the step var onStepLeave = function() { if ( consoleWindow ) { // Set notes to next steps notes. var newNotes = document.querySelector( '.active' ).querySelector( '.notes' ); if ( newNotes ) { newNotes = newNotes.innerHTML; } else { newNotes = lang.noNotes; } consoleWindow.document.getElementById( 'notes' ).innerHTML = newNotes; // Set the views var baseURL = document.URL.substring( 0, document.URL.search( '#/' ) ); var slideSrc = baseURL + '#' + document.querySelector( '.active' ).id; var preSrc = baseURL + '#' + nextStep().id; var slideView = consoleWindow.document.getElementById( 'slideView' ); // Setting when already set causes glitches in Firefox, so check first: if ( slideView.src !== slideSrc ) { slideView.src = slideSrc; } var preView = consoleWindow.document.getElementById( 'preView' ); if ( preView.src !== preSrc ) { preView.src = preSrc; } consoleWindow.document.getElementById( 'status' ).innerHTML = '' + lang.moving + ''; } }; // Sync the previews to the step var onStepEnter = function() { if ( consoleWindow ) { // We do everything here again, because if you stopped the previos step to // early, the onstepleave trigger is not called for that step, so // we need this to sync things. var newNotes = document.querySelector( '.active' ).querySelector( '.notes' ); if ( newNotes ) { newNotes = newNotes.innerHTML; } else { newNotes = lang.noNotes; } var notes = consoleWindow.document.getElementById( 'notes' ); notes.innerHTML = newNotes; notes.scrollTop = 0; // Set the views var baseURL = document.URL.substring( 0, document.URL.search( '#/' ) ); var slideSrc = baseURL + '#' + document.querySelector( '.active' ).id; var preSrc = baseURL + '#' + nextStep().id; var slideView = consoleWindow.document.getElementById( 'slideView' ); // Setting when already set causes glitches in Firefox, so check first: if ( slideView.src !== slideSrc ) { slideView.src = slideSrc; } var preView = consoleWindow.document.getElementById( 'preView' ); if ( preView.src !== preSrc ) { preView.src = preSrc; } consoleWindow.document.getElementById( 'status' ).innerHTML = '' + lang.ready + ''; } }; // Sync substeps var onSubstep = function( event ) { if ( consoleWindow ) { if ( event.detail.reason === 'next' ) { onSubstepShow(); } if ( event.detail.reason === 'prev' ) { onSubstepHide(); } } }; var onSubstepShow = function() { var slideView = consoleWindow.document.getElementById( 'slideView' ); triggerEventInView( slideView, 'impress:substep:show' ); }; var onSubstepHide = function() { var slideView = consoleWindow.document.getElementById( 'slideView' ); triggerEventInView( slideView, 'impress:substep:hide' ); }; var triggerEventInView = function( frame, eventName, detail ) { // Note: Unfortunately Chrome does not allow createEvent on file:// URLs, so this won't // work. This does work on Firefox, and should work if viewing the presentation on a // http:// URL on Chrome. var event = frame.contentDocument.createEvent( 'CustomEvent' ); event.initCustomEvent( eventName, true, true, detail ); frame.contentDocument.dispatchEvent( event ); }; var spaceHandler = function() { var notes = consoleWindow.document.getElementById( 'notes' ); if ( notes.scrollTopMax - notes.scrollTop > 20 ) { notes.scrollTop = notes.scrollTop + notes.clientHeight * 0.8; } else { window.impress().next(); } }; var timerReset = function() { consoleWindow.timerStart = new Date(); }; // Show a clock var clockTick = function() { var now = new Date(); var hours = now.getHours(); var minutes = now.getMinutes(); var seconds = now.getSeconds(); var ampm = ''; if ( lang.useAMPM ) { ampm = ( hours < 12 ) ? 'AM' : 'PM'; hours = ( hours > 12 ) ? hours - 12 : hours; hours = ( hours === 0 ) ? 12 : hours; } // Clock var clockStr = zeroPad( hours ) + ':' + zeroPad( minutes ) + ':' + zeroPad( seconds ) + ' ' + ampm; consoleWindow.document.getElementById( 'clock' ).firstChild.nodeValue = clockStr; // Timer seconds = Math.floor( ( now - consoleWindow.timerStart ) / 1000 ); minutes = Math.floor( seconds / 60 ); seconds = Math.floor( seconds % 60 ); consoleWindow.document.getElementById( 'timer' ).firstChild.nodeValue = zeroPad( minutes ) + 'm ' + zeroPad( seconds ) + 's'; if ( !consoleWindow.initialized ) { // Nudge the slide windows after load, or they will scrolled wrong on Firefox. consoleWindow.document.getElementById( 'slideView' ).contentWindow.scrollTo( 0, 0 ); consoleWindow.document.getElementById( 'preView' ).contentWindow.scrollTo( 0, 0 ); consoleWindow.initialized = true; } }; var registerKeyEvent = function( keyCodes, handler, window ) { if ( window === undefined ) { window = consoleWindow; } // Prevent default keydown action when one of supported key is pressed window.document.addEventListener( 'keydown', function( event ) { if ( !event.ctrlKey && !event.altKey && !event.shiftKey && !event.metaKey && keyCodes.indexOf( event.keyCode ) !== -1 ) { event.preventDefault(); } }, false ); // Trigger impress action on keyup window.document.addEventListener( 'keyup', function( event ) { if ( !event.ctrlKey && !event.altKey && !event.shiftKey && !event.metaKey && keyCodes.indexOf( event.keyCode ) !== -1 ) { handler(); event.preventDefault(); } }, false ); }; var consoleOnLoad = function() { var slideView = consoleWindow.document.getElementById( 'slideView' ); var preView = consoleWindow.document.getElementById( 'preView' ); // Firefox: slideView.contentDocument.body.classList.add( 'impress-console', 'slideView' ); preView.contentDocument.body.classList.add( 'impress-console', 'preView' ); if ( cssFileIframe !== undefined ) { slideView.contentDocument.head.insertAdjacentHTML( 'beforeend', '' ); preView.contentDocument.head.insertAdjacentHTML( 'beforeend', '' ); } // Chrome: slideView.addEventListener( 'load', function() { slideView.contentDocument.body.classList.add( 'impress-console', 'slideView' ); if ( cssFileIframe !== undefined ) { slideView.contentDocument.head.insertAdjacentHTML( 'beforeend', '' ); } } ); preView.addEventListener( 'load', function() { preView.contentDocument.body.classList.add( 'impress-console', 'preView' ); if ( cssFileIframe !== undefined ) { preView.contentDocument.head.insertAdjacentHTML( 'beforeend', '' ); } } ); }; var open = function() { if ( top.isconsoleWindow ) { return; } if ( consoleWindow && !consoleWindow.closed ) { consoleWindow.focus(); } else { consoleWindow = window.open( '', 'impressConsole' ); // If opening failes this may be because the browser prevents this from // not (or less) interactive JavaScript... if ( consoleWindow == null ) { // ... so I add a button to klick. // workaround on firefox var message = document.createElement( 'div' ); message.id = 'impress-console-button'; message.style.position = 'fixed'; message.style.left = 0; message.style.top = 0; message.style.right = 0; message.style.bottom = 0; message.style.backgroundColor = 'rgba(255, 255, 255, 0.9)'; var clickStr = 'var x = document.getElementById(\'impress-console-button\');' + 'x.parentNode.removeChild(x);' + 'var r = document.getElementById(\'' + rootId + '\');' + 'impress(\'' + rootId + '\').lib.util.triggerEvent(r, \'impress:console:open\', {})'; var styleStr = 'margin: 25vh 25vw;width:50vw;height:50vh;'; message.innerHTML = ''; document.body.appendChild( message ); return; } var cssLink = ''; if ( cssFile !== undefined ) { cssLink = ''; } // This sets the window location to the main window location, so css can be loaded: consoleWindow.document.open(); // Write the template: consoleWindow.document.write( // CssStyleStr is lots of inline defined at the end of this file consoleTemplate.replace( '{{cssStyle}}', cssStyleStr() ) .replace( '{{cssLink}}', cssLink ) .replace( /{{.*?}}/gi, function( x ) { return lang[ x.substring( 2, x.length - 2 ) ]; } ) ); consoleWindow.document.title = 'Speaker Console (' + document.title + ')'; consoleWindow.impress = window.impress; // We set this flag so we can detect it later, to prevent infinite popups. consoleWindow.isconsoleWindow = true; // Set the onload function: consoleWindow.onload = consoleOnLoad; // Add clock tick consoleWindow.timerStart = new Date(); consoleWindow.timerReset = timerReset; consoleWindow.clockInterval = setInterval( allConsoles[ rootId ].clockTick, 1000 ); // Keyboard navigation handlers // 33: pg up, 37: left, 38: up registerKeyEvent( [ 33, 37, 38 ], window.impress().prev ); // 34: pg down, 39: right, 40: down registerKeyEvent( [ 34, 39, 40 ], window.impress().next ); // 32: space registerKeyEvent( [ 32 ], spaceHandler ); // 82: R registerKeyEvent( [ 82 ], timerReset ); // Cleanup consoleWindow.onbeforeunload = function() { // I don't know why onunload doesn't work here. clearInterval( consoleWindow.clockInterval ); }; // It will need a little nudge on Firefox, but only after loading: onStepEnter(); consoleWindow.initialized = false; consoleWindow.document.close(); //Catch any window resize to pass size on window.onresize = resize; consoleWindow.onresize = resize; return consoleWindow; } }; var resize = function() { var slideView = consoleWindow.document.getElementById( 'slideView' ); var preView = consoleWindow.document.getElementById( 'preView' ); // Get ratio of presentation var ratio = window.innerHeight / window.innerWidth; // Get size available for views var views = consoleWindow.document.getElementById( 'views' ); // SlideView may have a border or some padding: // asuming same border width on both direktions var delta = slideView.offsetWidth - slideView.clientWidth; // Set views var slideViewWidth = ( views.clientWidth - delta ); var slideViewHeight = Math.floor( slideViewWidth * ratio ); var preViewTop = slideViewHeight + preViewGap; var preViewWidth = Math.floor( slideViewWidth * preViewDefaultFactor ); var preViewHeight = Math.floor( slideViewHeight * preViewDefaultFactor ); // Shrink preview to fit into space available if ( views.clientHeight - delta < preViewTop + preViewHeight ) { preViewHeight = views.clientHeight - delta - preViewTop; preViewWidth = Math.floor( preViewHeight / ratio ); } // If preview is not high enough forget ratios! if ( preViewWidth <= Math.floor( slideViewWidth * preViewMinimumFactor ) ) { slideViewWidth = ( views.clientWidth - delta ); slideViewHeight = Math.floor( ( views.clientHeight - delta - preViewGap ) / ( 1 + preViewMinimumFactor ) ); preViewTop = slideViewHeight + preViewGap; preViewWidth = Math.floor( slideViewWidth * preViewMinimumFactor ); preViewHeight = views.clientHeight - delta - preViewTop; } // Set the calculated into styles slideView.style.width = slideViewWidth + 'px'; slideView.style.height = slideViewHeight + 'px'; preView.style.top = preViewTop + 'px'; preView.style.width = preViewWidth + 'px'; preView.style.height = preViewHeight + 'px'; }; var _init = function( cssConsole, cssIframe ) { if ( cssConsole !== undefined ) { cssFile = cssConsole; } // You can also specify the css in the presentation root div: //
else if ( root.dataset.consoleCss !== undefined ) { cssFile = root.dataset.consoleCss; } if ( cssIframe !== undefined ) { cssFileIframe = cssIframe; } else if ( root.dataset.consoleCssIframe !== undefined ) { cssFileIframe = root.dataset.consoleCssIframe; } // Register the event root.addEventListener( 'impress:stepleave', onStepLeave ); root.addEventListener( 'impress:stepenter', onStepEnter ); root.addEventListener( 'impress:substep:stepleaveaborted', onSubstep ); root.addEventListener( 'impress:substep:show', onSubstepShow ); root.addEventListener( 'impress:substep:hide', onSubstepHide ); //When the window closes, clean up after ourselves. window.onunload = function() { if ( consoleWindow && !consoleWindow.closed ) { consoleWindow.close(); } }; //Open speaker console when they press 'p' registerKeyEvent( [ 80 ], open, window ); //Btw, you can also launch console automatically: //
if ( root.dataset.consoleAutolaunch === 'true' ) { open(); } }; var init = function( cssConsole, cssIframe ) { if ( ( cssConsole === undefined || cssConsole === cssFileOldDefault ) && ( cssIframe === undefined || cssIframe === cssFileIframeOldDefault ) ) { window.console.log( 'impressConsole().init() is deprecated. ' + 'impressConsole is now initialized automatically when you ' + 'call impress().init().' ); } _init( cssConsole, cssIframe ); }; // New API for impress.js plugins is based on using events root.addEventListener( 'impress:console:open', function() { open(); } ); /** * Register a key code to an event handler * * :param: event.detail.keyCodes List of key codes * :param: event.detail.handler A function registered as the event handler * :param: event.detail.window The console window to register the keycode in */ root.addEventListener( 'impress:console:registerKeyEvent', function( event ) { registerKeyEvent( event.detail.keyCodes, event.detail.handler, event.detail.window ); } ); // Return the object allConsoles[ rootId ] = { init: init, open: open, clockTick: clockTick, registerKeyEvent: registerKeyEvent, _init: _init }; return allConsoles[ rootId ]; }; // This initializes impressConsole automatically when initializing impress itself document.addEventListener( 'impress:init', function( event ) { // Note: impressConsole wants the id string, not the DOM element directly impressConsole( event.target.id )._init(); // Add 'P' to the help popup triggerEvent( document, 'impress:help:add', { command: 'P', text: 'Presenter console', row: 10 } ); } ); // Returns a string to be used inline as a css `; }; } )( document, window ); /** * Media Plugin * * This plugin will do the following things: * * - Add a special class when playing (body.impress-media-video-playing * and body.impress-media-video-playing) and pausing media (body.impress-media-video-paused * and body.impress-media-audio-paused) (removing them when ending). * This can be useful for example for darkening the background or fading out other elements * while a video is playing. * Only media at the current step are taken into account. All classes are removed when leaving * a step. * * - Introduce the following new data attributes: * * - data-media-autoplay="true": Autostart media when entering its step. * - data-media-autostop="true": Stop media (= pause and reset to start), when leaving its * step. * - data-media-autopause="true": Pause media but keep current time when leaving its step. * * When these attributes are added to a step they are inherited by all media on this step. * Of course this setting can be overwritten by adding different attributes to inidvidual * media. * * The same rule applies when this attributes is added to the root element. Settings can be * overwritten for individual steps and media. * * Examples: * - data-media-autoplay="true" data-media-autostop="true": start media on enter, stop on * leave, restart from beginning when re-entering the step. * * - data-media-autoplay="true" data-media-autopause="true": start media on enter, pause on * leave, resume on re-enter * * - data-media-autoplay="true" data-media-autostop="true" data-media-autopause="true": start * media on enter, stop on leave (stop overwrites pause). * * - data-media-autoplay="true" data-media-autopause="false": let media start automatically * when entering a step and let it play when leaving the step. * * -
...
* All media is startet automatically on all steps except the one that has the * data-media-autoplay="false" attribute. * * - Pro tip: Use