Sha256: 8516cd15ca72c913b13a50d80ac62e2609de84160390959cf8a6d713680b6d49

Contents?: true

Size: 1.28 KB

Versions: 3

Compression:

Stored size: 1.28 KB

Contents

Spree Home Page Features
========================

This adds a section to your spree home page where you can include 'features', which are basically news items. 


Installation
============

First add the reference to your gem file...

    # ./Gemfile
    gem 'spree_home_page_features', '~> 1.2.2'


Then from your console bundle it & install the migration...

    $ bundle install
    $ bundle exec rake spree_home_page_features:install:migrations
    $ bundle exec rake db:migrate


Styles
======

When you create a feature in the backend, you have the option of setting a style. This will add the style as class to the feature div. I intended this to be used to allow the site administrator select a backdrop for the article they are writing. To set the available styles in the dropdown, simply add the list of styles you would like available to a decorator in your models directory...

    # ./app/models/spree/home_page_feature_decorator.rb
    Spree::HomePageFeature.styles = ["style1", "style2", "etc"]

You can then define a css file in your assets folder which define the styles...

    # ./app/assets/stylesheets/store/home_page_feature_styles.css
    li.feature.style1 { background-color: blue }
    li.feature.style2 { background-color: green }
    li.feature.etc    { background-color: orange }

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spree_home_page_features-1.2.5 README.md
spree_home_page_features-1.2.4 README.md
spree_home_page_features-1.2.3 README.md