PeterCoulton-rotten-generators 0.1.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.4.0
@@ -15,10 +15,14 @@ class RottenLayoutGenerator < Rails::Generator::Base
15
15
 
16
16
 
17
17
  m.template "layout.html.haml", "app/views/layouts/application.html.haml"
18
+
19
+ m.file "shared_flash_messages.html.haml", "app/views/shared/_flash_messages.html.haml"
20
+ m.file "shared_footer.html.haml", "app/views/shared/_footer.html.haml"
18
21
  m.file "shared_analytics.html.haml", "app/views/shared/_analytics.html.haml"
19
22
 
20
23
  m.file "sass/screen.sass", "app/stylesheets/public/screen.sass"
21
24
  m.file "sass/print.sass", "app/stylesheets/public/print.sass"
25
+ m.file "sass/handheld.sass", "app/stylesheets/public/handheld.sass"
22
26
  m.file "sass/ie.sass", "app/stylesheets/public/ie.sass"
23
27
 
24
28
  m.file "sass/colour.sass", "app/stylesheets/sass/colour.sass"
@@ -28,6 +32,7 @@ class RottenLayoutGenerator < Rails::Generator::Base
28
32
  m.file "sass/type.sass", "app/stylesheets/sass/type.sass"
29
33
 
30
34
  m.file "helper.rb", "app/helpers/layout_helper.rb"
35
+
31
36
  end
32
37
  end
33
38
 
@@ -1 +1,9 @@
1
+ # These helper methods can be called in your template to set variables to be used in the layout
2
+ # This module should be included in all views globally,
3
+ # to do so you may need to add this line to your ApplicationController
4
+ # helper :layout
1
5
 
6
+ module LayoutHelper
7
+
8
+
9
+ end
@@ -1 +1,30 @@
1
+ !!! xml
2
+ !!! strict
3
+ %html{html_attrs("en-GB")}
4
+ %head
5
+ %meta{"http-equiv" => 'Content-Type', :content => 'text/html;charset=utf-8'}
6
+
7
+ %title
8
+ = h(yield(:title) || "Untitled")
9
+
10
+ =stylesheet_link_tag ["screen"], :media => "screen"
11
+ =stylesheet_link_tag ["print"], :media => "print"
12
+ =stylesheet_link_tag ["handheld"], :media => "handheld"
13
+
14
+ /[if lt IE 6]
15
+ = stylesheet_link_tag ["ie"], :media => "screen"
16
+
17
+ = yield(:head)
18
+
19
+ %body
20
+ #doc
21
+ #hd
22
+ = render :partial => "shared/flash_messages"
1
23
 
24
+ #bd
25
+ = yield
26
+
27
+ #ft
28
+ = render :partial => "shared/footer"
29
+
30
+ = render :partial => "shared/analytics"
@@ -1 +1,137 @@
1
+ //
2
+ =============================================================================
3
+
4
+ R E S E T . S A S S
5
+ -----------------------------------------------------------------------------
1
6
 
