npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ember-sliding-menu

v0.2.6

Published

The convenient sliding-menu component

Downloads

3

Readme

ember-sliding-menu

IT'S WIP. If you're seeing this message - wait a few days before it become more stable! TODOS:

  • test
  • optimise (get rid of jquery - completely)
  • update readme and make a demo
  • add option to move content instead of moving menu(v2)
  • fix toLeft, only toRight is working now Thanks!

This is convenient component representing the mobile sliding-menu. It has some features since it was designed for mobile applications at first:

  • Performance optimized for mobile applications (tested for cordova app on iOS)
  • It has the effect of inertia
  • Highly customizable
  • Separated handler so your app won't experience any conflict
  • Easy to use (see below)
  • For desktop apps there is a commented frost-glass effect logic (on your own risk)

You can find more convenient page here

Dependencies

Installation

  • ember install sliding-menu this repository

Usage

  1. Use the component where you need it
  {{#sliding-menu
    slideDirection='toRight'
    appIdentifier='.ember-application'
    pannableWidth=65
    menuOffset=25
  }}
    //... your menu items goes here
  {{/sliding-menu}}

Add some styles (not included intentionally):

.sliding-menu {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    -webkit-transform: translateZ(0);
    -webkit-perspective: 1000;
    -webkit-backface-visibility: hidden;
    visibility: hidden;
    will-change: transform;
    z-index: 110;
    border: none;
    background: #ffffff;
  }
  1. Add optionally a component for handling menu toggling outside
  {{#toggle-sliding-menu
    tagName='button'
    className='hamburger-menu-holder'
  }}
    <span class="hamburger-holder">
      <span class="hamburger"></span>
    </span>
  {{/toggle-sliding-menu}}
  1. Add optionally background overlay component. It allows you to close menu by clicking outside
  {{background-overlay}}

Add some styles (not included intentionally):

.background-overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 99;
    visibility: hidden;
  }

That's all. Now everything you need is decorate your menu

P.S. In order to get rid from any possible glitches it's highly recommended to set property appIdentifier not to '.ember-application' container itself(default) but to its descendant. In the example above I'm using className - '.app' for Application's View

Example

Ember Cli Sliding Menu EXAMPLE Here you can find convenient example with bucket of supporting features, like:

  • background-overlay which gives an opportunity to close menu by clicking to the free of opened menu
  • toggle-menu which helps to handle menu open/close via buttons click/action

Options

There are plenty of options available.

  1. Transition trough menu item with menu-closing In your application controller:
  import Ember from 'ember';
  import MenuHelper from 'testing-menu/mixins/menu-helper';

  export default Ember.Controller.extend(MenuHelper, {});

Add menu item

      <div class="menu">
          <div {{action "transitionFromMenu" "home"}} class="menu-item">Home page</div>
    </div>
  1. Options represented by properties you can pass to component:
  • slideDirection: @String 'toLeft|toRight' default: 'toLeft' - menu placement, toLeft means from right to left
  • pannableWidth: @Number > 0 default: 40 - width of zone where menu can be invoked
  • defaultSpeed: @Double > 0.00 && < 1.00 default: 0.03 - menu animation speed

Author

Vladimir Katansky

License

(The MIT License)

Copyright (c) 2016 Vladimir Katansky

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.