Sha256: bd4640c1523e1a924af9feea5f2931cc68e5d071228884d991f4813fd6155d76

Contents?: true

Size: 1.5 KB

Versions: 9

Compression:

Stored size: 1.5 KB

Contents

# Application template recipe for the rails_apps_composer. Check for a newer version here:
# https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/css_setup.rb

after_bundler do

  say_wizard "CssSetup recipe running 'after bundler'"

  # Add a stylesheet with styles for a horizontal menu and flash messages
  css = <<-CSS

ul.hmenu {
  list-style: none;
  margin: 0 0 2em;
  padding: 0;
}
ul.hmenu li {
  display: inline;
}
#flash_notice, #flash_alert {
  padding: 5px 8px;
  margin: 10px 0;
}
#flash_notice {
  background-color: #CFC;
  border: solid 1px #6C6;
}
#flash_alert {
  background-color: #FCC;
  border: solid 1px #C66;
}

CSS

  # Add a stylesheet for use with HTML5 Boilerplate
  css_boilerplate = <<-CSS

header nav ul {
  list-style: none;
  margin: 0 0 2em;
  padding: 0;
}
header nav ul li {
  display: inline;
}
#flash_notice, #flash_alert {
  padding: 5px 8px;
  margin: 10px 0;
}
#flash_notice {
  background-color: #CFC;
  border: solid 1px #6C6;
}
#flash_alert {
  background-color: #FCC;
  border: solid 1px #C66;
}

CSS

  if recipes.include? 'rails 3.0'
    create_file 'public/stylesheets/application.css', css
  else
    if recipes.include? 'html5'
      append_file 'app/assets/stylesheets/application.css', css_boilerplate
    else
      append_file 'app/assets/stylesheets/application.css', css
    end
  end

end

__END__

name: CssSetup
description: "Add a stylesheet with styles for a horizontal menu and flash messages."
author: RailsApps

category: other
tags: [utilities, configuration]

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rails_apps_composer-1.0.20 recipes/css_setup.rb
rails_apps_composer-1.0.19 recipes/css_setup.rb
rails_apps_composer-1.0.18 recipes/css_setup.rb
rails_apps_composer-1.0.17 recipes/css_setup.rb
rails_apps_composer-1.0.16 recipes/css_setup.rb
rails_apps_composer-1.0.15 recipes/css_setup.rb
rails_apps_composer-1.0.14 recipes/css_setup.rb
rails_apps_composer-1.0.12 recipes/css_setup.rb
rails_apps_composer-1.0.11 recipes/css_setup.rb