Skip to content

lcfm/meteor-slideout

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chriswessels:slideout

A smart-package that bundles Slideout.js for touch slideout navigation for your mobile web apps.

Slideout.js

Slideout.js demo

Installation

In your Meteor.js project directory, run

$ meteor add chriswessels:slideout

Example

See example usage with iron-router based routing here.

Please also see the Slideout.js README: https://github.com/Mango/slideout/blob/master/README.md#usage.

Meteor-specific Tips

This package just handles bundling the Slideout.js library into your Meteor.js project.

The Slideout object instantiation code should go into the rendered hook for the template that contains the DOM elements for your menu (ideally your layout):

You might want to make the slideout instance a global variable so that you can access the utility methods (like .close()) from your other code (e.g. routing hooks).

Template.MasterLayout.onRendered(function () {
  var template = this;
  slideoutInstance = new Slideout({
    'menu': template.$('.menu').get(0),
    'panel': $('.content').get(0),
    'padding': 256,
    'tolerance': 70
  });
});

Your <head> should contain the following meta directives to best display your app on mobile devices:

<head>
  <meta http-equiv="cleartype" content="on">
  <meta name="MobileOptimized" content="320">
  <meta name="HandheldFriendly" content="True">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
</head>

Also don't forget to include the CSS in the Slideout.js README. See example too.

Versioning

It looks like the Slideout.js team have stopped tagging new releases on Github. This is problematic as it becomes difficult to track which version of their plugin is bundled in the smart package. I will continue to release new versions of this smart package, following the scheme: SLIDEOUT-GITHUB-TAG_RELEASE-NUMBER-UNDER-THAT-TAG.

License

Please see the LICENSE file for more information.

About

A touch slideout navigation menu for your mobile web apps

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 49.9%
  • HTML 30.5%
  • CSS 17.5%
  • Shell 2.1%