Add a slider to the spree homepage
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Bèr Kessels cdfd169570 Add crude publish_at feature 5 years ago
app Add crude publish_at feature 4 years ago
config Use spree backend sortable table power 4 years ago
db/migrate Add crude publish_at feature 4 years ago
lib Update install_nivo_generator.rb 5 years ago
script initial commit 7 years ago
spec Adding product_id to slides 6 years ago
vendor/assets Update Nivo slider version 5 years ago
.gitignore Gemfile.lock should not exist in an extension's dir 7 years ago
.rspec initial commit 7 years ago
Gemfile update gemspec to spre 2.2 5 years ago
LICENSE initial commit 7 years ago
README.textile Add instructions to run the migrations on installation 5 years ago
Rakefile moved to gemcutter 6 years ago
Versionfile Still list older versions. 5 years ago
spree_slider.gemspec update gemspec to spre 2.2 5 years ago

README.textile

h1. SpreeSlider

Add a slider to the homepage of your Spree site, and manage the slideshow from within the Admin panel.

h2. Installation

To install, add spree_slider to your @Gemfile@ and run `bundle install`:

<pre>
gem 'spree_slider', github: 'priviterag/spree_slider'
</pre>

Then install and run the migrations to add the tables:
<pre>
bundle exec rake railties:install:migrations
bundle exec rake db:migrate
</pre>

This extension comes with three sliders plugins: Nivo, SimpleCarousel and Anything slider
Depending on which plugin you want to install, run the following command:

h3. Anything slider

<pre>
rails generate spree_slider:install_anything
</pre>

h3. SimpleCarousel slider

<pre>
rails generate spree_slider:install_simple_carousel
</pre>

h3. Nivo slider

<pre>
rails generate spree_slider:install_nivo
</pre>

The slider is almost unstyled. To customize you have to add your own css and
eventually modify the partial copied into your app folder:
app/views/spree/shared/_slider.html.erb

h3. Or Roll your own!

You may want to theme your site your own way. If you want to include your own library such Bootstrap or Foundation.
Just add your own to your asset pipeline, and update your theme templates with appropriate markup. Example:

<pre>
<% if Spree::Slide.published.count > 0 %>
<section id="slideshow">
<ul class="slide">
<% Spree::Slide.published.order('position ASC').each do |s| %>
<li>
<h1><%= s.slide_name %></h1>
<%= link_to image_tag(s.slide_image.url), url_for(s.slide_link) %>
</li>
<% end %>
</ul>
<a title="<%= t(:previous) %>" class="slider-prev"><%= t(:previous)%></a>
<a title="<%= t(:next) %>" class="slider-next"><%= t(:next) %></a>
</section>
<% end %>
</pre>

h2. Dynamic content management

To add dynamic content, go to the spree admin section, under 'Configuration'
and find the Spree Slider menu.

Copyright (c) 2012 "R.S.A.":http://www.rsaweb.com released under the New BSD License