Project

easy_flip

0.0
No commit activity in last 3 years
No release in over 3 years
Gem to easily add elements to a Rails app that can flip front to back.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.3
>= 0
 Project Readme

EasyFlip

Gem to easily add elements to a Rails app that can flip front to back.

Installation

Add this line to your application's Gemfile:

gem 'easy_flip'

Add the following directive to your Javascript manifest file (application.js):

//= require easy_flip

Add the following directive to your stylesheet manifest file (application.css):

*= require easy_flip

Also requires jQuery to be setup.

Usage

The following HTML will add a flippable element to your page.

<div class='flip-container'>
  <div class='creation'>
    <div class='front'>
      <div class='cont'>
        CONTENT FOR FRONT
      </div>
    </div>

    <div class='back'>
      <div class='cont panel'>
        CONTENT FOR BACK
      </div>
    </div>
  </div>
</div>

To flip the element with a button, add a link with the class .flip-trigger before the end div for the .flip-container div.

Add .flip-container-hover to the .flip-container div to trigger flip on hover.

To change styling, you can override style elements of the classes used above in your CSS files.

Contributing

If you would like to help improve this gem, please feel free to contribute!

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request