GithubHelp home page GithubHelp logo

jacobmoe / comfy-carousel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from robwu/comfy-carousel

0.0 1.0 1.0 278 KB

Carousel Engine for Rails 3.1+ apps

License: MIT License

Ruby 61.79% JavaScript 37.95% CSS 0.25%

comfy-carousel's Introduction

ComfyCarousel Build Status Dependency Status

This is a small engine that allows you to manage slideshows.

Installation

Add gem definition to your Gemfile:

gem 'comfy_carousel'

Then from the Rails project's root run:

bundle install
rails g comfy:carousel
rake db:migrate

You should be able to access /admin/carousel/carousels where you can add carousels and their slides.

This gem comes bundled with slides.jquery.js that you can use via asset pipeline by adding this line to your app/assets/javascripts/application.js:

//= require slides.jquery

Usage

You'll notice that carousels have dimensions field. You can force-resize uploaded images via ImageMagic values. For example: 300x200# will resize any image to be 300px wide and 200px in height. Also it will crop image if necessary.

There's nothing on the front-end really. You have access to Carousel::Carousel objects that in turn can be used to access their slides. Like so:

@carousel = Carousel::Carousel.find_by_identifier('my_carousel')
@slides = carousel.slides

Each slide will have following attributes: label, content, url, file (paperclip object), and position


ComfyCarousel is released under the MIT license

Copyright 2012 Oleg Khabarov, The Working Group Inc

comfy-carousel's People

Contributors

jacobmoe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.