rails_layout 0.1.3 → 0.1.4

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: a3572c15e87d22809ef5f571161aadde139f87c8
4
- data.tar.gz: a8ce6ba2a503fd9428121c2b29714a45af32cc00
3
+ metadata.gz: 6d9d02e3adae8911a28803fa97c323937fcdfe5c
4
+ data.tar.gz: 201e6d34156e435a4721035d3d93f95e1702fe1e
5
5
  SHA512:
6
- metadata.gz: cbca34f6ecd9797d6b8ef76cf451290cd77949270f6260b1f68d2fef3fee604157b189c97fc8b7952de2b260e00408ad02eaac7b300a7fb0c76ebbfbeeb8f628
7
- data.tar.gz: 56c7566b3f41ed0bdaa637ecbba31689cf9b2edda9031c02d9cf5abf6e2d4c5c4ce7cbe4913c7023e1e02c5027627ca3dd29814c110eae25444ac2f707eebc07
6
+ metadata.gz: 600e4a8eb02615382715607b30a028dbb642ad5edbae5a9648b932a72f4bc2c02936f4cd9d118cd96cac36e650a2de13b37f9b42f3fae8e9c8a1cf32f5a8d870
7
+ data.tar.gz: 683436383a73638532102b471a7eeb34b796804e002f8f18140967689e1682467a7c6ca25c3f2f5dac48f574c424778acdfb7646f398223324bb2a62cacb88a5
data/CHANGELOG.textile CHANGED
@@ -1,5 +1,9 @@
1
1
  h1. CHANGELOG
2
2
 
3
+ h2. 0.1.4 September 20, 2013
4
+
5
+ * add simple stylesheet if there is no front-end framework
6
+
3
7
  h2. 0.1.3 September 20, 2013
4
8
 
5
9
  * add missing escape sequence to ERB delimiters
@@ -1,8 +1,14 @@
1
1
  Description:
2
2
  Creates Rails layout files suitable for various front-end frameworks.
3
3
 
4
- Example:
5
- rails generate layout bootstrap2
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
- Create layout files suitable for Twitter Bootstrap 2.3:
8
- app/views/layouts/application.html.erb
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)
@@ -12,9 +12,9 @@
12
12
  <div id="container">
13
13
  <header>
14
14
  <%%= render 'layouts/navigation' %>
15
- <%%= render 'layouts/messages' %>
16
15
  </header>
17
16
  <main role="main">
17
+ <%%= render 'layouts/messages' %>
18
18
  <%%= yield %>
19
19
  </main>
20
20
  <footer>
@@ -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
+
@@ -1,3 +1,3 @@
1
1
  module RailsLayout
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
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.3
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