Class: Xebec::StylesheetGenerator

Inherits:
Rails::Generator::Base
  • Object
show all
Defined in:
lib/xebec/stylesheet_generator.rb

Overview

The ‘nav_bar` helper method will add the “current” class to the currently-selected item of each navigation bar. Highlighting the item requires just some basic CSS:

nav { color: green; } nav .current { color: purple; }

Each rendered navigation bar will include its name as a CSS class if you want to style them differently:

nav.site { color: green; } nav.area { color: white; background-color: green; }

(In case you were wondering about those ‘nav` elements, they’re part of [the HTML5 specification](dev.w3.org/html5/spec/Overview.html#the-nav-element).

See Also:

Instance Method Summary collapse

Instance Method Details

#manifestObject



22
23
24
25
26
27
# File 'lib/xebec/stylesheet_generator.rb', line 22

def manifest
  record do |m|
    m.directory File.join('public', 'stylesheets')
    m.template 'xebec.css.erb', File.join('public', 'stylesheets', 'xebec.css')
  end
end