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 +4 -4
- data/CHANGELOG.textile +5 -0
- data/README.textile +19 -10
- data/lib/generators/layout/layout_generator.rb +1 -1
- data/lib/generators/layout/templates/bootstrap2-application.html.erb +2 -2
- data/lib/generators/layout/templates/simple-application.html.erb +24 -0
- data/lib/generators/layout/templates/simple-messages.html.erb +5 -0
- data/lib/generators/layout/templates/simple-navigation.html.erb +3 -0
- data/lib/rails_layout/version.rb +1 -1
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 963c2d2f10231aafe49191bc8218d2eef172f1f8
|
4
|
+
data.tar.gz: fc4808319380719333b28a365c3827c85224df1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e6cdbdb1f19d671725e57f2d85143db0c0f6cf4d097b913be5bee75ac8f2f2d9d5300513068ac16cadd00112a53bbff82d20a7252f43323ce0aff0842095c1c
|
7
|
+
data.tar.gz: 7db9b26002f844f284a47315dcac9535ead97c5250164c485dde858647a459c62a454b35d9c68e50b213e078546c1d2e3a46d55ef89782aae06ed857f2aed195
|
data/CHANGELOG.textile
CHANGED
data/README.textile
CHANGED
@@ -1,10 +1,17 @@
|
|
1
1
|
h1. !http://railsapps.github.io/images/rails-36x36.jpg(Rails Layout Gem)! Rails Layout Gem
|
2
2
|
|
3
|
-
|
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
|
5
|
+
The Rails Layout gem generates application layout files:
|
6
6
|
|
7
|
-
*
|
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.
|
41
|
+
h2. Simple Layout
|
35
42
|
|
36
|
-
To create
|
43
|
+
To create a set of simple layout files:
|
37
44
|
|
38
45
|
<pre>
|
39
|
-
$ rails generate layout
|
46
|
+
$ rails generate layout simple
|
40
47
|
</pre>
|
41
48
|
|
42
|
-
|
49
|
+
h2. Twitter Bootstrap 2.3 Layout
|
43
50
|
|
44
|
-
|
45
|
-
|
46
|
-
|
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 => "
|
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
|
-
|
8
|
-
|
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>
|
data/lib/rails_layout/version.rb
CHANGED
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.
|
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
|