rails_layout 0.5.11 → 1.0.0
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 +6 -0
- data/README.textile +169 -139
- data/lib/generators/.DS_Store +0 -0
- data/lib/generators/layout/devise/.DS_Store +0 -0
- data/lib/generators/layout/devise/devise_generator.rb +37 -0
- data/lib/generators/layout/devise/templates/.DS_Store +0 -0
- data/lib/generators/layout/devise/templates/bootstrap3.css.scss +20 -0
- data/lib/generators/layout/devise/templates/foundation5.css.scss +25 -0
- data/lib/generators/layout/devise/templates/sessions/new.html.erb +26 -0
- data/lib/generators/layout/{.DS_Store → install/.DS_Store} +0 -0
- data/lib/generators/layout/{layout_generator.rb → install/install_generator.rb} +3 -1
- data/lib/generators/layout/{templates → install/templates}/application.css.scss +0 -0
- data/lib/generators/layout/{templates → install/templates}/application.js +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap-application.js +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap2-application.html.erb +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap2-application.html.haml +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap2-application.html.slim +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap2-messages.html.erb +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap2-messages.html.haml +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap2-messages.html.slim +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap2-navigation.html.erb +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap2-navigation.html.haml +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap2-navigation.html.slim +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap2_and_overrides.css.scss +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap3-application.html.erb +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap3-application.html.haml +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap3-application.html.slim +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap3-messages.html.erb +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap3-messages.html.haml +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap3-messages.html.slim +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap3-navigation.html.erb +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap3-navigation.html.haml +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap3-navigation.html.slim +0 -0
- data/lib/generators/layout/{templates → install/templates}/bootstrap3_and_overrides.css.scss +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation4-application.html.erb +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation4-application.html.haml +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation4-application.html.slim +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation4-application.js +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation4-messages.html.erb +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation4-messages.html.haml +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation4-messages.html.slim +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation4-navigation.html.erb +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation4-navigation.html.haml +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation4-navigation.html.slim +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation4_and_overrides.css.scss +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation5-application.html.erb +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation5-application.html.haml +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation5-application.html.slim +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation5-application.js +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation5-messages.html.erb +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation5-messages.html.haml +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation5-messages.html.slim +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation5-navigation.html.erb +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation5-navigation.html.haml +1 -1
- data/lib/generators/layout/{templates → install/templates}/foundation5-navigation.html.slim +0 -0
- data/lib/generators/layout/{templates → install/templates}/foundation5_and_overrides.css.scss +0 -0
- data/lib/generators/layout/{templates → install/templates}/navigation_links.html.erb +0 -0
- data/lib/generators/layout/{templates → install/templates}/navigation_links.html.slim +0 -0
- data/lib/generators/layout/{templates → install/templates}/none-application.html.erb +0 -0
- data/lib/generators/layout/{templates → install/templates}/none-application.html.haml +0 -0
- data/lib/generators/layout/{templates → install/templates}/none-application.html.slim +0 -0
- data/lib/generators/layout/{templates → install/templates}/simple-application.html.erb +0 -0
- data/lib/generators/layout/{templates → install/templates}/simple-application.html.haml +0 -0
- data/lib/generators/layout/{templates → install/templates}/simple-application.html.slim +0 -0
- data/lib/generators/layout/{templates → install/templates}/simple-messages.html.erb +0 -0
- data/lib/generators/layout/{templates → install/templates}/simple-messages.html.haml +0 -0
- data/lib/generators/layout/{templates → install/templates}/simple-messages.html.slim +0 -0
- data/lib/generators/layout/{templates → install/templates}/simple-navigation.html.erb +0 -0
- data/lib/generators/layout/{templates → install/templates}/simple-navigation.html.haml +0 -0
- data/lib/generators/layout/{templates → install/templates}/simple-navigation.html.slim +0 -0
- data/lib/generators/layout/{templates → install/templates}/simple.css +0 -0
- data/lib/generators/layout/navigation/.DS_Store +0 -0
- data/lib/generators/{navigation → layout/navigation}/navigation_generator.rb +3 -1
- data/lib/generators/{navigation → layout/navigation}/templates/navigation_links.html.erb +0 -0
- data/lib/rails_layout/version.rb +1 -1
- metadata +74 -67
- data/lib/generators/layout/USAGE +0 -38
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 50274237c3f45d7435ac0ce7f03fc6d0da91e5d7
|
|
4
|
+
data.tar.gz: 4ca540793d7902b02e5c8b353b0eab95eb6b4c6b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 888f101447c945b748df08d79c4c36583543a3f9ab941824abf354392232fcb72ed9757c9f12a81b1257bcb7e14737ba1d2c69146c2372b36df78c17b210d0e9
|
|
7
|
+
data.tar.gz: ee091c04a581aabc3635f289233222ff896b5ed8e272b61e5ca44f3a3696cd3f329cb2094448896b57f257c0ccc04c51cf49c7a7b9082f4afae0b5f7844504cf
|
data/CHANGELOG.textile
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
h1. CHANGELOG
|
|
2
2
|
|
|
3
|
+
h3. 1.0.0 January 9, 2014
|
|
4
|
+
|
|
5
|
+
* generate Devise views (login view)
|
|
6
|
+
* change generator commands (described in README)
|
|
7
|
+
* Haml Foundation 5 topbar syntax correction (fixes #11) (contributed by i5okie)
|
|
8
|
+
|
|
3
9
|
h3. 0.5.11 January 5, 2014
|
|
4
10
|
|
|
5
11
|
* fix Devise navigation links (when there is no 'has_role?' for authorization)
|
data/README.textile
CHANGED
|
@@ -1,111 +1,61 @@
|
|
|
1
1
|
h1. !http://railsapps.github.io/images/rails-36x36.jpg(RailsLayout Gem)! RailsLayout Gem
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Use it to set up your choice of front-end framework:
|
|
3
|
+
Use this gem to set up layout files for your choice of front-end framework:
|
|
6
4
|
|
|
7
|
-
* Bootstrap 2.3
|
|
8
|
-
* Bootstrap 3.0
|
|
9
|
-
* Zurb Foundation 4.0
|
|
10
5
|
* Zurb Foundation 5.0
|
|
6
|
+
* Zurb Foundation 4.0
|
|
7
|
+
* Bootstrap 3.0
|
|
8
|
+
* Bootstrap 2.3
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
It will rename *application.css* to *application.css.scss*.
|
|
15
|
-
|
|
16
|
-
It will add:
|
|
17
|
-
|
|
18
|
-
* *framework_and_overrides.css.scss*
|
|
19
|
-
|
|
20
|
-
And modify the JavaScript asset file:
|
|
21
|
-
|
|
22
|
-
* *application.js*
|
|
23
|
-
|
|
24
|
-
It will set up a default application layout.
|
|
25
|
-
|
|
26
|
-
It creates partials for:
|
|
27
|
-
|
|
28
|
-
* Rails flash messages
|
|
29
|
-
* navigation links
|
|
30
|
-
|
|
31
|
-
You can also generate a navigation links file suitable for use with Devise (the authentication gem).
|
|
32
|
-
|
|
33
|
-
h4. Supported Frameworks
|
|
34
|
-
|
|
35
|
-
You can generate layout files suitable for use with the following front-end frameworks:
|
|
36
|
-
|
|
37
|
-
* @simple@ - simple layout
|
|
38
|
-
* @bootstrap2@ - Bootstrap 2.3
|
|
39
|
-
* @bootstrap3@ - Bootstrap 3.0
|
|
40
|
-
* @foundation4@ - Zurb Foundation 4.0
|
|
41
|
-
* @foundation5@ - Zurb Foundation 5.0
|
|
42
|
-
* @none@ - removes all changes
|
|
43
|
-
|
|
44
|
-
h4. Generated Files
|
|
45
|
-
|
|
46
|
-
The RailsLayout gem generates application layout files:
|
|
47
|
-
|
|
48
|
-
* app/views/layouts/application.html.erb
|
|
49
|
-
* app/views/layouts/_messages.html.erb
|
|
50
|
-
* app/views/layouts/_navigation.html.erb
|
|
51
|
-
* app/views/layouts/_navigation_links.html.erb
|
|
52
|
-
|
|
53
|
-
Additionally, when the @simple@ option is selected:
|
|
54
|
-
|
|
55
|
-
* app/assets/stylesheets/simple.css
|
|
56
|
-
|
|
57
|
-
h4. Note About the Navigation Partials
|
|
58
|
-
|
|
59
|
-
Two navigation partials are created:
|
|
60
|
-
|
|
61
|
-
* app/views/layouts/_navigation_links.html.erb
|
|
62
|
-
* app/views/layouts/_navigation.html.erb
|
|
63
|
-
|
|
64
|
-
The first file contains no framework-specific styling. It is only a list of links. You can add additional links to this file as needed.
|
|
10
|
+
Plus it will set up "Devise":https://github.com/plataformatec/devise views with styling for Bootstrap or Foundation.
|
|
65
11
|
|
|
66
|
-
|
|
12
|
+
RailsLayout is a utility gem to use during development.
|
|
67
13
|
|
|
68
|
-
h4.
|
|
14
|
+
h4. Rails Composer
|
|
69
15
|
|
|
70
|
-
|
|
16
|
+
The RailsLayout gem is used by "Rails Composer":http://railsapps.github.io/rails-composer/ tool, an application template used to create starter applications. You can use Rails Composer to generate entire applications.
|
|
71
17
|
|
|
72
|
-
|
|
18
|
+
h2. Command Summary
|
|
73
19
|
|
|
74
|
-
h4.
|
|
20
|
+
h4. Generate Application Layout, Navigation, and Flash Message Files
|
|
75
21
|
|
|
76
|
-
|
|
22
|
+
* @$ rails generate layout:install foundation5@
|
|
23
|
+
* @$ rails generate layout:install foundation4@
|
|
24
|
+
* @$ rails generate layout:install bootstrap3@
|
|
25
|
+
* @$ rails generate layout:install bootstrap2@
|
|
26
|
+
* @$ rails generate layout:install simple@
|
|
27
|
+
* @$ rails generate layout:install none@
|
|
77
28
|
|
|
78
|
-
h4.
|
|
29
|
+
h4. Add Links to the Navigation File
|
|
79
30
|
|
|
80
|
-
|
|
31
|
+
* @$ $ rails generate layout:navigation@
|
|
81
32
|
|
|
82
|
-
|
|
33
|
+
h4. Generate Devise Views
|
|
83
34
|
|
|
84
|
-
|
|
35
|
+
* @$ rails generate layout:devise foundation5@
|
|
36
|
+
* @$ rails generate layout:devise bootstrap3@
|
|
85
37
|
|
|
86
|
-
|
|
38
|
+
h2. Installing a Front-End Framework
|
|
87
39
|
|
|
88
|
-
|
|
89
|
-
* "*Rails and Bootstrap*":http://railsapps.github.io/twitter-bootstrap-rails.html
|
|
90
|
-
* "*Rails and Foundation*":http://railsapps.github.io/rails-foundation.html
|
|
40
|
+
Refer to instructions for:
|
|
91
41
|
|
|
92
|
-
|
|
42
|
+
* "Foundation and Rails":http://railsapps.github.io/rails-foundation.html
|
|
43
|
+
* "Bootstrap and Rails":http://railsapps.github.io/twitter-bootstrap-rails.html
|
|
93
44
|
|
|
94
|
-
|
|
45
|
+
In summary, to install a front-end framework, add the gems you need. Then use the RailsLayout gem. It will set up your assets files.
|
|
95
46
|
|
|
96
47
|
Add the gems you need to your Rails application Gemfile:
|
|
97
48
|
|
|
98
|
-
h4.
|
|
49
|
+
h4. Zurb Foundation 5.0
|
|
99
50
|
|
|
100
51
|
<pre>
|
|
101
|
-
gem '
|
|
52
|
+
gem 'foundation-rails'
|
|
102
53
|
</pre>
|
|
103
54
|
|
|
104
|
-
|
|
55
|
+
Note: Check the status of these issues before using Foundation 5.0:
|
|
105
56
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
</pre>
|
|
57
|
+
* "Foundation 5 requires JavaScript included in BODY not HEAD":https://github.com/zurb/foundation/issues/3643
|
|
58
|
+
* "Foundation 5 topbar incompatible with Rails Turbolinks":https://github.com/zurb/foundation/issues/3642
|
|
109
59
|
|
|
110
60
|
h4. Zurb Foundation 4.0
|
|
111
61
|
|
|
@@ -114,16 +64,17 @@ gem 'compass-rails'
|
|
|
114
64
|
gem 'zurb-foundation'
|
|
115
65
|
</pre>
|
|
116
66
|
|
|
117
|
-
h4.
|
|
67
|
+
h4. Bootstrap 3.0
|
|
118
68
|
|
|
119
69
|
<pre>
|
|
120
|
-
gem '
|
|
70
|
+
gem 'bootstrap-sass'
|
|
121
71
|
</pre>
|
|
122
72
|
|
|
123
|
-
|
|
73
|
+
h4. Bootstrap 2.3
|
|
124
74
|
|
|
125
|
-
|
|
126
|
-
|
|
75
|
+
<pre>
|
|
76
|
+
gem 'bootstrap-sass', '~> 2.3.2.2'
|
|
77
|
+
</pre>
|
|
127
78
|
|
|
128
79
|
h4. Use Bundler
|
|
129
80
|
|
|
@@ -159,75 +110,146 @@ Use Bundler to install the gem:
|
|
|
159
110
|
$ bundle install
|
|
160
111
|
</pre>
|
|
161
112
|
|
|
162
|
-
h2.
|
|
113
|
+
h2. The "layout:install" Command
|
|
163
114
|
|
|
164
|
-
|
|
115
|
+
The command will rename *application.css* to *application.css.scss*.
|
|
165
116
|
|
|
166
|
-
|
|
117
|
+
It will add:
|
|
167
118
|
|
|
168
|
-
|
|
119
|
+
* *framework_and_overrides.css.scss*
|
|
120
|
+
|
|
121
|
+
And modify the JavaScript asset file:
|
|
122
|
+
|
|
123
|
+
* *application.js*
|
|
124
|
+
|
|
125
|
+
It will set up a default application layout.
|
|
126
|
+
|
|
127
|
+
It creates partials for:
|
|
128
|
+
|
|
129
|
+
* Rails flash messages
|
|
130
|
+
* navigation links
|
|
131
|
+
|
|
132
|
+
h4. Supported Frameworks
|
|
133
|
+
|
|
134
|
+
You can generate layout files suitable for use with the following front-end frameworks:
|
|
135
|
+
|
|
136
|
+
* @foundation5@ - Zurb Foundation 5.0
|
|
137
|
+
* @foundation4@ - Zurb Foundation 4.0
|
|
138
|
+
* @bootstrap3@ - Bootstrap 3.0
|
|
139
|
+
* @bootstrap2@ - Bootstrap 2.3
|
|
140
|
+
* @simple@ - simple layout
|
|
141
|
+
* @none@ - removes all changes
|
|
142
|
+
|
|
143
|
+
h4. Generated Files
|
|
144
|
+
|
|
145
|
+
The RailsLayout gem generates application layout files:
|
|
146
|
+
|
|
147
|
+
* app/views/layouts/application.html.erb
|
|
148
|
+
* app/views/layouts/_messages.html.erb
|
|
149
|
+
* app/views/layouts/_navigation.html.erb
|
|
150
|
+
* app/views/layouts/_navigation_links.html.erb
|
|
151
|
+
|
|
152
|
+
Additionally, when the @simple@ option is selected:
|
|
153
|
+
|
|
154
|
+
* app/assets/stylesheets/simple.css
|
|
155
|
+
|
|
156
|
+
h4. Note About the Navigation Partials
|
|
157
|
+
|
|
158
|
+
Two navigation partials are created:
|
|
159
|
+
|
|
160
|
+
* app/views/layouts/_navigation_links.html.erb
|
|
161
|
+
* app/views/layouts/_navigation.html.erb
|
|
162
|
+
|
|
163
|
+
The first file contains no framework-specific styling. It is only a list of links. You can add additional links to this file as needed.
|
|
164
|
+
|
|
165
|
+
The second file contains framework-specific styling.
|
|
166
|
+
|
|
167
|
+
h4. Support for ERB, Haml, or Slim
|
|
168
|
+
|
|
169
|
+
If you are using ERB for Rails views, the RailsLayout gem will generate ERB files.
|
|
170
|
+
|
|
171
|
+
If you are using Haml or Slim, the RailsLayout gem will generate Haml or Slim files instead.
|
|
172
|
+
|
|
173
|
+
h4. Additional Documentation
|
|
174
|
+
|
|
175
|
+
See these articles for information about how to set up the application layout:
|
|
176
|
+
|
|
177
|
+
* "*Rails Application Layout*":http://railsapps.github.io/rails-default-application-layout.html
|
|
178
|
+
* "*Rails and Bootstrap*":http://railsapps.github.io/twitter-bootstrap-rails.html
|
|
179
|
+
* "*Rails and Foundation*":http://railsapps.github.io/rails-foundation.html
|
|
180
|
+
|
|
181
|
+
Look at the "Learn Rails":https://github.com/RailsApps/learn-rails example application to see how the generated files from the RailsLayout gem are used. You'll find details about the example application in the book "Learn Ruby on Rails":http://learn-rails.com/learn-ruby-on-rails.html.
|
|
182
|
+
|
|
183
|
+
!http://railsapps.github.io/images/learn-rails-cover-130x161.jpg(Learn Ruby on Rails)!:http://learn-rails.com/learn-ruby-on-rails.html
|
|
184
|
+
|
|
185
|
+
h3. Zurb Foundation 5.0 Layout
|
|
186
|
+
|
|
187
|
+
To create layout files for use with Zurb Foundation 5.0:
|
|
169
188
|
|
|
170
189
|
<pre>
|
|
171
|
-
$ rails generate layout
|
|
190
|
+
$ rails generate layout:install foundation5
|
|
172
191
|
</pre>
|
|
173
192
|
|
|
174
193
|
Use @--force@ if you want to overwrite existing files:
|
|
175
194
|
|
|
176
195
|
<pre>
|
|
177
|
-
$ rails generate layout
|
|
196
|
+
$ rails generate layout:install foundation5 --force
|
|
178
197
|
</pre>
|
|
179
198
|
|
|
180
199
|
See the files that are generated:
|
|
181
200
|
|
|
182
|
-
* "app/views/layouts/application.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/
|
|
183
|
-
* "app/views/layouts/_messages.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/
|
|
184
|
-
* "app/views/layouts/_navigation.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/
|
|
185
|
-
* "app/assets/stylesheets/simple.css":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/simple.css
|
|
201
|
+
* "app/views/layouts/application.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/foundation5-application.html.erb
|
|
202
|
+
* "app/views/layouts/_messages.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/foundation4-messages.html.erb
|
|
203
|
+
* "app/views/layouts/_navigation.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/foundation5-navigation.html.erb
|
|
186
204
|
|
|
187
205
|
The RailsLayout gem will create the file:
|
|
188
206
|
|
|
189
|
-
* "app/assets/stylesheets/
|
|
207
|
+
* "app/assets/stylesheets/framework_and_overrides.css.scss":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/foundation5_and_overrides.css.scss
|
|
190
208
|
|
|
191
|
-
|
|
209
|
+
and modify the file:
|
|
192
210
|
|
|
193
|
-
|
|
211
|
+
* "app/assets/javascripts/application.js":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/foundation5-application.js
|
|
212
|
+
|
|
213
|
+
h3. Zurb Foundation 4.0 Layout
|
|
214
|
+
|
|
215
|
+
To create layout files for use with Zurb Foundation 4.0:
|
|
194
216
|
|
|
195
217
|
<pre>
|
|
196
|
-
$ rails generate layout
|
|
218
|
+
$ rails generate layout:install foundation4
|
|
197
219
|
</pre>
|
|
198
220
|
|
|
199
221
|
Use @--force@ if you want to overwrite existing files:
|
|
200
222
|
|
|
201
223
|
<pre>
|
|
202
|
-
$ rails generate layout
|
|
224
|
+
$ rails generate layout:install foundation4 --force
|
|
203
225
|
</pre>
|
|
204
226
|
|
|
205
227
|
See the files that are generated:
|
|
206
228
|
|
|
207
|
-
* "app/views/layouts/application.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/
|
|
208
|
-
* "app/views/layouts/_messages.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/
|
|
209
|
-
* "app/views/layouts/_navigation.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/
|
|
229
|
+
* "app/views/layouts/application.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/foundation4-application.html.erb
|
|
230
|
+
* "app/views/layouts/_messages.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/foundation4-messages.html.erb
|
|
231
|
+
* "app/views/layouts/_navigation.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/foundation4-navigation.html.erb
|
|
210
232
|
|
|
211
233
|
The RailsLayout gem will create the file:
|
|
212
234
|
|
|
213
|
-
* "app/assets/stylesheets/framework_and_overrides.css.scss":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/
|
|
235
|
+
* "app/assets/stylesheets/framework_and_overrides.css.scss":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/foundation4_and_overrides.css.scss
|
|
214
236
|
|
|
215
237
|
and modify the file:
|
|
216
238
|
|
|
217
|
-
* "app/assets/javascripts/application.js":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/
|
|
239
|
+
* "app/assets/javascripts/application.js":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/foundation4-application.js
|
|
218
240
|
|
|
219
241
|
h3. Bootstrap 3.0 Layout
|
|
220
242
|
|
|
221
243
|
To create layout files for use with Bootstrap 3.0:
|
|
222
244
|
|
|
223
245
|
<pre>
|
|
224
|
-
$ rails generate layout bootstrap3
|
|
246
|
+
$ rails generate layout:install bootstrap3
|
|
225
247
|
</pre>
|
|
226
248
|
|
|
227
249
|
Use @--force@ if you want to overwrite existing files:
|
|
228
250
|
|
|
229
251
|
<pre>
|
|
230
|
-
$ rails generate layout bootstrap3 --force
|
|
252
|
+
$ rails generate layout:install bootstrap3 --force
|
|
231
253
|
</pre>
|
|
232
254
|
|
|
233
255
|
See the files that are generated:
|
|
@@ -244,68 +266,65 @@ and modify the file:
|
|
|
244
266
|
|
|
245
267
|
* "app/assets/javascripts/application.js":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/bootstrap-application.js
|
|
246
268
|
|
|
247
|
-
h3.
|
|
269
|
+
h3. Bootstrap 2.3 Layout
|
|
248
270
|
|
|
249
|
-
To create layout files for use with
|
|
271
|
+
To create layout files for use with Bootstrap 2.3:
|
|
250
272
|
|
|
251
273
|
<pre>
|
|
252
|
-
$ rails generate layout
|
|
274
|
+
$ rails generate layout:install bootstrap2
|
|
253
275
|
</pre>
|
|
254
276
|
|
|
255
277
|
Use @--force@ if you want to overwrite existing files:
|
|
256
278
|
|
|
257
279
|
<pre>
|
|
258
|
-
$ rails generate layout
|
|
280
|
+
$ rails generate layout:install bootstrap2 --force
|
|
259
281
|
</pre>
|
|
260
282
|
|
|
261
283
|
See the files that are generated:
|
|
262
284
|
|
|
263
|
-
* "app/views/layouts/application.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/
|
|
264
|
-
* "app/views/layouts/_messages.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/
|
|
265
|
-
* "app/views/layouts/_navigation.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/
|
|
285
|
+
* "app/views/layouts/application.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/bootstrap2-application.html.erb
|
|
286
|
+
* "app/views/layouts/_messages.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/bootstrap2-messages.html.erb
|
|
287
|
+
* "app/views/layouts/_navigation.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/bootstrap2-navigation.html.erb
|
|
266
288
|
|
|
267
289
|
The RailsLayout gem will create the file:
|
|
268
290
|
|
|
269
|
-
* "app/assets/stylesheets/framework_and_overrides.css.scss":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/
|
|
291
|
+
* "app/assets/stylesheets/framework_and_overrides.css.scss":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/bootstrap2_and_overrides.css.scss
|
|
270
292
|
|
|
271
293
|
and modify the file:
|
|
272
294
|
|
|
273
|
-
* "app/assets/javascripts/application.js":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/
|
|
295
|
+
* "app/assets/javascripts/application.js":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/bootstrap-application.js
|
|
274
296
|
|
|
275
|
-
h3.
|
|
297
|
+
h3. Generate a Simple Layout
|
|
276
298
|
|
|
277
|
-
To create
|
|
299
|
+
To create a set of simple layout files:
|
|
278
300
|
|
|
279
301
|
<pre>
|
|
280
|
-
$ rails generate layout
|
|
302
|
+
$ rails generate layout:install simple
|
|
281
303
|
</pre>
|
|
282
304
|
|
|
283
305
|
Use @--force@ if you want to overwrite existing files:
|
|
284
306
|
|
|
285
307
|
<pre>
|
|
286
|
-
$ rails generate layout
|
|
308
|
+
$ rails generate layout:install simple --force
|
|
287
309
|
</pre>
|
|
288
310
|
|
|
289
311
|
See the files that are generated:
|
|
290
312
|
|
|
291
|
-
* "app/views/layouts/application.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/
|
|
292
|
-
* "app/views/layouts/_messages.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/
|
|
293
|
-
* "app/views/layouts/_navigation.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/
|
|
313
|
+
* "app/views/layouts/application.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/simple-application.html.erb
|
|
314
|
+
* "app/views/layouts/_messages.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/simple-messages.html.erb
|
|
315
|
+
* "app/views/layouts/_navigation.html.erb":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/simple-navigation.html.erb
|
|
316
|
+
* "app/assets/stylesheets/simple.css":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/simple.css
|
|
294
317
|
|
|
295
318
|
The RailsLayout gem will create the file:
|
|
296
319
|
|
|
297
|
-
* "app/assets/stylesheets/
|
|
298
|
-
|
|
299
|
-
and modify the file:
|
|
300
|
-
|
|
301
|
-
* "app/assets/javascripts/application.js":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/foundation5-application.js
|
|
320
|
+
* "app/assets/stylesheets/application.css.scss":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/application.css.scss
|
|
302
321
|
|
|
303
322
|
h3. Reverting to None
|
|
304
323
|
|
|
305
324
|
To revert your application to a default application layout:
|
|
306
325
|
|
|
307
326
|
<pre>
|
|
308
|
-
$ rails generate layout none
|
|
327
|
+
$ rails generate layout:install none
|
|
309
328
|
</pre>
|
|
310
329
|
|
|
311
330
|
The RailsLayout gem will remove any files it may have added:
|
|
@@ -324,12 +343,14 @@ Additionally, it will restore these files to the default versions:
|
|
|
324
343
|
|
|
325
344
|
The file *app/assets/stylesheets/application.css.scss* will contain a CSS rule but you can ignore it or remove it.
|
|
326
345
|
|
|
327
|
-
h2.
|
|
346
|
+
h2. The "layout:navigation" Command
|
|
328
347
|
|
|
329
348
|
If you are using Devise for authentication, you can generate a navigation links partial containing links for Devise.
|
|
330
349
|
|
|
350
|
+
This command is used to populate the navigation bar in starter applications created by the "Rails Composer":http://railsapps.github.io/rails-composer/ tool.
|
|
351
|
+
|
|
331
352
|
<pre>
|
|
332
|
-
$ rails generate navigation --force
|
|
353
|
+
$ rails generate layout:navigation --force
|
|
333
354
|
</pre>
|
|
334
355
|
|
|
335
356
|
This creates a file *app/views/layouts/_navigation_links.html.erb*:
|
|
@@ -362,18 +383,27 @@ The full set of links will be created if the following files are found in your a
|
|
|
362
383
|
* app/views/devise/registrations/new.html.erb
|
|
363
384
|
* app/views/users/index.html.erb
|
|
364
385
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
The @rails generate navigation@ command is used to populate the navigation bar in starter applications created by the "Rails Composer":http://railsapps.github.io/rails-composer/ tool.
|
|
386
|
+
h2. The "layout:devise" Command
|
|
368
387
|
|
|
369
|
-
|
|
388
|
+
"Devise":https://github.com/plataformatec/devise is a gem for authentication and user management (signup, login, and related features). Devise provides a utility command @rails generate devise:views@. The Devise command creates view files for signup, login, and related features. However, the views generated by Devise lack CSS styling.
|
|
370
389
|
|
|
371
|
-
|
|
390
|
+
Use the RailsLayout gem to generate Devise views with styling for Bootstrap or Foundation.
|
|
372
391
|
|
|
373
392
|
<pre>
|
|
374
|
-
$ rails generate layout
|
|
393
|
+
$ rails generate layout:devise
|
|
375
394
|
</pre>
|
|
376
395
|
|
|
396
|
+
The command will create (or replace) these files:
|
|
397
|
+
|
|
398
|
+
* app/views/devise/sessions/new.html.erb
|
|
399
|
+
* (TODO: more to come)
|
|
400
|
+
|
|
401
|
+
Additionally, the command will append Sass mixins to accommodate Bootstrap or Foundation to the file:
|
|
402
|
+
|
|
403
|
+
* app/assets/stylesheets/framework_and_overrides.css.scss
|
|
404
|
+
|
|
405
|
+
The Sass mixins allow any view to be used with either Bootstrap or Foundation (so we don't have to maintain separate views for each front-end framework).
|
|
406
|
+
|
|
377
407
|
h2. Issues
|
|
378
408
|
|
|
379
409
|
Any issues? Please create an "issue":http://github.com/RailsApps/rails_layout/issues on GitHub. Reporting issues (and patching!) helps everyone.
|
|
@@ -390,6 +420,6 @@ h2. MIT License
|
|
|
390
420
|
|
|
391
421
|
"MIT License":http://www.opensource.org/licenses/mit-license
|
|
392
422
|
|
|
393
|
-
Copyright © 2013 Daniel Kehoe
|
|
423
|
+
Copyright © 2013-2014 Daniel Kehoe
|
|
394
424
|
|
|
395
425
|
!https://cruel-carlota.pagodabox.com/b096716fb733287d5c3d5eec65aaa26b(githalytics.com alpha)!
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
require 'rails/generators'
|
|
2
|
+
|
|
3
|
+
module Layout
|
|
4
|
+
module Generators
|
|
5
|
+
class DeviseGenerator < ::Rails::Generators::Base
|
|
6
|
+
source_root File.expand_path("../templates", __FILE__)
|
|
7
|
+
argument :framework_name, :type => :string, :default => "simple"
|
|
8
|
+
|
|
9
|
+
desc "Copies Devise views to your application, with styling for a front-end framework."
|
|
10
|
+
|
|
11
|
+
# Add stylesheet for Devise views
|
|
12
|
+
def add_devise_stylesheet
|
|
13
|
+
dir = File.expand_path("../templates", __FILE__)
|
|
14
|
+
case framework_name
|
|
15
|
+
when 'none'
|
|
16
|
+
# TODO
|
|
17
|
+
when 'simple'
|
|
18
|
+
# TODO
|
|
19
|
+
when 'bootstrap2'
|
|
20
|
+
# TODO
|
|
21
|
+
when 'bootstrap3'
|
|
22
|
+
append_file 'app/assets/stylesheets/framework_and_overrides.css.scss', File.read("#{dir}/bootstrap3.css.scss")
|
|
23
|
+
when 'foundation4'
|
|
24
|
+
# TODO
|
|
25
|
+
when 'foundation5'
|
|
26
|
+
append_file 'app/assets/stylesheets/framework_and_overrides.css.scss', File.read("#{dir}/foundation5.css.scss")
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Add Devise views
|
|
31
|
+
def add_devise_views
|
|
32
|
+
copy_file 'sessions/new.html.erb', 'app/views/devise/sessions/new.html.erb'
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
// Styles for Devise views
|
|
3
|
+
// using Bootstrap
|
|
4
|
+
// generated by the rails_layout gem
|
|
5
|
+
.authform {
|
|
6
|
+
padding-top: 30px;
|
|
7
|
+
max-width: 320px;
|
|
8
|
+
margin: 0 auto;
|
|
9
|
+
}
|
|
10
|
+
.authform form {
|
|
11
|
+
@extend .well;
|
|
12
|
+
@extend .well-lg;
|
|
13
|
+
}
|
|
14
|
+
.authform .right {
|
|
15
|
+
float: right !important;
|
|
16
|
+
}
|
|
17
|
+
.authform .button {
|
|
18
|
+
@extend .btn;
|
|
19
|
+
@extend .btn-primary;
|
|
20
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
// Styles for Devise views
|
|
3
|
+
// using Foundation
|
|
4
|
+
// generated by the rails_layout gem
|
|
5
|
+
.authform {
|
|
6
|
+
padding-top: 30px;
|
|
7
|
+
max-width: 320px;
|
|
8
|
+
margin: 0 auto;
|
|
9
|
+
}
|
|
10
|
+
.authform form {
|
|
11
|
+
@include panel();
|
|
12
|
+
padding-bottom: 40px;
|
|
13
|
+
}
|
|
14
|
+
.authform form a {
|
|
15
|
+
font-size: rem-calc(13);
|
|
16
|
+
}
|
|
17
|
+
.authform .form-group {
|
|
18
|
+
// for Bootstrap, not used for Foundation
|
|
19
|
+
}
|
|
20
|
+
.authform .form-control {
|
|
21
|
+
// for Bootstrap, not used for Foundation
|
|
22
|
+
}
|
|
23
|
+
.authform .checkbox {
|
|
24
|
+
// for Bootstrap, not used for Foundation
|
|
25
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<div class="authform">
|
|
2
|
+
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :role => 'form'}) do |f| %>
|
|
3
|
+
<h3>Log in</h3>
|
|
4
|
+
<%= devise_error_messages! %>
|
|
5
|
+
<div class="form-group">
|
|
6
|
+
<%- if devise_mapping.registerable? %>
|
|
7
|
+
<%= link_to 'Sign up', new_registration_path(resource_name), class: 'right' %>
|
|
8
|
+
<% end -%>
|
|
9
|
+
<%= f.label :email %>
|
|
10
|
+
<%= f.email_field :email, :autofocus => true, class: 'form-control' %>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="form-group">
|
|
13
|
+
<%- if devise_mapping.recoverable? %>
|
|
14
|
+
<%= link_to "Forgot password?", new_password_path(resource_name), class: 'right' %>
|
|
15
|
+
<% end -%>
|
|
16
|
+
<%= f.label :password %>
|
|
17
|
+
<%= f.password_field :password, class: 'form-control' %>
|
|
18
|
+
</div>
|
|
19
|
+
<%= f.submit 'Log in', :class => 'button right' %>
|
|
20
|
+
<% if devise_mapping.rememberable? -%>
|
|
21
|
+
<div class="checkbox">
|
|
22
|
+
<%= f.check_box :remember_me %> <%= f.label :remember_me %>
|
|
23
|
+
</div>
|
|
24
|
+
<% end -%>
|
|
25
|
+
<% end %>
|
|
26
|
+
</div>
|
|
File without changes
|
|
@@ -2,10 +2,12 @@ require 'rails/generators'
|
|
|
2
2
|
|
|
3
3
|
module Layout
|
|
4
4
|
module Generators
|
|
5
|
-
class
|
|
5
|
+
class InstallGenerator < ::Rails::Generators::Base
|
|
6
6
|
source_root File.expand_path("../templates", __FILE__)
|
|
7
7
|
argument :framework_name, :type => :string, :default => "simple"
|
|
8
8
|
|
|
9
|
+
desc "Creates Rails layout files suitable for various front-end frameworks."
|
|
10
|
+
|
|
9
11
|
attr_reader :app_name
|
|
10
12
|
|
|
11
13
|
# Install the desired framework
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/generators/layout/{templates → install/templates}/bootstrap2_and_overrides.css.scss
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/generators/layout/{templates → install/templates}/bootstrap3_and_overrides.css.scss
RENAMED
|
File without changes
|
|
File without changes
|
data/lib/generators/layout/{templates → install/templates}/foundation4-application.html.haml
RENAMED
|
File without changes
|
data/lib/generators/layout/{templates → install/templates}/foundation4-application.html.slim
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/generators/layout/{templates → install/templates}/foundation4_and_overrides.css.scss
RENAMED
|
File without changes
|
|
File without changes
|
data/lib/generators/layout/{templates → install/templates}/foundation5-application.html.haml
RENAMED
|
File without changes
|
data/lib/generators/layout/{templates → install/templates}/foundation5-application.html.slim
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/generators/layout/{templates → install/templates}/foundation5_and_overrides.css.scss
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
Binary file
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
require 'rails/generators'
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module Layout
|
|
4
4
|
module Generators
|
|
5
5
|
class NavigationGenerator < ::Rails::Generators::Base
|
|
6
6
|
source_root File.expand_path("../templates", __FILE__)
|
|
7
7
|
|
|
8
|
+
desc "Adds links to a navigation bar."
|
|
9
|
+
|
|
8
10
|
# Add navigation links
|
|
9
11
|
def add_navigation_links
|
|
10
12
|
app = ::Rails.application
|
|
File without changes
|
data/lib/rails_layout/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_layout
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Kehoe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-01-
|
|
11
|
+
date: 2014-01-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -52,71 +52,78 @@ files:
|
|
|
52
52
|
- LICENSE.txt
|
|
53
53
|
- README.textile
|
|
54
54
|
- Rakefile
|
|
55
|
-
- lib/generators
|
|
56
|
-
- lib/generators/layout/
|
|
57
|
-
- lib/generators/layout/
|
|
58
|
-
- lib/generators/layout/templates
|
|
59
|
-
- lib/generators/layout/templates/
|
|
60
|
-
- lib/generators/layout/templates/
|
|
61
|
-
- lib/generators/layout/templates/
|
|
62
|
-
- lib/generators/layout/
|
|
63
|
-
- lib/generators/layout/
|
|
64
|
-
- lib/generators/layout/templates/
|
|
65
|
-
- lib/generators/layout/templates/
|
|
66
|
-
- lib/generators/layout/templates/
|
|
67
|
-
- lib/generators/layout/templates/bootstrap2-
|
|
68
|
-
- lib/generators/layout/templates/bootstrap2-
|
|
69
|
-
- lib/generators/layout/templates/bootstrap2-
|
|
70
|
-
- lib/generators/layout/templates/
|
|
71
|
-
- lib/generators/layout/templates/
|
|
72
|
-
- lib/generators/layout/templates/
|
|
73
|
-
- lib/generators/layout/templates/
|
|
74
|
-
- lib/generators/layout/templates/
|
|
75
|
-
- lib/generators/layout/templates/
|
|
76
|
-
- lib/generators/layout/templates/
|
|
77
|
-
- lib/generators/layout/templates/bootstrap3-
|
|
78
|
-
- lib/generators/layout/templates/bootstrap3-
|
|
79
|
-
- lib/generators/layout/templates/bootstrap3-
|
|
80
|
-
- lib/generators/layout/templates/
|
|
81
|
-
- lib/generators/layout/templates/
|
|
82
|
-
- lib/generators/layout/templates/
|
|
83
|
-
- lib/generators/layout/templates/
|
|
84
|
-
- lib/generators/layout/templates/
|
|
85
|
-
- lib/generators/layout/templates/
|
|
86
|
-
- lib/generators/layout/templates/
|
|
87
|
-
- lib/generators/layout/templates/foundation4-
|
|
88
|
-
- lib/generators/layout/templates/foundation4-
|
|
89
|
-
- lib/generators/layout/templates/foundation4-
|
|
90
|
-
- lib/generators/layout/templates/foundation4-
|
|
91
|
-
- lib/generators/layout/templates/
|
|
92
|
-
- lib/generators/layout/templates/
|
|
93
|
-
- lib/generators/layout/templates/
|
|
94
|
-
- lib/generators/layout/templates/
|
|
95
|
-
- lib/generators/layout/templates/
|
|
96
|
-
- lib/generators/layout/templates/
|
|
97
|
-
- lib/generators/layout/templates/
|
|
98
|
-
- lib/generators/layout/templates/foundation5-
|
|
99
|
-
- lib/generators/layout/templates/foundation5-
|
|
100
|
-
- lib/generators/layout/templates/foundation5-
|
|
101
|
-
- lib/generators/layout/templates/foundation5-
|
|
102
|
-
- lib/generators/layout/templates/
|
|
103
|
-
- lib/generators/layout/templates/
|
|
104
|
-
- lib/generators/layout/templates/
|
|
105
|
-
- lib/generators/layout/templates/
|
|
106
|
-
- lib/generators/layout/templates/
|
|
107
|
-
- lib/generators/layout/templates/
|
|
108
|
-
- lib/generators/layout/templates/
|
|
109
|
-
- lib/generators/layout/templates/
|
|
110
|
-
- lib/generators/layout/templates/
|
|
111
|
-
- lib/generators/layout/templates/
|
|
112
|
-
- lib/generators/layout/templates/
|
|
113
|
-
- lib/generators/layout/templates/
|
|
114
|
-
- lib/generators/layout/templates/simple-
|
|
115
|
-
- lib/generators/layout/templates/simple-
|
|
116
|
-
- lib/generators/layout/templates/simple-
|
|
117
|
-
- lib/generators/layout/templates/simple.
|
|
118
|
-
- lib/generators/
|
|
119
|
-
- lib/generators/
|
|
55
|
+
- lib/generators/.DS_Store
|
|
56
|
+
- lib/generators/layout/devise/.DS_Store
|
|
57
|
+
- lib/generators/layout/devise/devise_generator.rb
|
|
58
|
+
- lib/generators/layout/devise/templates/.DS_Store
|
|
59
|
+
- lib/generators/layout/devise/templates/bootstrap3.css.scss
|
|
60
|
+
- lib/generators/layout/devise/templates/foundation5.css.scss
|
|
61
|
+
- lib/generators/layout/devise/templates/sessions/new.html.erb
|
|
62
|
+
- lib/generators/layout/install/.DS_Store
|
|
63
|
+
- lib/generators/layout/install/install_generator.rb
|
|
64
|
+
- lib/generators/layout/install/templates/application.css.scss
|
|
65
|
+
- lib/generators/layout/install/templates/application.js
|
|
66
|
+
- lib/generators/layout/install/templates/bootstrap-application.js
|
|
67
|
+
- lib/generators/layout/install/templates/bootstrap2-application.html.erb
|
|
68
|
+
- lib/generators/layout/install/templates/bootstrap2-application.html.haml
|
|
69
|
+
- lib/generators/layout/install/templates/bootstrap2-application.html.slim
|
|
70
|
+
- lib/generators/layout/install/templates/bootstrap2-messages.html.erb
|
|
71
|
+
- lib/generators/layout/install/templates/bootstrap2-messages.html.haml
|
|
72
|
+
- lib/generators/layout/install/templates/bootstrap2-messages.html.slim
|
|
73
|
+
- lib/generators/layout/install/templates/bootstrap2-navigation.html.erb
|
|
74
|
+
- lib/generators/layout/install/templates/bootstrap2-navigation.html.haml
|
|
75
|
+
- lib/generators/layout/install/templates/bootstrap2-navigation.html.slim
|
|
76
|
+
- lib/generators/layout/install/templates/bootstrap2_and_overrides.css.scss
|
|
77
|
+
- lib/generators/layout/install/templates/bootstrap3-application.html.erb
|
|
78
|
+
- lib/generators/layout/install/templates/bootstrap3-application.html.haml
|
|
79
|
+
- lib/generators/layout/install/templates/bootstrap3-application.html.slim
|
|
80
|
+
- lib/generators/layout/install/templates/bootstrap3-messages.html.erb
|
|
81
|
+
- lib/generators/layout/install/templates/bootstrap3-messages.html.haml
|
|
82
|
+
- lib/generators/layout/install/templates/bootstrap3-messages.html.slim
|
|
83
|
+
- lib/generators/layout/install/templates/bootstrap3-navigation.html.erb
|
|
84
|
+
- lib/generators/layout/install/templates/bootstrap3-navigation.html.haml
|
|
85
|
+
- lib/generators/layout/install/templates/bootstrap3-navigation.html.slim
|
|
86
|
+
- lib/generators/layout/install/templates/bootstrap3_and_overrides.css.scss
|
|
87
|
+
- lib/generators/layout/install/templates/foundation4-application.html.erb
|
|
88
|
+
- lib/generators/layout/install/templates/foundation4-application.html.haml
|
|
89
|
+
- lib/generators/layout/install/templates/foundation4-application.html.slim
|
|
90
|
+
- lib/generators/layout/install/templates/foundation4-application.js
|
|
91
|
+
- lib/generators/layout/install/templates/foundation4-messages.html.erb
|
|
92
|
+
- lib/generators/layout/install/templates/foundation4-messages.html.haml
|
|
93
|
+
- lib/generators/layout/install/templates/foundation4-messages.html.slim
|
|
94
|
+
- lib/generators/layout/install/templates/foundation4-navigation.html.erb
|
|
95
|
+
- lib/generators/layout/install/templates/foundation4-navigation.html.haml
|
|
96
|
+
- lib/generators/layout/install/templates/foundation4-navigation.html.slim
|
|
97
|
+
- lib/generators/layout/install/templates/foundation4_and_overrides.css.scss
|
|
98
|
+
- lib/generators/layout/install/templates/foundation5-application.html.erb
|
|
99
|
+
- lib/generators/layout/install/templates/foundation5-application.html.haml
|
|
100
|
+
- lib/generators/layout/install/templates/foundation5-application.html.slim
|
|
101
|
+
- lib/generators/layout/install/templates/foundation5-application.js
|
|
102
|
+
- lib/generators/layout/install/templates/foundation5-messages.html.erb
|
|
103
|
+
- lib/generators/layout/install/templates/foundation5-messages.html.haml
|
|
104
|
+
- lib/generators/layout/install/templates/foundation5-messages.html.slim
|
|
105
|
+
- lib/generators/layout/install/templates/foundation5-navigation.html.erb
|
|
106
|
+
- lib/generators/layout/install/templates/foundation5-navigation.html.haml
|
|
107
|
+
- lib/generators/layout/install/templates/foundation5-navigation.html.slim
|
|
108
|
+
- lib/generators/layout/install/templates/foundation5_and_overrides.css.scss
|
|
109
|
+
- lib/generators/layout/install/templates/navigation_links.html.erb
|
|
110
|
+
- lib/generators/layout/install/templates/navigation_links.html.slim
|
|
111
|
+
- lib/generators/layout/install/templates/none-application.html.erb
|
|
112
|
+
- lib/generators/layout/install/templates/none-application.html.haml
|
|
113
|
+
- lib/generators/layout/install/templates/none-application.html.slim
|
|
114
|
+
- lib/generators/layout/install/templates/simple-application.html.erb
|
|
115
|
+
- lib/generators/layout/install/templates/simple-application.html.haml
|
|
116
|
+
- lib/generators/layout/install/templates/simple-application.html.slim
|
|
117
|
+
- lib/generators/layout/install/templates/simple-messages.html.erb
|
|
118
|
+
- lib/generators/layout/install/templates/simple-messages.html.haml
|
|
119
|
+
- lib/generators/layout/install/templates/simple-messages.html.slim
|
|
120
|
+
- lib/generators/layout/install/templates/simple-navigation.html.erb
|
|
121
|
+
- lib/generators/layout/install/templates/simple-navigation.html.haml
|
|
122
|
+
- lib/generators/layout/install/templates/simple-navigation.html.slim
|
|
123
|
+
- lib/generators/layout/install/templates/simple.css
|
|
124
|
+
- lib/generators/layout/navigation/.DS_Store
|
|
125
|
+
- lib/generators/layout/navigation/navigation_generator.rb
|
|
126
|
+
- lib/generators/layout/navigation/templates/navigation_links.html.erb
|
|
120
127
|
- lib/rails_layout.rb
|
|
121
128
|
- lib/rails_layout/version.rb
|
|
122
129
|
- rails_layout.gemspec
|
data/lib/generators/layout/USAGE
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
Description:
|
|
2
|
-
Creates Rails layout files suitable for various front-end frameworks.
|
|
3
|
-
|
|
4
|
-
Create simple layout files when no front-end framework is used:
|
|
5
|
-
rails generate layout simple
|
|
6
|
-
|
|
7
|
-
Create layout files suitable for Bootstrap 2.3:
|
|
8
|
-
rails generate layout bootstrap2
|
|
9
|
-
|
|
10
|
-
Create layout files suitable for Bootstrap 3.0:
|
|
11
|
-
rails generate layout bootstrap3
|
|
12
|
-
|
|
13
|
-
Create layout files suitable for Zurb Foundation 4.0:
|
|
14
|
-
rails generate layout foundation4
|
|
15
|
-
|
|
16
|
-
Create layout files suitable for Zurb Foundation 5.0:
|
|
17
|
-
rails generate layout foundation5
|
|
18
|
-
|
|
19
|
-
Remove layout files:
|
|
20
|
-
rails generate layout none
|
|
21
|
-
|
|
22
|
-
Creates files:
|
|
23
|
-
* app/views/layouts/application.html.erb
|
|
24
|
-
* app/views/layouts/_messages.html.erb
|
|
25
|
-
* app/views/layouts/_navigation.html.erb
|
|
26
|
-
* app/views/layouts/_navigation_links.html.erb
|
|
27
|
-
* app/assets/stylesheets/simple.css (only for simple option)
|
|
28
|
-
|
|
29
|
-
Renames the file:
|
|
30
|
-
* app/assets/stylesheets/application.css
|
|
31
|
-
to:
|
|
32
|
-
* app/assets/stylesheets/application.css.scss
|
|
33
|
-
|
|
34
|
-
Modifies the file:
|
|
35
|
-
* app/assets/javascripts/application.js
|
|
36
|
-
|
|
37
|
-
Adds the file:
|
|
38
|
-
* app/assets/stylesheets/framework_and_overrides.css.scss
|