rails_layout 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a7ea61a29cf64b276865b9a2867d425bd38f7206
4
- data.tar.gz: 2963be0a47813f1dad61a70bd6440c3ab5ef71bc
3
+ metadata.gz: 963c2d2f10231aafe49191bc8218d2eef172f1f8
4
+ data.tar.gz: fc4808319380719333b28a365c3827c85224df1e
5
5
  SHA512:
6
- metadata.gz: 88b7d85ed383111ed4cf63d7094033acb80d61d4e70d1da4ada892aca496ac3c9c2493b46d142484c8d1e0659487b8412d9652ffc378243636cbc985053b9d71
7
- data.tar.gz: bb1518cc9f275f996afce3f07f372fa97757c64fed7357886b3b4ac0800874f7a5d7776b9fdb117f88ae81eeb70a5067831ada5f726393dc9a626c3141fd7d3a
6
+ metadata.gz: 0e6cdbdb1f19d671725e57f2d85143db0c0f6cf4d097b913be5bee75ac8f2f2d9d5300513068ac16cadd00112a53bbff82d20a7252f43323ce0aff0842095c1c
7
+ data.tar.gz: 7db9b26002f844f284a47315dcac9535ead97c5250164c485dde858647a459c62a454b35d9c68e50b213e078546c1d2e3a46d55ef89782aae06ed857f2aed195
@@ -1,5 +1,10 @@
1
1
  h1. CHANGELOG
2
2
 
3
+ h2. 0.1.2 September 20, 2013
4
+
5
+ * add simple layout files
6
+ * add missing turbolinks attributes
7
+
3
8
  h2. 0.1.1 September 19, 2013
4
9
 
5
10
  * add navigation links for 'About' or 'Contact' if view files exist in expected locations
@@ -1,10 +1,17 @@
1
1
  h1. !http://railsapps.github.io/images/rails-36x36.jpg(Rails Layout Gem)! Rails Layout Gem
2
2
 
3
- The Rails Layout gem creates application layout files. It is a Rails generator that you add to your Rails application Gemfile.
3
+ Rails Layout is a utility gem you can use during development to set up a default application layout with partials for Rails flash messages and navigation links. It is a Rails generator that you add to your Rails application Gemfile.
4
4
 
5
- The Rails Layout gem generates application layout files suitable for use with the following front-end frameworks:
5
+ The Rails Layout gem generates application layout files:
6
6
 
7
- * Twitter Bootstrap 2.3
7
+ * app/views/layouts/application.html.erb
8
+ * app/views/layouts/_messages.html.erb
9
+ * app/views/layouts/_navigation.html.erb
10
+
11
+ There are options to generate layout files suitable for use with the following front-end frameworks:
12
+
13
+ * @simple@ - simple layout
14
+ * @bootstrap2@ - Twitter Bootstrap 2.3
8
15
  * (more to come)
9
16
 
10
17
  h2. Installation
@@ -31,19 +38,21 @@ Use Bundler to install the gem:
31
38
  $ bundle install
32
39
  </pre>
33
40
 
34
- h2. Generating Layouts
41
+ h2. Simple Layout
35
42
 
36
- To create layout files for use with Twitter Bootstrap 2.3:
43
+ To create a set of simple layout files:
37
44
 
38
45
  <pre>
39
- $ rails generate layout bootstrap2
46
+ $ rails generate layout simple
40
47
  </pre>
41
48
 
42
- Creates files:
49
+ h2. Twitter Bootstrap 2.3 Layout
43
50
 
44
- * app/views/layouts/application.html.erb
45
- * app/views/layouts/_messages.html.erb
46
- * app/views/layouts/_navigation.html.erb
51
+ To create layout files for use with Twitter Bootstrap 2.3:
52
+
53
+ <pre>
54
+ $ rails generate layout bootstrap2
55
+ </pre>
47
56
 
48
57
  h2. Help
49
58
 
@@ -4,7 +4,7 @@ module Layout
4
4
  module Generators
5
5
  class LayoutGenerator < ::Rails::Generators::Base
6
6
  source_root File.expand_path("../templates", __FILE__)
7
- argument :framework_name, :type => :string, :default => "bootstrap2"
7
+ argument :framework_name, :type => :string, :default => "simple"
8
8
 
9
9
  attr_reader :app_name
10
10
 
@@ -4,8 +4,8 @@
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
5
  <title><%%= content_for?(:title) ? yield(:title) : "<%= app_name.underscore.titleize %>" %></title>
6
6
  <meta name="description" content="<%%= content_for?(:description) ? yield(:description) : "<%= app_name.underscore.titleize %>" %>">
7
- <%%= stylesheet_link_tag "application", :media => "all" %>
8
- <%%= javascript_include_tag "application" %>
7
+ <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
8
+ <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
9
9
  <%%= csrf_meta_tags %>
10
10
  </head>
11
11
  <body>
@@ -0,0 +1,24 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
+ <title><%= content_for?(:title) ? yield(:title) : "<%= app_name.underscore.titleize %>" %></title>
6
+ <meta name="description" content="<%= content_for?(:description) ? yield(:description) : "<%= app_name.underscore.titleize %>" %>">
7
+ <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
8
+ <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
9
+ <%= csrf_meta_tags %>
10
+ </head>
11
+ <body>
12
+ <div id="container">
13
+ <header>
14
+ <%= render 'layouts/navigation' %>
15
+ <%= render 'layouts/messages' %>
16
+ </header>
17
+ <main role="main">
18
+ <%= yield %>
19
+ </main>
20
+ <footer>
21
+ </footer>
22
+ </div>
23
+ </body>
24
+ </html>
@@ -0,0 +1,5 @@
1
+ <% flash.each do |name, msg| %>
2
+ <% if msg.is_a?(String) %>
3
+ <%= content_tag :div, msg, :id => "flash_#{name}" %>
4
+ <% end %>
5
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <ul class="nav">
2
+ <li><%= link_to 'Home', root_path %></li>
3
+ </ul>
@@ -1,3 +1,3 @@
1
1
  module RailsLayout
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_layout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Kehoe
@@ -57,6 +57,9 @@ files:
57
57
  - lib/generators/layout/templates/bootstrap2-application.html.erb
58
58
  - lib/generators/layout/templates/bootstrap2-messages.html.erb
59
59
  - lib/generators/layout/templates/bootstrap2-navigation.html.erb
60
+ - lib/generators/layout/templates/simple-application.html.erb
61
+ - lib/generators/layout/templates/simple-messages.html.erb
62
+ - lib/generators/layout/templates/simple-navigation.html.erb
60
63
  - lib/rails_layout.rb
61
64
  - lib/rails_layout/version.rb
62
65
  - rails_layout.gemspec