rails_layout 0.1.7 → 0.1.8
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 +15 -1
- data/lib/generators/layout/layout_generator.rb +2 -2
- data/lib/generators/layout/templates/foundation4-messages.html.erb +2 -2
- data/lib/generators/layout/templates/foundation4-messages.html.haml +2 -2
- 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: b1967db961277ac6d2a0fbbb02842baf5a4407e0
|
4
|
+
data.tar.gz: 2048c2f9e39a538fe8417babd17eee8da9153b51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47e1ebb1ab73312ff9ca297d9f9150d248680a5ab55c3b8b827fb995f3fbe3de59634e7f104ab079908a9746e18661b96c47070143b878e183229568f2ef25ec
|
7
|
+
data.tar.gz: fa05bed3b94aa8db900a94a74b52a6469e6702faf20340677fe9334791611d509c2940969a0c6997f74d25e37078b117dc2364b0eee36fbf3285dbbb9a2241be
|
data/CHANGELOG.textile
CHANGED
data/README.textile
CHANGED
@@ -2,6 +2,8 @@ h1. !http://railsapps.github.io/images/rails-36x36.jpg(RailsLayout Gem)! RailsLa
|
|
2
2
|
|
3
3
|
RailsLayout is a utility gem to 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
|
+
h4. Supported Frameworks
|
6
|
+
|
5
7
|
You can generate layout files suitable for use with the following front-end frameworks:
|
6
8
|
|
7
9
|
* @simple@ - simple layout
|
@@ -9,6 +11,8 @@ You can generate layout files suitable for use with the following front-end fram
|
|
9
11
|
* @bootstrap3@ - Twitter Bootstrap 3.0
|
10
12
|
* @foundation4@ - Zurb Foundation 4.0
|
11
13
|
|
14
|
+
h4. Generated Files
|
15
|
+
|
12
16
|
The RailsLayout gem generates application layout files:
|
13
17
|
|
14
18
|
* app/views/layouts/application.html.erb
|
@@ -19,9 +23,19 @@ Additionally, when the @simple@ option is selected:
|
|
19
23
|
|
20
24
|
* app/assets/stylesheets/simple.css
|
21
25
|
|
26
|
+
h4. Support for ERB or Haml
|
27
|
+
|
28
|
+
If you are using ERB for Rails views, the RailsLayout gem will generate ERB files (as shown above).
|
29
|
+
|
30
|
+
If you are using Haml, the RailsLayout gem will generate Haml files instead.
|
31
|
+
|
32
|
+
h4. Rails Composer
|
33
|
+
|
34
|
+
The "Rails Composer":http://railsapps.github.io/rails-composer/ tool, an application template used to create starter applications, uses the RailsLayout gem to generate the layout files used in various starter applications. You can use Rails Composer to generate entire applications.
|
35
|
+
|
22
36
|
h2. Usage Example
|
23
37
|
|
24
|
-
To see how the RailsLayout gem
|
38
|
+
To see how the generated files from the RailsLayout gem are used, see the "Learn Rails":https://github.com/RailsApps/learn-rails example application that is described in the book "Learn Ruby on Rails":http://learn-rails.com/learn-ruby-on-rails.html.
|
25
39
|
|
26
40
|
!http://railsapps.github.io/images/learn-rails-cover-130x161.jpg(Learn Ruby on Rails)!:http://learn-rails.com/learn-ruby-on-rails.html
|
27
41
|
|
@@ -32,10 +32,10 @@ module Layout
|
|
32
32
|
def add_navigation_links
|
33
33
|
# not yet accommodating Slim (we'll need different substitutions)
|
34
34
|
if File.exists?('app/views/pages/about.html.erb')
|
35
|
-
insert_into_file 'app/views/layouts/_navigation.html.erb', "\n
|
35
|
+
insert_into_file 'app/views/layouts/_navigation.html.erb', "\n <li><%= link_to 'About', page_path('about') %></li>", :before => "\n</ul>"
|
36
36
|
end
|
37
37
|
if File.exists?('app/views/contacts/new.html.erb')
|
38
|
-
insert_into_file 'app/views/layouts/_navigation.html.erb', "\n
|
38
|
+
insert_into_file 'app/views/layouts/_navigation.html.erb', "\n <li><%= link_to 'Contact', new_contact_path %></li>", :before => "\n</ul>"
|
39
39
|
end
|
40
40
|
if File.exists?('app/views/contacts/new.html.haml')
|
41
41
|
insert_into_file 'app/views/layouts/_navigation.html.haml', "\n %li= link_to 'Contact', new_contact_path", :after => "root_path"
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<%# Rails flash messages styled for Zurb Foundation 4 %>
|
2
2
|
<% flash.each do |name, msg| %>
|
3
3
|
<% if msg.is_a?(String) %>
|
4
|
-
<div data-alert class="alert-box <%= name == :notice ? "
|
5
|
-
<%= content_tag :div, msg
|
4
|
+
<div data-alert class="alert-box round <%= name == :notice ? "success" : "alert" %>">
|
5
|
+
<%= content_tag :div, msg %>
|
6
6
|
<a href="#" class="close">×</a>
|
7
7
|
</div>
|
8
8
|
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
-# Rails flash messages styled for Zurb Foundation 4
|
2
2
|
- flash.each do |name, msg|
|
3
3
|
- if msg.is_a?(String)
|
4
|
-
%div{:class => "alert-box #{name == :notice ? "
|
5
|
-
= content_tag :div, msg
|
4
|
+
%div{:class => "alert-box round #{name == :notice ? "success" : "alert"}", "data-alert" => ""}
|
5
|
+
= content_tag :div, msg
|
6
6
|
%a.close{:href => "#"} ×
|
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.1.
|
4
|
+
version: 0.1.8
|
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-10-
|
11
|
+
date: 2013-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|