rails_layout 0.4.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.textile +4 -0
- data/README.textile +2 -2
- data/lib/generators/layout/USAGE +24 -9
- data/lib/generators/layout/templates/application.css.scss +0 -11
- data/lib/generators/layout/templates/bootstrap3-application.html.erb +2 -9
- data/lib/generators/layout/templates/bootstrap3-application.html.haml +2 -9
- data/lib/generators/layout/templates/bootstrap3-navigation.html.erb +1 -1
- data/lib/generators/layout/templates/bootstrap3_and_overrides.css.scss +36 -1
- data/lib/generators/layout/templates/foundation4-application.html.erb +2 -13
- data/lib/generators/layout/templates/foundation4-application.html.haml +2 -8
- data/lib/generators/layout/templates/foundation4-navigation.html.erb +2 -2
- data/lib/generators/layout/templates/foundation4-navigation.html.haml +1 -1
- data/lib/generators/layout/templates/foundation4_and_overrides.css.scss +32 -0
- data/lib/generators/layout/templates/simple-application.html.erb +7 -13
- data/lib/generators/layout/templates/simple-application.html.haml +5 -8
- data/lib/generators/layout/templates/simple-navigation.html.erb +1 -0
- data/lib/generators/layout/templates/simple-navigation.html.haml +1 -0
- data/lib/generators/layout/templates/simple.css +5 -0
- data/lib/rails_layout/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 013fe55249e20e74336135399feb15ea57f8e1c7
|
4
|
+
data.tar.gz: b0ca5c2409d5545430624e4f88306af221d91e8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 334535fb11d3220fcf229a68e867eecbbd3aa1aacfa4d2272973ff8266ac985c6672c1635441c405e5e969ea6385b167f7da64850cea2e70a6f041c4df27564a
|
7
|
+
data.tar.gz: c9fd68db7d1d2a80d1306af25da226d6262ad4ee5ed57f286f510de8b63f21facdf4a0409c2becd816282b4cb2edc0b529d692233805f4227c59565d7bf891f8
|
data/CHANGELOG.textile
CHANGED
data/README.textile
CHANGED
@@ -185,7 +185,7 @@ See the files that are generated:
|
|
185
185
|
|
186
186
|
The RailsLayout gem will create the file:
|
187
187
|
|
188
|
-
* "app/assets/stylesheets/
|
188
|
+
* "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
|
189
189
|
|
190
190
|
and modify the file:
|
191
191
|
|
@@ -213,7 +213,7 @@ See the files that are generated:
|
|
213
213
|
|
214
214
|
The RailsLayout gem will create the file:
|
215
215
|
|
216
|
-
* "app/assets/stylesheets/
|
216
|
+
* "app/assets/stylesheets/framework_and_overrides.css.scss":https://github.com/RailsApps/rails_layout/blob/master/lib/generators/layout/templates/bootstrap3_and_overrides.css.scss
|
217
217
|
|
218
218
|
and modify the file:
|
219
219
|
|
data/lib/generators/layout/USAGE
CHANGED
@@ -1,20 +1,35 @@
|
|
1
1
|
Description:
|
2
2
|
Creates Rails layout files suitable for various front-end frameworks.
|
3
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 Twitter Bootstrap 2.3:
|
8
|
+
rails generate layout bootstrap2
|
9
|
+
|
10
|
+
Create layout files suitable for Twitter 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
|
+
Remove layout files:
|
17
|
+
rails generate layout none
|
18
|
+
|
4
19
|
Creates files:
|
5
20
|
* app/views/layouts/application.html.erb
|
6
21
|
* app/views/layouts/_messages.html.erb
|
7
22
|
* app/views/layouts/_navigation.html.erb
|
23
|
+
* app/views/layouts/_navigation_links.html.erb
|
8
24
|
* app/assets/stylesheets/simple.css (only for simple option)
|
9
25
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
rails generate layout bootstrap2
|
26
|
+
Renames the file:
|
27
|
+
* app/assets/stylesheets/application.css
|
28
|
+
to:
|
29
|
+
* app/assets/stylesheets/application.css.scss
|
15
30
|
|
16
|
-
|
17
|
-
|
31
|
+
Modifies the file:
|
32
|
+
* app/assets/javascripts/application.js
|
18
33
|
|
19
|
-
|
20
|
-
|
34
|
+
Adds the file:
|
35
|
+
* app/assets/stylesheets/framework_and_overrides.css.scss
|
@@ -11,14 +11,3 @@
|
|
11
11
|
*= require_self
|
12
12
|
*= require_tree .
|
13
13
|
*/
|
14
|
-
.content {
|
15
|
-
background-color: #eee;
|
16
|
-
padding: 20px;
|
17
|
-
margin: 0 -20px;
|
18
|
-
-webkit-border-radius: 0 0 6px 6px;
|
19
|
-
-moz-border-radius: 0 0 6px 6px;
|
20
|
-
border-radius: 0 0 6px 6px;
|
21
|
-
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
22
|
-
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
23
|
-
box-shadow: 0 1px 2px rgba(0,0,0,.15);
|
24
|
-
}
|
@@ -9,19 +9,12 @@
|
|
9
9
|
<%%= csrf_meta_tags %>
|
10
10
|
</head>
|
11
11
|
<body>
|
12
|
-
<%%# application layout styled for Twitter Bootstrap 3.0 %>
|
13
12
|
<header>
|
14
13
|
<%%= render 'layouts/navigation' %>
|
15
14
|
</header>
|
16
15
|
<main role="main">
|
17
|
-
|
18
|
-
|
19
|
-
<div class="col-md-12">
|
20
|
-
<%%= render 'layouts/messages' %>
|
21
|
-
<%%= yield %>
|
22
|
-
</div>
|
23
|
-
</div>
|
24
|
-
</div>
|
16
|
+
<%%= render 'layouts/messages' %>
|
17
|
+
<%%= yield %>
|
25
18
|
</main>
|
26
19
|
</body>
|
27
20
|
</html>
|
@@ -8,15 +8,8 @@
|
|
8
8
|
= javascript_include_tag "application", "data-turbolinks-track" => true
|
9
9
|
= csrf_meta_tags
|
10
10
|
%body
|
11
|
-
-# application layout styled for Twitter Bootstrap 3.0
|
12
11
|
%header
|
13
12
|
= render 'layouts/navigation'
|
14
13
|
%main{:role => "main"}
|
15
|
-
|
16
|
-
|
17
|
-
.content
|
18
|
-
.row
|
19
|
-
.col-md-12
|
20
|
-
= render 'layouts/messages'
|
21
|
-
= yield
|
22
|
-
%footer
|
14
|
+
= render 'layouts/messages'
|
15
|
+
= yield
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%# navigation styled for Twitter Bootstrap 3.0 %>
|
2
|
-
<nav class="navbar navbar-
|
2
|
+
<nav class="navbar navbar-inverse navbar-fixed-top">
|
3
3
|
<div class="container">
|
4
4
|
<div class="navbar-header">
|
5
5
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
@@ -3,4 +3,39 @@
|
|
3
3
|
|
4
4
|
// override for the 'Home' navigation link
|
5
5
|
.navbar-brand {
|
6
|
-
font-size: inherit;
|
6
|
+
font-size: inherit;
|
7
|
+
}
|
8
|
+
// make all images responsive by default
|
9
|
+
img {
|
10
|
+
@extend .img-responsive;
|
11
|
+
margin: 0 auto;
|
12
|
+
}
|
13
|
+
|
14
|
+
// use mixins to create semantic classes
|
15
|
+
main {
|
16
|
+
@extend .container;
|
17
|
+
background-color: #eee;
|
18
|
+
padding-bottom: 80px;
|
19
|
+
width: 100%;
|
20
|
+
margin-top: 51px; // accommodate the navbar
|
21
|
+
}
|
22
|
+
section {
|
23
|
+
@extend .row;
|
24
|
+
margin-top: 20px;
|
25
|
+
}
|
26
|
+
.column {
|
27
|
+
@extend .col-md-6;
|
28
|
+
@extend .text-center;
|
29
|
+
}
|
30
|
+
.form {
|
31
|
+
@extend .col-md-6;
|
32
|
+
}
|
33
|
+
.form-centered {
|
34
|
+
@extend .col-md-6;
|
35
|
+
@extend .text-center;
|
36
|
+
}
|
37
|
+
.submit {
|
38
|
+
@extend .btn;
|
39
|
+
@extend .btn-primary;
|
40
|
+
@extend .btn-lg;
|
41
|
+
}
|
@@ -11,23 +11,12 @@
|
|
11
11
|
<%%= csrf_meta_tags %>
|
12
12
|
</head>
|
13
13
|
<body>
|
14
|
-
<%%# application layout styled for Zurb Foundation 4 %>
|
15
14
|
<header>
|
16
15
|
<%%= render 'layouts/navigation' %>
|
17
16
|
</header>
|
18
17
|
<main role="main">
|
19
|
-
|
20
|
-
|
21
|
-
<div class="row">
|
22
|
-
<div class="twelve columns">
|
23
|
-
<%%= render 'layouts/messages' %>
|
24
|
-
<%%= yield %>
|
25
|
-
</div>
|
26
|
-
</div>
|
27
|
-
<footer>
|
28
|
-
</footer>
|
29
|
-
</div>
|
30
|
-
</div>
|
18
|
+
<%%= render 'layouts/messages' %>
|
19
|
+
<%%= yield %>
|
31
20
|
</main>
|
32
21
|
</body>
|
33
22
|
</html>
|
@@ -10,14 +10,8 @@
|
|
10
10
|
= javascript_include_tag "application", "data-turbolinks-track" => true
|
11
11
|
= csrf_meta_tags
|
12
12
|
%body
|
13
|
-
-# application layout styled for Zurb Foundation 4
|
14
13
|
%header
|
15
14
|
= render 'layouts/navigation'
|
16
15
|
%main{:role => "main"}
|
17
|
-
|
18
|
-
|
19
|
-
.row
|
20
|
-
.twelve.columns
|
21
|
-
= render 'layouts/messages'
|
22
|
-
= yield
|
23
|
-
%footer
|
16
|
+
= render 'layouts/messages'
|
17
|
+
= yield
|
@@ -4,9 +4,9 @@
|
|
4
4
|
<li class="name"><%= link_to 'Home', root_path %></li>
|
5
5
|
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
|
6
6
|
</ul>
|
7
|
-
<
|
7
|
+
<div class="top-bar-section">
|
8
8
|
<ul>
|
9
9
|
<%= render 'layouts/navigation_links' %>
|
10
10
|
</ul>
|
11
|
-
</
|
11
|
+
</div>
|
12
12
|
</nav>
|
@@ -9,3 +9,35 @@
|
|
9
9
|
font-weight: bold;
|
10
10
|
color: white;
|
11
11
|
padding: 0 15px; }
|
12
|
+
|
13
|
+
// use mixins to create semantic classes
|
14
|
+
@mixin large12-columns {
|
15
|
+
@extend .large-12;
|
16
|
+
@extend .columns;
|
17
|
+
}
|
18
|
+
@mixin large6-columns-centered {
|
19
|
+
@extend .large-6;
|
20
|
+
@extend .columns;
|
21
|
+
@extend .text-center;
|
22
|
+
}
|
23
|
+
main {
|
24
|
+
@include large12-columns;
|
25
|
+
background-color: #eee;
|
26
|
+
}
|
27
|
+
section {
|
28
|
+
@extend .row;
|
29
|
+
margin-top: 20px;
|
30
|
+
}
|
31
|
+
.column {
|
32
|
+
@include large6-columns-centered;
|
33
|
+
}
|
34
|
+
.form {
|
35
|
+
@include grid-column(6);
|
36
|
+
}
|
37
|
+
.form-centered {
|
38
|
+
@include large6-columns-centered;
|
39
|
+
}
|
40
|
+
.submit {
|
41
|
+
@extend .button;
|
42
|
+
@extend .radius;
|
43
|
+
}
|
@@ -9,18 +9,12 @@
|
|
9
9
|
<%%= csrf_meta_tags %>
|
10
10
|
</head>
|
11
11
|
<body>
|
12
|
-
<
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
<%%= yield %>
|
20
|
-
</div>
|
21
|
-
</main>
|
22
|
-
<footer>
|
23
|
-
</footer>
|
24
|
-
</div>
|
12
|
+
<header>
|
13
|
+
<%%= render 'layouts/navigation' %>
|
14
|
+
</header>
|
15
|
+
<main role="main">
|
16
|
+
<%%= render 'layouts/messages' %>
|
17
|
+
<%%= yield %>
|
18
|
+
</main>
|
25
19
|
</body>
|
26
20
|
</html>
|
@@ -8,11 +8,8 @@
|
|
8
8
|
= javascript_include_tag "application", "data-turbolinks-track" => true
|
9
9
|
= csrf_meta_tags
|
10
10
|
%body
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
= render 'layouts/messages'
|
17
|
-
= yield
|
18
|
-
%footer
|
11
|
+
%header
|
12
|
+
= render 'layouts/navigation'
|
13
|
+
%main{:role => "main"}
|
14
|
+
= render 'layouts/messages'
|
15
|
+
= yield
|
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: 0.5.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: 2013-11-
|
11
|
+
date: 2013-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|