Giter Site home page Giter Site logo

minideck.js's Introduction

Minideck.js

A simple slide deck with no dependancies (except you'll need an ES5 capable browser like Opera 11+, FireFox 4+, Safari 4+, or Chrome Whatever+.)

Minideck isn't intended to be a deck.js clone, but it solves a similar problem. It tries to separate style from behaviour, so you won't find ANY explicit CSS in the behaviour.js file. You can write your own CSS, but an example template (based on my Web Directions South 2011 presentation) is included.

So how do I make it work?

All you have to do is include the JS file, like so. There are no methods to call, no API, no funny business.

<script src="behaviour.js" type="text/javascript"></script>

It looks for HTML5 <section> elements with a class of slide. They're ordered by the order in which they appear in the document.

There are two boolean attributes you may add to any element which sits within a slide:

  • order - Tells minideck.js to include this element in the animation queue. A class of visible will be added to the element when it is reached.
  • autohide - Tells minideck.js to 'hide' this element once the next element in the queue is displayed. This basically means a class of 'hidden' and another class of 'autohidden' are added to the element.

Presenting with Minideck

Up and right cursor/arrow keys, as well as return and space advance the animation queue, moving to the next slide once the animation queue is drained. The left and down cursor/arrow keys move back one slide, but they do not change the position in the per-slide animation queue.

The g key allows you to jump to a particular slide.

Why?

Deck.js was too big. And I didn't want to include jQuery (so sue me.) And I've got a not-invented-here prejudice against jQuery plugins (so sue me.)

Bugs & Roadmap

I'd like to switch the css classes to .past, .current/.present, and .future as I think it's a little more understandable and possibly a little more flexible.

Also there's some weirdness with onhashchange. I'll squash it soon.

minideck.js's People

Contributors

cgiffard avatar

Stargazers

Dinesh Kr. Choudhary avatar  avatar Adrian Redman avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

dineshkummarc

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.