rails_layout 0.1.3 → 0.1.4
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/lib/generators/layout/USAGE +10 -4
- data/lib/generators/layout/layout_generator.rb +9 -0
- data/lib/generators/layout/templates/simple-application.html.erb +1 -1
- data/lib/generators/layout/templates/simple.css +45 -0
- data/lib/rails_layout/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d9d02e3adae8911a28803fa97c323937fcdfe5c
|
4
|
+
data.tar.gz: 201e6d34156e435a4721035d3d93f95e1702fe1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 600e4a8eb02615382715607b30a028dbb642ad5edbae5a9648b932a72f4bc2c02936f4cd9d118cd96cac36e650a2de13b37f9b42f3fae8e9c8a1cf32f5a8d870
|
7
|
+
data.tar.gz: 683436383a73638532102b471a7eeb34b796804e002f8f18140967689e1682467a7c6ca25c3f2f5dac48f574c424778acdfb7646f398223324bb2a62cacb88a5
|
data/CHANGELOG.textile
CHANGED
data/lib/generators/layout/USAGE
CHANGED
@@ -1,8 +1,14 @@
|
|
1
1
|
Description:
|
2
2
|
Creates Rails layout files suitable for various front-end frameworks.
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
Creates files:
|
5
|
+
* app/views/layouts/application.html.erb
|
6
|
+
* app/views/layouts/_messages.html.erb
|
7
|
+
* app/views/layouts/_navigation.html.erb
|
8
|
+
* app/assets/stylesheets/simple.css (only for simple option)
|
6
9
|
|
7
|
-
|
8
|
-
|
10
|
+
Create simple layout files when no front-end framework is used:
|
11
|
+
rails generate layout simple
|
12
|
+
|
13
|
+
Create layout files suitable for Twitter Bootstrap 2.3:
|
14
|
+
rails generate layout bootstrap2
|
@@ -19,6 +19,15 @@ module Layout
|
|
19
19
|
copy_file "#{framework_name}-navigation.html.#{ext}", "app/views/layouts/_navigation.html.#{ext}"
|
20
20
|
end
|
21
21
|
|
22
|
+
# Add a simple stylesheet if there is no front-end framework
|
23
|
+
def simple_css
|
24
|
+
if framework_name == 'simple'
|
25
|
+
copy_file 'simple.css', 'app/assets/stylesheets/simple.css'
|
26
|
+
else
|
27
|
+
remove_file 'app/assets/stylesheets/simple.css'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
22
31
|
# If 'About' or 'Contact' views exist in known locations, add navigation links
|
23
32
|
def add_navigation_links
|
24
33
|
# not yet accommodating Haml and Slim (we'll need different substitutions)
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/*
|
2
|
+
* Simple CSS stylesheet for a navigation bar and flash messages.
|
3
|
+
*/
|
4
|
+
header {
|
5
|
+
border: 1px solid #d4d4d4;
|
6
|
+
background-image: linear-gradient(to bottom, white, #f2f2f2);
|
7
|
+
background-color: #f9f9f9;
|
8
|
+
-webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
|
9
|
+
-moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
|
10
|
+
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
|
11
|
+
margin-bottom: 20px;
|
12
|
+
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
13
|
+
}
|
14
|
+
ul.nav li {
|
15
|
+
display: inline;
|
16
|
+
}
|
17
|
+
ul.nav li a {
|
18
|
+
padding: 10px 15px 10px;
|
19
|
+
color: #777777;
|
20
|
+
text-decoration: none;
|
21
|
+
text-shadow: 0 1px 0 white;
|
22
|
+
}
|
23
|
+
#flash_notice, #flash_alert {
|
24
|
+
padding: 8px 35px 8px 14px;
|
25
|
+
margin-bottom: 20px;
|
26
|
+
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
27
|
+
border: 1px solid #fbeed5;
|
28
|
+
-webkit-border-radius: 4px;
|
29
|
+
-moz-border-radius: 4px;
|
30
|
+
border-radius: 4px;
|
31
|
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
32
|
+
font-size: 14px;
|
33
|
+
line-height: 20px;
|
34
|
+
}
|
35
|
+
#flash_notice {
|
36
|
+
background-color: #dff0d8;
|
37
|
+
border-color: #d6e9c6;
|
38
|
+
color: #468847;
|
39
|
+
}
|
40
|
+
#flash_alert {
|
41
|
+
background-color: #f2dede;
|
42
|
+
border-color: #eed3d7;
|
43
|
+
color: #b94a48;
|
44
|
+
}
|
45
|
+
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Kehoe
|
@@ -60,6 +60,7 @@ files:
|
|
60
60
|
- lib/generators/layout/templates/simple-application.html.erb
|
61
61
|
- lib/generators/layout/templates/simple-messages.html.erb
|
62
62
|
- lib/generators/layout/templates/simple-navigation.html.erb
|
63
|
+
- lib/generators/layout/templates/simple.css
|
63
64
|
- lib/rails_layout.rb
|
64
65
|
- lib/rails_layout/version.rb
|
65
66
|
- rails_layout.gemspec
|