A set of layout helpers for Rails
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app/helpers
lib
.gitignore
.rvmrc
Gemfile
MIT-LICENSE
README.md
Rakefile
selectra_layout.gemspec

README.md

Selectra Layout

A set of helpers to ease the page layout.

Installation

Add the following line in your Gemfile:

gem 'selectra_layout'

Page Helper

Page Helper provides the following helpers:

# In your views
<% classes 'someclass someotherclass' %>

# In your layout
<body class="<%= page_classes %>">

Title Helper

Title Helper provides the following helpers:

# In your views
<% title 'this is a page' %>

# In your layout
<html>
  <head>
    <title><%= site_title %></title>
  </head>
  <body>
    <h1><%= page_title %></h1>
    ...
  </body>
</html>

Set the site title

To set the site title, go to your locale file config/locales/en.yml and set site_name:

en:
  site_name: "My Great Site"

Head Helper

Head Helper provides the following helpers:

# In your views
<% description 'this is for the meta description' %>

# In your layout
<head>
  <title>...</title>
  <%= description_meta_tag %>
</head>