We built Sidetap to be an easy-to-use implementation of the side navigation pattern popularized by apps like Sparrow and Facebook. It solves many common mobile development problems right out of the box. Here are some of the specific things we like about it:
Build the HTML Structure
Sidetap uses a very specific HTML structure which can be found in the skelton.html file
Instantiate Sidetap
Create a reference to Sidetap from within your app.
var my_sidetap = new sidetap();
Call Animations
Any time you want to show a new section, you just tell Sidetap which content element to animate. Sidetap will take care of clearing the stage using whatever animation is appropriate for the situation.
my_sidetap.show_section(element, options);
show_section options:
callback
: a function to fire when the switch is complete
animation
: an animation style to use (ios 5+ only). Current animations are upfrombottom, downfromtop, infromright, infromleft
Requires jQuery (only tested with 1.7.2) or Zepto.js.
Sidetap's javascript and css are written using coffeescript and less respectively. Each of these file types must be compiled before they can be used by the browser. To do this easily, we're using the excellent grunt build system. To use the build system, you must first install node and npm.
npm install -g grunt
npm install grunt-contrib
There are a few available commands.
grunt
or grunt build
: build the css & js filesgrunt watch
: build the css & js files whenever the less or coffee files changeWe welcome your input, but strongly encourage you to read Nicolas Gallagher's excellent issue guidelines before filing an issue or opening a pull request. While these are guidelines are his projects specifically, they would serve as an excellent guide for contributing to any open source project.
As with any software project, there's always room for improvement. These are some of the things we'd like to get added to Sidetap in the future.
Built by @pfiller, @mlharvest, @kimku and @jkintscher for Harvest. Want to work on projects like this? We’re hiring!