Coder Social home page Coder Social logo

impress.js-progress's Introduction

impress.js-progress

Progressbar and pagexounter for impress.js presentations Requires the steps to be submitted on impress:init event, see impress/impress.js#235 and impress/impress.js#232 for details.

Usage

Add a div for progressbar and/or progress as you can see it here:

<div class="progressbar"><div></div></div>
<div class="progress"></div>

include the CSS in the header

<link href="css/impress-progress.css" rel="stylesheet" />

and include the script

<script src="js/impress-progress.js"></script>

just before including impress.js.

That's it.

Feel free to change the style of your progressbar as you like by editing the CSS file.

Note

Until m42e/impress.js@f367c84 isn't accepted there's the need to patch js/impress.js to add the steps data to init().

Changing line 402 like this:

triggerEvent(root, "impress:init", { api: roots[ "impress-root-" + rootId ] });
triggerEvent(root, "impress:init", { api: roots[ "impress-root-" + rootId ], steps: steps });

impress.js-progress's People

Contributors

m42e avatar dcarral avatar

Stargazers

YITA avatar ashed avatar JMx avatar Derek avatar LGD.HuaFEEng avatar Robin Poppenberg avatar Will avatar Guilherme Felix da Silva Maciel avatar  avatar Mike Chang avatar melodypro avatar  avatar Andrés Clúa avatar Henrik Ingo avatar Branden Pinney avatar Dustin L. Dodson avatar Chris Kletsch avatar Angus H. avatar Ali avatar Abhishek B. avatar Omar avatar 平江 avatar Julien Noblet avatar  avatar Eldo Loguzzo avatar Derek Rushing avatar PERROT GILLES avatar Jan Čejka avatar Francisco Manuel Arrabal Campos avatar Harrison Powers avatar slientcloud avatar Jordi Llonch avatar jopasserat avatar M Haidar Hanif avatar Felix Rupp avatar Andrei Popovici avatar Leonardo avatar Mark D'Arensbourg avatar  avatar Guido Schmidt avatar Mojtaba Seyedi avatar Bruce Vang avatar Victor Teixeira avatar Alexandre Rocha Lima e Marcondes avatar Fred Grott avatar Bitnevis avatar

Watchers

David Cochran avatar James Cloos avatar Willian Viana avatar Felix Rupp avatar Leonardo avatar Jia-Rui Lin avatar Francisco Manuel Arrabal Campos avatar YITA avatar  avatar

impress.js-progress's Issues

Integrated impress.js-progress in my impress.js fork

Hi Matthias

I've been contributing to impress.js for the past year or so.

I just wanted to let you know that I have added your progress bar to my fork of impress here: https://github.com/henrikingo/impress.js

The new thing is that we're adding (well, it's only in my repo at the moment...) a plugin API so that new features can be added in a modular way. It turns out impress.js-progress was written in the same way as the API mostly does it too, by using the events triggered by core impress.js. So it was straightforward to add your code with minor changes. (I extended the impress:stepleave event instead of adding impress:starttransition, in an effort to minimize additions to the core.)

The main benefit for a user of impress.js-progress is that you don't need to use a separate <script> tag to include a separate js file any longer. Just adding the <div> in your presentation will do the magic.

I also modified the sample CSS slightly to make the bar and digits smaller. You can watch a demo here: http://henrikingo.github.io/impress.js/examples/classic-slides/

One question: Can you confirm your code is MIT licensed, like the core impress.js? If yes, I would appreciate if you also added a mention of MIT license to the README in this repo, so there's no ambiguity.

Add examples

Having a couple of examples in an examples dir, with the progressbar embedded in the slides or outside them would be very useful to start with impress-progress.

progress bar only working on 1 slide

Hey,
I was trying to use the progress bar in my presentation but I'm not able to get it working. All my slides have the same data-x and data-y coordinates. I'm just changing the data-z attribute. When putting the div's on my first slide the progress bar works. But when adding the progress bar to more slides it is just empty and also no slide numbers are displayed. I've played a little with it and it seems the first progress bar I added get updated but how do I put it on the other slides?

Felix

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.