Sha256: cc67803fa2e24ab4bfa9f65cb15322c068b04401749e42071cddb66862ca9a1b

Contents?: true

Size: 1.36 KB

Versions: 2

Compression:

Stored size: 1.36 KB

Contents

# Bookshout Theme #

A Rails gem / engine to make any Rails app look like bookshout.com. Provides a generator for static assets via helper methods.

## Installation ##

Add `bookshout-theme` to your Gemfile

    gem 'bookshout-theme'

## Usage ##

Wrap your application.html `yield` with the header and footer helpers:

    <% # application.html.erb %>
    <%= header %>
    <%= yield %>
    <%= footer %>

If you want to add anything within the `<head></head>` tags or just before the `</body>` tag, you can pass a block to the helpers:

    <%= header do %>
      <%= stylesheet_link_tag 'additional_styles' %>
    <% end %>
    <%= yield %>
    <%= footer do %>
      <!--  this comment only appears on my sub-site -->
    <% end %>

Default navigation links and default web service javascript (Google Analytics, Optimizely, etc.) can be disabled by setting values to false:

    header(add_navigation,add_js)

The layout supports content overwritting by supplying defining `content_for` the following:

    title, description, keywords, body_id, branding


## Modifying / Testing ##

Inside this repo is a `example` folder, containing a Rails app configured to load the gem. You can use this to add any changes in styles. You can also run:

    bundle exec cucumber features

...within that folder to test the gem as though it was installed in a Rails app, so that you know it still works.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bookshout-theme-1.0.1 README.md
bookshout-theme-1.0.0 README.md