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-newton-cradle-loader

v0.4.0

Published

Ember addon for showing a newton cradle loading animation

Downloads

28

Readme

Ember-newton-cradle-loader

ember-newton-cradle-loader is built and maintained by Ship Shape. Contact us for Ember.js consulting, development, and training for your project.

npm version npm Ember Observer Score Build Status Code Climate Test Coverage

Demo http://shipshapecode.github.io/ember-newton-cradle-loader/

Installation

ember install ember-newton-cradle-loader

Usage

This addon automatically creates an application-loading.hbs template for you, and drops a nice newton cradle loading animation in it, so that whenever your model hooks are waiting to resolve, the loader will show up. If you use pods for your routes and loading states, you may need to delete this template and manually create another one.

You can also use this loader as a component, wherever you like, by simply including {{newton-cradle-loader}} in your template.

Styles

Ember-Newton-Cradle-Loader uses Sass for styles. The default styles for the cradle loader are stored in an overridable Sass map. This is accomplished by supplying a $ember-newton-cradle-loader map with any or all of the keys found in the defaults map below.

$ember-newton-cradle-loader: (
  'cradle-size': 1em,
  'swing-distance': 2.5,
  'shadow-distance': 1.5,
  'animation-duration': .425s,
  'gradient-start': #385c78,
  'gradient-end': #db412c
);

There are seven more keys (in the form of cradle-bg-n) in the map available for customizing the background of the individual cradles, as well as seven more for customizing the shadow for each cradle (cradle-shadow-n), where n is the position of the cradle you want to customize. The individual cradle configurations will override the gradient on that cradle, even if it was manually specified. Customizing a cradle with its corresponding background could look like this:

$ember-newton-cradle-loader: (
  'cradle-bg-1': blue,
  'cradle-shadow-1': darkblue
);

Under the hood, the addon will merge the default settings and any settings supplied in an $ember-newton-cradle-loader map and use those to style the cradle loader.

Be sure to @import the styles into your project after the map if you're using it to customize the look:

@import 'ember-newton-cradle-loader';