No commit activity in last 3 years
No release in over 3 years
A light wrapper for using dynamo.js with Ruby on Rails
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
 Project Readme

dynamojs_rails

A light wrapper for using dynamo.js with Ruby on Rails.

Build Status

Installation

In your Gemfile:

gem 'dynamojs_rails'

Then run:

$ bundle

Include dynamo in app/assets/javascripts/application.js

//= require dynamo

Usage

dynamo_tag :span, %w{one two}
# => <span class="dynamo" data-lines="two">one</span>

dynamo_tag :h2, %w{one two}, {
  center: true,
  speed: 100,
  delay: 1000,
  pause: true,
  callback: "dynamoCallback",
  class: "blinking"
}
# => <span class="blinking dynamo" data-callback="dynamoCallback" data-center="true"
  data-delay="1000" data-lines="two" data-pause="true" data-speed="100">one</span>

All elements with the .dynamo class will are already invoked with $.dynamo()

Options

  • speed: the speed of the transition (default: 350ms)
  • delay: the delay between transitions (default: 3000ms)
  • center: center the text in the dynamo container (default: false)
  • pause: sets up the dynamo, but does not automatically transition (default: false)
  • callback: a javascript function name to be called each time the dynamo container completes a full cycle

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Add a test for it in spec/dynamo_spec.rb and make sure tests pass when you run rake
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request