7
+
8
+ html
9
+ :color #000
10
+ :background #FFF
11
+
12
+
13
+ body, div, dl, dt, dd, ul, ol
14
+ :margin 0
15
+ :padding 0
16
+
17
+
18
+ li
19
+ :margin 0
20
+ :padding 0
21
+ :list-style none
22
+
23
+
24
+ h1, h2, h3, h4, h5, h6
25
+ :margin 0
26
+ :padding 0
27
+ :font-size 100%
28
+ :font-weight normal
29
+
30
+
31
+ pre
32
+ :margin 0
33
+ :padding 0
34
+
35
+
36
+ code
37
+ :margin 0
38
+ :padding 0
39
+ :font-style normal
40
+ :font-weight normal
41
+
42
+
43
+ form
44
+ :margin 0
45
+ :padding 0
46
+
47
+
48
+ fieldset
49
+ :margin 0
50
+ :padding 0
51
+ :border 0
52
+
53
+
54
+ legend
55
+ :margin 0
56
+ :padding 0
57
+ :color #000
58
+
59
+
60
+ input, textarea
61
+ :margin 0
62
+ :padding 0
63
+ :font-family inherit
64
+ :font-size inherit
65
+ :font-weight inherit
66
+
67
+
68
+ p, blockquote
69
+ :margin 0
70
+ :padding 0
71
+
72
+
73
+ th
74
+ :margin 0
75
+ :padding 0
76
+ :font-style normal
77
+ :font-weight normal
78
+ :text-align left
79
+
80
+
81
+ td
82
+ :margin 0
83
+ :padding 0
84
+
85
+
86
+ table
87
+ :border-collapse collapse
88
+ :border-spacing 0
89
+
90
+
91
+ img
92
+ :border 0
93
+
94
+
95
+ address
96
+ :font-style normal
97
+ :font-weight normal
98
+
99
+
100
+ caption
101
+ :font-style normal
102
+ :font-weight normal
103
+ :text-align left
104
+
105
+
106
+ cite, dfn, em, strong, var
107
+ :font-style normal
108
+ :font-weight normal
109
+
110
+
111
+ q
112
+ &:before, &:after
113
+ :content ''
114
+
115
+
116
+ abbr, acronym
117
+ :border 0
118
+ :font-variant normal
119
+
120
+
121
+ sup
122
+ :vertical-align text-top
123
+
124
+
125
+ sub
126
+ :vertical-align text-bottom
127
+
128
+
129
+ select
130
+ :font-family inherit
131
+ :font-size inherit
132
+ :font-weight inherit
133
+ &:before,
134
+ &:after
135
+ :content ""
136
+
137
+
@@ -1 +1,5 @@
1
-
1
+ @import reset.sass
2
+ @import type.sass
3
+ @import colour.sass
4
+ @import layout.sass
5
+ @import form.sass
@@ -1 +1,10 @@
1
-
1
+ - if ENV['RAILS_ENV'] == 'production'
2
+ :javascript
3
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
4
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
5
+
6
+ :javascript
7
+ try {
8
+ var pageTracker = _gat._getTracker("UA-231207-7");
9
+ pageTracker._trackPageview();
10
+ } catch(err) {}
@@ -0,0 +1,2 @@
1
+ - flash.each do |name, msg|
2
+ = content_tag :div, msg, :id => "flash_#{name}"
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rotten-generators}
5
- s.version = "0.1.0"
5
+ s.version = "0.4.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Peter Coulton"]
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
30
30
  "rails_generators/rotten_layout/templates/layout.html.haml",
31
31
  "rails_generators/rotten_layout/templates/sass/colour.sass",
32
32
  "rails_generators/rotten_layout/templates/sass/form.sass",
33
+ "rails_generators/rotten_layout/templates/sass/handheld.sass",
33
34
  "rails_generators/rotten_layout/templates/sass/ie.sass",
34
35
  "rails_generators/rotten_layout/templates/sass/layout.sass",
35
36
  "rails_generators/rotten_layout/templates/sass/print.sass",
@@ -37,6 +38,8 @@ Gem::Specification.new do |s|
37
38
  "rails_generators/rotten_layout/templates/sass/screen.sass",
38
39
  "rails_generators/rotten_layout/templates/sass/type.sass",
39
40
  "rails_generators/rotten_layout/templates/shared_analytics.html.haml",
41
+ "rails_generators/rotten_layout/templates/shared_flash_messages.html.haml",
42
+ "rails_generators/rotten_layout/templates/shared_footer.html.haml",
40
43
  "rotten-generators.gemspec",
41
44
  "spec/rotten_spec.rb",
42
45
  "spec/spec.opts",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: PeterCoulton-rotten-generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Coulton
@@ -40,6 +40,7 @@ files:
40
40
  - rails_generators/rotten_layout/templates/layout.html.haml
41
41
  - rails_generators/rotten_layout/templates/sass/colour.sass
42
42
  - rails_generators/rotten_layout/templates/sass/form.sass
43
+ - rails_generators/rotten_layout/templates/sass/handheld.sass
43
44
  - rails_generators/rotten_layout/templates/sass/ie.sass
44
45
  - rails_generators/rotten_layout/templates/sass/layout.sass
45
46
  - rails_generators/rotten_layout/templates/sass/print.sass
@@ -47,6 +48,8 @@ files:
47
48
  - rails_generators/rotten_layout/templates/sass/screen.sass
48
49
  - rails_generators/rotten_layout/templates/sass/type.sass
49
50
  - rails_generators/rotten_layout/templates/shared_analytics.html.haml
51
+ - rails_generators/rotten_layout/templates/shared_flash_messages.html.haml
52
+ - rails_generators/rotten_layout/templates/shared_footer.html.haml
50
53
  - rotten-generators.gemspec
51
54
  - spec/rotten_spec.rb
52
55
  - spec/spec.opts