GithubHelp home page GithubHelp logo

bricesanchez / refinerycms-image-slideshows Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rossfuhrman/refinerycms-image-slideshows

0.0 1.0 1.0 160 KB

Image Slideshows engine for Refinery CMS

Home Page: http://refinerycms.com

refinerycms-image-slideshows's Introduction

Image Slideshows

Refinery Image Slideshows

Refinery Image Slideshows

About

Image Slideshows allows you to create groups of images for use by a JavaScript image slider.

Suggested image slider: Nivo Slider

Requirements

Refinery CMS "core" engine version 2.0.0 or later.

Gem Installation

Include the latest gem into your Refinery CMS application's Gemfile:

gem "refinerycms-image_slideshows", '~> 1.0'

Then type the following at the command line inside your Refinery CMS application's root directory:

bundle install
rails generate refinery:image_slideshows
rake db:migrate
rake db:seed

How to display a slideshow with Nivo Slider:

  <body>
    <% main_slideshow = Refinery::ImageSlideshows::ImageSlideshow.find_by_title('Demo') %>
    <div id="wrapper">
      <div class="slider-wrapper theme-default">
        <div id="slider" class="nivoSlider">
          <% 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" src="/javascripts/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="/javascripts/jquery.nivo.slider.js"></script>
    <script type="text/javascript">
      $(window).load(function() {
          $('#slider').nivoSlider({
            <%= raw main_slideshow.js_config %>
          });
      });
    </script>
  </body>

refinerycms-image-slideshows's People

Watchers

 avatar

Forkers

gitter-badger

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.