Skip to content

refinerycms-contrib/refinerycms-image-slideshows

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 37 commits ahead of jpruetting:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
bin
 
 
 
 
db
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Refinery CMS Image Slideshows

Build Status Code Climate Test Coverage

Image Slideshows engine for Refinery CMS allows you to display multiple slideshows.

Refinery Image Slideshows

Refinery Image Slideshows

In summary you can:

  • Manage slideshows (title, height, width, js config)
  • Manage i18n slides in every slideshow (title, image, caption, body, link_url)

Requirements

This version of refinerycms-image_slideshows supports Refinery 3.x and Rails 4.1+. To use Rails 3.x / Refinery 2.0.x use the refinerycms-image_slideshows "Refinery CMS 2-0 stable branch".

Install

Open up your Gemfile and add at the bottom this line:

gem 'refinerycms-image_slideshows', github: 'bisscomm/refinerycms-image-slideshows', branch: 'master'

Now, run bundle install

Next, to install the products plugin run:

rails generate refinery:image_slideshows

Run database migrations:

rake db:migrate

Finally seed your database and you're done.

rake db:seed

Usage

Add this code in your HTML) :

  <body>
    <% main_slideshow = Refinery::ImageSlideshows::ImageSlideshow.includes(:image_slides).find_by_title('Your Awesome Slideshow Title') %>
    <div id="wrapper">
      <div class="slider-wrapper">
        <div id="slider">
          <% main_slideshow.image_slides.each do |image_slide| %>
            <%= link_to image_slide.link_url do %>
              <%= image_tag image_slide.image.url, :alt => image_slide.title, :title => image_slide.caption %>
            <% end %>
          <% end %>
        </div>
      </div>
    </div>

    <script type="text/javascript">
      $(window).load(function() {
          $('#slider').nivoSlider({
            <%= raw main_slideshow.js_config %>
          });
      });
    </script>
  </body>

Developing & Contributing

The version of Refinery to develop this engine against is defined in the gemspec. To override the version of refinery to develop against, edit the project Gemfile to point to a local path containing a clone of refinerycms.

Testing

Generate the dummy application to test against

$ bundle exec rake refinery:testing:dummy_app

Run the test suite with Guard

$ bundle exec guard start

Or just with rake spec

$ bundle exec rake spec

More Information

About

Image Slideshows engine for Refinery CMS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 73.2%
  • HTML 26.8%