Skip to content

shelling/ladda-sprockets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ladda-sprockets

Ladda is a UI concept merging the loading indicator into the action invoked them. Here we package it for Asset Pipeline usage. The original source is from github.com/hakimel/Ladda where you can check out the instructions. And there is a demo page.

Usage

If there is a Gemfile, declare

gem "ladda-sprockets"

or

require "ladda-sprockets"

in proper situation in your application after $ gem install ladda-sprockets

Then in head of the major javascript file append

//= require "spin"
//= require "ladda"

Note you must declare //= require spin first. Spin is the dependency of Ladda.

If you have manual management of search paths of Sprockets::Environment, Ladda::Sprockets.path will return the path of javascripts.

Stylesheets from Ladda can be loaded with

@import "ladda";
@import "ladda-theme";

Where ladda-theme is optional as documented in original README.

About

the assets for ladda loading indicator

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages