ratchet-rails 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +4 -0
- data/README.md +7 -1
- data/lib/generators/ratchet/layout/layout_generator.rb +20 -0
- data/lib/generators/ratchet/layout/templates/layout.html.erb +64 -0
- data/lib/generators/ratchet/layout/templates/layout.html.haml +50 -0
- data/lib/generators/ratchet/layout/templates/layout.html.slim +49 -0
- data/lib/ratchet/rails/version.rb +1 -1
- metadata +6 -2
data/CHANGES
CHANGED
data/README.md
CHANGED
@@ -20,12 +20,18 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
$ gem install ratchet-rails
|
22
22
|
|
23
|
-
##
|
23
|
+
## Installing to App
|
24
24
|
|
25
25
|
You can run following generators to get started with Ratchet quickly.
|
26
26
|
|
27
|
+
Usage:
|
27
28
|
$ rails g ratchet:install
|
28
29
|
|
30
|
+
Layout (generates Ratchet compatible layout) - (Haml and Slim supported)
|
31
|
+
|
32
|
+
Usage:
|
33
|
+
$ rails g ratchet:layout
|
34
|
+
|
29
35
|
## Contributing
|
30
36
|
|
31
37
|
1. Fork it
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module Ratchet
|
4
|
+
module Generators
|
5
|
+
class LayoutGenerator < ::Rails::Generators::Base
|
6
|
+
source_root File.expand_path("../templates", __FILE__)
|
7
|
+
desc "This generator generates layout file with navigation."
|
8
|
+
argument :layout_name, :type => :string, :default => "application"
|
9
|
+
|
10
|
+
attr_reader :app_name
|
11
|
+
|
12
|
+
def generate_layout
|
13
|
+
app = ::Rails.application
|
14
|
+
@app_name = app.class.to_s.split("::").first
|
15
|
+
ext = app.config.generators.options[:rails][:template_engine] || :erb
|
16
|
+
template "layout.html.#{ext}", "app/views/layouts/#{layout_name}.html.#{ext}"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>RatchetRails</title>
|
5
|
+
<%%= stylesheet_link_tag "application", :media => "all" %>
|
6
|
+
<%%= javascript_include_tag "application" %>
|
7
|
+
<%%= csrf_meta_tags %>
|
8
|
+
|
9
|
+
<!-- Sets initial viewport load and disables zooming -->
|
10
|
+
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
|
11
|
+
|
12
|
+
<!-- Makes your prototype chrome-less once bookmarked to your phone's home screen -->
|
13
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
14
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
15
|
+
|
16
|
+
<!-- Set Apple icons for when prototype is saved to home screen -->
|
17
|
+
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="touch-icons/apple-touch-icon-114x114.png">
|
18
|
+
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="touch-icons/apple-touch-icon-72x72.png">
|
19
|
+
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="touch-icons/apple-touch-icon-57x57.png">
|
20
|
+
</head>
|
21
|
+
<body>
|
22
|
+
|
23
|
+
<!-- Make sure all your bars are the first things in your <body> -->
|
24
|
+
<header class="bar-title">
|
25
|
+
<h1 class="title"><%= app_name %></h1>
|
26
|
+
</header>
|
27
|
+
|
28
|
+
<!-- Wrap all non-bar HTML in the .content div (this is actually what scrolls) -->
|
29
|
+
<div class="content">
|
30
|
+
<%%= yield %>
|
31
|
+
|
32
|
+
<div class="content-padded">
|
33
|
+
<p class="welcome">Thanks for downloading Ratchet. This is an example HTML page that's linked up to compiled Ratchet CSS and JS, has the proper meta tags and the HTML structure. Need some more help before you start filling this with your own content? Check out some Ratchet resorces:</p>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<ul class="list inset">
|
37
|
+
<li>
|
38
|
+
<a href="http://maker.github.com/ratchet/">
|
39
|
+
<strong>Ratchet documentation</strong>
|
40
|
+
<span class="chevron"></span>
|
41
|
+
</a>
|
42
|
+
</li>
|
43
|
+
<li>
|
44
|
+
<a href="http://www.github.com/maker/ratchet/">
|
45
|
+
<strong>Ratchet on Github</strong>
|
46
|
+
<span class="chevron"></span>
|
47
|
+
</a>
|
48
|
+
</li>
|
49
|
+
<li>
|
50
|
+
<a href="https://groups.google.com/forum/#!forum/goratchet">
|
51
|
+
<strong>Ratchet Google group</strong>
|
52
|
+
<span class="chevron"></span>
|
53
|
+
</a>
|
54
|
+
</li>
|
55
|
+
<li>
|
56
|
+
<a href="http://www.twitter.com/GoRatchet">
|
57
|
+
<strong>Ratchet on Twitter</strong>
|
58
|
+
<span class="chevron"></span>
|
59
|
+
</a>
|
60
|
+
</li>
|
61
|
+
</ul>
|
62
|
+
</div>
|
63
|
+
</body>
|
64
|
+
</html>
|
@@ -0,0 +1,50 @@
|
|
1
|
+
!!!
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
%title RatchetRails
|
5
|
+
= stylesheet_link_tag "application", :media => "all"
|
6
|
+
= javascript_include_tag "application"
|
7
|
+
= csrf_meta_tags
|
8
|
+
|
9
|
+
<!-- Sets initial viewport load and disables zooming -->
|
10
|
+
%meta{ :name => 'viewport', :content => 'initial-scale=1, maximum-scale=1, user-scalable=no' }
|
11
|
+
|
12
|
+
<!-- Makes your prototype chrome-less once bookmarked to your phone's home screen -->
|
13
|
+
%meta{ :name => 'apple-mobile-web-app-capable', :content => 'yes' }
|
14
|
+
%meta{ :name => 'apple-mobile-web-app-status-bar-style', :content => 'black' }
|
15
|
+
|
16
|
+
<!-- Set Apple icons for when prototype is saved to home screen -->
|
17
|
+
%link{ :rel => 'apple-touch-icon-precomposed', :sizes => '114x114', :href => 'touch-icons/apple-touch-icon-114x114.png' }
|
18
|
+
%link{ :rel => 'apple-touch-icon-precomposed', :sizes => '72x72', :href => 'touch-icons/apple-touch-icon-72x72.png' }
|
19
|
+
%link{ :rel => 'apple-touch-icon-precomposed', :sizes => '57x57', :href => 'touch-icons/apple-touch-icon-57x57.png' }
|
20
|
+
%body
|
21
|
+
<!-- Make sure all your bars are the first things in your <body> -->
|
22
|
+
%header{ :class => 'bar-title' }
|
23
|
+
%h1{ :class => 'title' } <%= app_name %>
|
24
|
+
|
25
|
+
<!-- Wrap all non-bar HTML in the .content div (this is actually what scrolls) -->
|
26
|
+
%div{ :class => 'content' }
|
27
|
+
= yield
|
28
|
+
|
29
|
+
%div{ :class => 'content-padded' }
|
30
|
+
%p{ :class => 'welcome'}
|
31
|
+
Thanks for downloading Ratchet. This is an example HTML page that's linked up to compiled Ratchet CSS and JS, has the proper meta tags and the HTML structure. Need some more help before you start filling this with your own content? Check out some Ratchet resorces:
|
32
|
+
|
33
|
+
%ul{ :class => 'list inset' }
|
34
|
+
%li
|
35
|
+
%a{ :href => 'http://maker.github.com/ratchet/' }
|
36
|
+
%strong Ratchet documentation
|
37
|
+
%span{ :class => 'chevron' }
|
38
|
+
|
39
|
+
%li
|
40
|
+
%a{ :href => 'http://www.github.com/maker/ratchet/' }
|
41
|
+
%strong Ratchet on Github
|
42
|
+
%span{ :class => 'chevron' }
|
43
|
+
%li
|
44
|
+
%a{ :href => 'https://groups.google.com/forum/#!forum/goratchet' }
|
45
|
+
%strong Ratchet Google group
|
46
|
+
%span{ :class => 'chevron' }
|
47
|
+
%li
|
48
|
+
%a{ :href => 'http://www.twitter.com/GoRatchet' }
|
49
|
+
%strong Ratchet on Twitter
|
50
|
+
%span{ :class => 'chevron' }
|
@@ -0,0 +1,49 @@
|
|
1
|
+
doctype html
|
2
|
+
html
|
3
|
+
head
|
4
|
+
title RatchetRails
|
5
|
+
= stylesheet_link_tag 'application', :media => 'all'
|
6
|
+
= javascript_include_tag 'application'
|
7
|
+
= csrf_meta_tags
|
8
|
+
|
9
|
+
/! Sets initial viewport load and disables zooming
|
10
|
+
meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"
|
11
|
+
|
12
|
+
/! Makes your prototype chrome-less once bookmarked to your phone's home screen
|
13
|
+
meta name="apple-mobile-web-app-capable" content="yes"
|
14
|
+
meta name="apple-mobile-web-app-status-bar-style" content="black"
|
15
|
+
|
16
|
+
/! Set Apple icons for when prototype is saved to home screen
|
17
|
+
link rel="apple-touch-icon-precomposed" sizes="114x114" href="touch-icons/apple-touch-icon-114x114.png"
|
18
|
+
link rel="apple-touch-icon-precomposed" sizes="72x72" href="touch-icons/apple-touch-icon-72x72.png"
|
19
|
+
link rel="apple-touch-icon-precomposed" sizes="57x57" href="touch-icons/apple-touch-icon-57x57.png"
|
20
|
+
body
|
21
|
+
|
22
|
+
/! Make sure all your bars are the first things in your <body>
|
23
|
+
header.bar-title
|
24
|
+
h1.title <%= app_name %>
|
25
|
+
|
26
|
+
/! Wrap all non-bar HTML in the .content div (this is actually what scrolls)
|
27
|
+
.content
|
28
|
+
= yield
|
29
|
+
|
30
|
+
.content-padded
|
31
|
+
p.welcome Thanks for downloading Ratchet. This is an example HTML page that's linked up to compiled Ratchet CSS and JS, has the proper meta tags and the HTML structure. Need some more help before you start filling this with your own content? Check out some Ratchet resorces:
|
32
|
+
|
33
|
+
ul.list.inset
|
34
|
+
li
|
35
|
+
a href="http://maker.github.com/ratchet/"
|
36
|
+
strong Ratchet documentation
|
37
|
+
span.chevron
|
38
|
+
li
|
39
|
+
a href="http://www.github.com/maker/ratchet/"
|
40
|
+
strong Ratchet on Github
|
41
|
+
span.chevron
|
42
|
+
li
|
43
|
+
a href="https://groups.google.com/forum/#!forum/goratchet"
|
44
|
+
strong Ratchet Google group
|
45
|
+
span.chevron
|
46
|
+
li
|
47
|
+
a href="http://www.twitter.com/GoRatchet"
|
48
|
+
strong Ratchet on Twitter
|
49
|
+
span.chevron
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ratchet-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -77,6 +77,10 @@ files:
|
|
77
77
|
- lib/generators/ratchet/install/templates/application.js
|
78
78
|
- lib/generators/ratchet/install/templates/ratchet.css
|
79
79
|
- lib/generators/ratchet/install/templates/ratchet.js
|
80
|
+
- lib/generators/ratchet/layout/layout_generator.rb
|
81
|
+
- lib/generators/ratchet/layout/templates/layout.html.erb
|
82
|
+
- lib/generators/ratchet/layout/templates/layout.html.haml
|
83
|
+
- lib/generators/ratchet/layout/templates/layout.html.slim
|
80
84
|
- lib/ratchet-rails.rb
|
81
85
|
- lib/ratchet/rails/engine.rb
|
82
86
|
- lib/ratchet/rails/version.rb
|