grid-layout 0.1.0

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.
Files changed (43) hide show
  1. data/LICENSE +20 -0
  2. data/README.rdoc +31 -0
  3. data/generators/grid_layout_generator.rb +9 -0
  4. data/generators/templates/mirror/app/helpers/layout_helper.rb +17 -0
  5. data/generators/templates/mirror/app/helpers/meta_helper.rb +18 -0
  6. data/generators/templates/mirror/app/views/layouts/application.html.haml +35 -0
  7. data/generators/templates/mirror/config/initializers/formtastic.rb +51 -0
  8. data/generators/templates/mirror/public/images/12_col.gif +0 -0
  9. data/generators/templates/mirror/public/images/16_col.gif +0 -0
  10. data/generators/templates/mirror/public/images/24_col.gif +0 -0
  11. data/generators/templates/mirror/public/stylesheets/formtastic.css +138 -0
  12. data/generators/templates/mirror/public/stylesheets/reset.css +1 -0
  13. data/generators/templates/mirror/public/stylesheets/sass/960.sass +417 -0
  14. data/generators/templates/mirror/public/stylesheets/sass/_colors/_all.sass +8 -0
  15. data/generators/templates/mirror/public/stylesheets/sass/_colors/themes/_cherry_cheesecake.sass +7 -0
  16. data/generators/templates/mirror/public/stylesheets/sass/_colors/themes/_coffee_and_conversation.sass +7 -0
  17. data/generators/templates/mirror/public/stylesheets/sass/_colors/themes/_ice_wine_fruit.sass +8 -0
  18. data/generators/templates/mirror/public/stylesheets/sass/_colors/themes/_japanese_garden.sass +7 -0
  19. data/generators/templates/mirror/public/stylesheets/sass/_colors/themes/_night_in_shining_armor.sass +7 -0
  20. data/generators/templates/mirror/public/stylesheets/sass/_colors/themes/_orange_on_olive.sass +7 -0
  21. data/generators/templates/mirror/public/stylesheets/sass/_colors/themes/_sir_m.sass +7 -0
  22. data/generators/templates/mirror/public/stylesheets/sass/_components/_footer_elements.sass +0 -0
  23. data/generators/templates/mirror/public/stylesheets/sass/_components/_header_elements.sass +6 -0
  24. data/generators/templates/mirror/public/stylesheets/sass/_components/_login.sass +0 -0
  25. data/generators/templates/mirror/public/stylesheets/sass/_components/_main_content_elements.sass +0 -0
  26. data/generators/templates/mirror/public/stylesheets/sass/_components/_messages.sass +30 -0
  27. data/generators/templates/mirror/public/stylesheets/sass/_components/_navigation.sass +0 -0
  28. data/generators/templates/mirror/public/stylesheets/sass/_components/_search.sass +0 -0
  29. data/generators/templates/mirror/public/stylesheets/sass/_components/_sidebar_elements.sass +0 -0
  30. data/generators/templates/mirror/public/stylesheets/sass/_components/_social_apps.sass +0 -0
  31. data/generators/templates/mirror/public/stylesheets/sass/_config.sass +21 -0
  32. data/generators/templates/mirror/public/stylesheets/sass/_core/_borders.sass +0 -0
  33. data/generators/templates/mirror/public/stylesheets/sass/_core/_buttons.sass +0 -0
  34. data/generators/templates/mirror/public/stylesheets/sass/_core/_lists.sass +0 -0
  35. data/generators/templates/mirror/public/stylesheets/sass/_core/_misc.sass +0 -0
  36. data/generators/templates/mirror/public/stylesheets/sass/_core/_tables.sass +0 -0
  37. data/generators/templates/mirror/public/stylesheets/sass/_core/_typography.sass +0 -0
  38. data/generators/templates/mirror/public/stylesheets/sass/formtastic_changes.sass +1 -0
  39. data/generators/templates/mirror/public/stylesheets/sass/style.sass +66 -0
  40. data/generators/templates/mirror/public/stylesheets/sass/text.sass +53 -0
  41. data/spec/grid_layout_generator_spec.rb +7 -0
  42. data/spec/spec_helper.rb +9 -0
  43. metadata +125 -0
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Jan Riethmayer
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,31 @@
1
+ = grid-layout
2
+
3
+ This Project was intended to replace the nifty_layout part of Ryan Bates great nifty-generators.
4
+ I took 960.gs, and created macros like compass does, but only for the very basic stuff.
5
+ It's as minimalistic as 960.gs, that's why it should get out of your way.
6
+
7
+ I added maybe a little bit too much regarding directory structure.
8
+ But it fits my needs somehow.
9
+
10
+ == Usage
11
+
12
+ 0. gem install grid-layout
13
+ 1. create your rails project (rails foo)
14
+ 2. go into foo (cd foo)
15
+ 3. haml --rails . (activate haml for rails)
16
+ 4. script/generate grid_layout
17
+
18
+
19
+ == Note on Patches/Pull Requests
20
+
21
+ * Fork the project.
22
+ * Make your feature addition or bug fix.
23
+ * Add tests for it. This is important so I don't break it in a
24
+ future version unintentionally.
25
+ * Commit, do not mess with rakefile, version, or history.
26
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
27
+ * Send me a pull request. Bonus points for topic branches.
28
+
29
+ == Copyright
30
+
31
+ Copyright (c) 2010 Jan Riethmayer. See LICENSE for details.
@@ -0,0 +1,9 @@
1
+ require 'generator_extensions'
2
+ class GridLayoutGenerator < Rails::Generator::Base
3
+ def manifest
4
+ record do |m|
5
+ m.add_to_file "config/environment.rb", "Rails::Initializer.run do |config|", " config.gem 'formtastic'"
6
+ m.mirror
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,17 @@
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
5
+ module LayoutHelper
6
+ def stylesheet(*args)
7
+ content_for(:head) { stylesheet_link_tag(*args) }
8
+ end
9
+
10
+ def javascript(*args)
11
+ content_for(:head) { javascript_include_tag(*args) }
12
+ end
13
+
14
+ def default_stylesheets
15
+ ['reset', 'text', '960', 'formtastic', 'formtastic_changes', 'style']
16
+ end
17
+ end
@@ -0,0 +1,18 @@
1
+ module MetaHelper
2
+ def to_keywords title
3
+ title.to_s.downcase.split(" ").join(",")
4
+ end
5
+
6
+ def title(page_title, show_title = true)
7
+ @content_for_title = page_title.to_s
8
+ @show_title = show_title
9
+ end
10
+
11
+ def show_title?
12
+ @show_title
13
+ end
14
+
15
+ def description(page_description)
16
+ @content_for_description = page_description.to_s
17
+ end
18
+ end
@@ -0,0 +1,35 @@
1
+ !!! XML
2
+ !!! Strict
3
+ %html{html_attrs}
4
+ %head
5
+ %title
6
+ = h(yield(:title) || "Untitled")
7
+ %meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
8
+ %meta{ :name => "description", :content=> h(yield(:description))}/
9
+ %meta{ :name => "keywords", :content=> to_keywords(h(yield(:title)))}/
10
+ %meta{ :name => "robots", :content=> "index, follow"}/
11
+ = stylesheet_link_tag default_stylesheets
12
+ = yield(:head)
13
+ %body
14
+ #container
15
+ #hd
16
+ %h1
17
+ =h yield(:title)
18
+ #login
19
+ = link_to "Anmelden", "#"
20
+ |
21
+ = link_to "Registrieren", "#"
22
+ %div.clear
23
+ #flashes
24
+ - flash.each do |name, msg|
25
+ = content_tag :div, msg, :id => "flash_#{name}"
26
+ #bd
27
+ #main
28
+ = yield
29
+ #sidebar
30
+ = yield(:sidebar)
31
+ #ft
32
+ = yield(:footer)
33
+ %p.copyright
34
+ Copyright &copy;
35
+ = Time.now.year
@@ -0,0 +1,51 @@
1
+ # Set the default text field size when input is a string. Default is 50.
2
+ # Formtastic::SemanticFormBuilder.default_text_field_size = 50
3
+
4
+ # Should all fields be considered "required" by default?
5
+ # Defaults to true, see ValidationReflection notes below.
6
+ Formtastic::SemanticFormBuilder.all_fields_required_by_default = false
7
+
8
+ # Should select fields have a blank option/prompt by default?
9
+ # Defaults to true.
10
+ # Formtastic::SemanticFormBuilder.include_blank_for_select_by_default = true
11
+
12
+ # Set the string that will be appended to the labels/fieldsets which are required
13
+ # It accepts string or procs and the default is a localized version of
14
+ # '<abbr title="required">*</abbr>'. In other words, if you configure formtastic.required
15
+ # in your locale, it will replace the abbr title properly. But if you don't want to use
16
+ # abbr tag, you can simply give a string as below
17
+ # Formtastic::SemanticFormBuilder.required_string = "(required)"
18
+
19
+ # Set the string that will be appended to the labels/fieldsets which are optional
20
+ # Defaults to an empty string ("") and also accepts procs (see required_string above)
21
+ # Formtastic::SemanticFormBuilder.optional_string = "(optional)"
22
+
23
+ # Set the way inline errors will be displayed.
24
+ # Defaults to :sentence, valid options are :sentence, :list and :none
25
+ # Formtastic::SemanticFormBuilder.inline_errors = :sentence
26
+
27
+ # Set the method to call on label text to transform or format it for human-friendly
28
+ # reading when formtastic is user without object. Defaults to :humanize.
29
+ # Formtastic::SemanticFormBuilder.label_str_method = :humanize
30
+
31
+ # Set the array of methods to try calling on parent objects in :select and :radio inputs
32
+ # for the text inside each @<option>@ tag or alongside each radio @<input>@. The first method
33
+ # that is found on the object will be used.
34
+ # Defaults to ["to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
35
+ # Formtastic::SemanticFormBuilder.collection_label_methods = [
36
+ # "to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
37
+
38
+ # Formtastic by default renders inside li tags the input, hints and then
39
+ # errors messages. Sometimes you want the hints to be rendered first than
40
+ # the input, in the following order: hints, input and errors. You can
41
+ # customize it doing just as below:
42
+ # Formtastic::SemanticFormBuilder.inline_order = [:input, :hints, :errors]
43
+
44
+ # Specifies if labels/hints for input fields automatically be looked up using I18n.
45
+ # Default value: false. Overridden for specific fields by setting value to true,
46
+ # i.e. :label => true, or :hint => true (or opposite depending on initialized value)
47
+ Formtastic::SemanticFormBuilder.i18n_lookups_by_default = true
48
+
49
+ # You can add custom inputs or override parts of Formtastic by subclassing SemanticFormBuilder and
50
+ # specifying that class here. Defaults to SemanticFormBuilder.
51
+ # Formtastic::SemanticFormHelper.builder = MyCustomBuilder
@@ -0,0 +1,138 @@
1
+ /* -------------------------------------------------------------------------------------------------
2
+
3
+ It's *strongly* suggested that you don't modify this file. Instead, load a new stylesheet after
4
+ this one in your layouts (eg formtastic_changes.css) and override the styles to suit your needs.
5
+ This will allow you to update formtastic.css with new releases without clobbering your own changes.
6
+
7
+ This stylesheet forms part of the Formtastic Rails Plugin
8
+ (c) 2008 Justin French
9
+
10
+ --------------------------------------------------------------------------------------------------*/
11
+
12
+
13
+ /* NORMALIZE AND RESET - obviously inspired by Yahoo's reset.css, but scoped to just form.formtastic
14
+ --------------------------------------------------------------------------------------------------*/
15
+ form.formtastic, form.formtastic ul, form.formtastic ol, form.formtastic li, form.formtastic fieldset, form.formtastic legend, form.formtastic input, form.formtastic textarea, form.formtastic select, form.formtastic p { margin:0; padding:0; }
16
+ form.formtastic fieldset { border:0; }
17
+ form.formtastic em, form.formtastic strong { font-style:normal; font-weight:normal; }
18
+ form.formtastic ol, form.formtastic ul { list-style:none; }
19
+ form.formtastic abbr, form.formtastic acronym { border:0; font-variant:normal; }
20
+ form.formtastic input, form.formtastic textarea, form.formtastic select { font-family:inherit; font-size:inherit; font-weight:inherit; }
21
+ form.formtastic input, form.formtastic textarea, form.formtastic select { font-size:100%; }
22
+ form.formtastic legend { color:#000; }
23
+
24
+
25
+ /* FIELDSETS & LISTS
26
+ --------------------------------------------------------------------------------------------------*/
27
+ form.formtastic fieldset { }
28
+ form.formtastic fieldset.inputs { }
29
+ form.formtastic fieldset.buttons { padding-left:25%; }
30
+ form.formtastic fieldset ol { }
31
+ form.formtastic fieldset.buttons li { float:left; padding-right:0.5em; }
32
+
33
+ /* clearfixing the fieldsets */
34
+ form.formtastic fieldset { display: inline-block; }
35
+ form.formtastic fieldset:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
36
+ html[xmlns] form.formtastic fieldset { display: block; }
37
+ * html form.formtastic fieldset { height: 1%; }
38
+
39
+
40
+ /* INPUT LIs
41
+ --------------------------------------------------------------------------------------------------*/
42
+ form.formtastic fieldset ol li { margin-bottom:1.5em; }
43
+
44
+ /* clearfixing the li's */
45
+ form.formtastic fieldset ol li { display: inline-block; }
46
+ form.formtastic fieldset ol li:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
47
+ html[xmlns] form.formtastic fieldset ol li { display: block; }
48
+ * html form.formtastic fieldset ol li { height: 1%; }
49
+
50
+ form.formtastic fieldset ol li.required { }
51
+ form.formtastic fieldset ol li.optional { }
52
+ form.formtastic fieldset ol li.error { }
53
+
54
+
55
+ /* LABELS
56
+ --------------------------------------------------------------------------------------------------*/
57
+ form.formtastic fieldset ol li label { display:block; width:25%; float:left; padding-top:.2em; }
58
+ form.formtastic fieldset ol li li label { line-height:100%; padding-top:0; }
59
+ form.formtastic fieldset ol li li label input { line-height:100%; vertical-align:middle; margin-top:-0.1em;}
60
+
61
+
62
+ /* NESTED FIELDSETS AND LEGENDS (radio, check boxes and date/time inputs use nested fieldsets)
63
+ --------------------------------------------------------------------------------------------------*/
64
+ form.formtastic fieldset ol li fieldset { position:relative; }
65
+ form.formtastic fieldset ol li fieldset legend { position:absolute; width:25%; padding-top:0.1em; }
66
+ form.formtastic fieldset ol li fieldset legend span { position:absolute; }
67
+ form.formtastic fieldset ol li fieldset legend.label label { position:absolute; }
68
+ form.formtastic fieldset ol li fieldset ol { float:left; width:74%; margin:0; padding:0 0 0 25%; }
69
+ form.formtastic fieldset ol li fieldset ol li { padding:0; border:0; }
70
+
71
+
72
+ /* INLINE HINTS
73
+ --------------------------------------------------------------------------------------------------*/
74
+ form.formtastic fieldset ol li p.inline-hints { color:#666; margin:0.5em 0 0 25%; }
75
+
76
+
77
+ /* INLINE ERRORS
78
+ --------------------------------------------------------------------------------------------------*/
79
+ form.formtastic fieldset ol li p.inline-errors { color:#cc0000; margin:0.5em 0 0 25%; }
80
+ form.formtastic fieldset ol li ul.errors { color:#cc0000; margin:0.5em 0 0 25%; list-style:square; }
81
+ form.formtastic fieldset ol li ul.errors li { padding:0; border:none; display:list-item; }
82
+
83
+
84
+ /* STRING & NUMERIC OVERRIDES
85
+ --------------------------------------------------------------------------------------------------*/
86
+ form.formtastic fieldset ol li.string input { width:74%; }
87
+ form.formtastic fieldset ol li.password input { width:74%; }
88
+ form.formtastic fieldset ol li.numeric input { width:74%; }
89
+
90
+
91
+ /* TEXTAREA OVERRIDES
92
+ --------------------------------------------------------------------------------------------------*/
93
+ form.formtastic fieldset ol li.text textarea { width:74%; }
94
+
95
+
96
+ /* HIDDEN OVERRIDES
97
+ --------------------------------------------------------------------------------------------------*/
98
+ form.formtastic fieldset ol li.hidden { display:none; }
99
+
100
+
101
+ /* BOOLEAN OVERRIDES
102
+ --------------------------------------------------------------------------------------------------*/
103
+ form.formtastic fieldset ol li.boolean label { padding-left:25%; width:auto; }
104
+ form.formtastic fieldset ol li.boolean label input { margin:0 0.5em 0 0.2em; }
105
+
106
+
107
+ /* RADIO OVERRIDES
108
+ --------------------------------------------------------------------------------------------------*/
109
+ form.formtastic fieldset ol li.radio { }
110
+ form.formtastic fieldset ol li.radio fieldset ol { margin-bottom:-0.6em; }
111
+ form.formtastic fieldset ol li.radio fieldset ol li { margin:0.1em 0 0.5em 0; }
112
+ form.formtastic fieldset ol li.radio fieldset ol li label { float:none; width:100%; }
113
+ form.formtastic fieldset ol li.radio fieldset ol li label input { margin-right:0.2em; }
114
+
115
+
116
+ /* CHECK BOXES (COLLECTION) OVERRIDES
117
+ --------------------------------------------------------------------------------------------------*/
118
+ form.formtastic fieldset ol li.check_boxes { }
119
+ form.formtastic fieldset ol li.check_boxes fieldset ol { margin-bottom:-0.6em; }
120
+ form.formtastic fieldset ol li.check_boxes fieldset ol li { margin:0.1em 0 0.5em 0; }
121
+ form.formtastic fieldset ol li.check_boxes fieldset ol li label { float:none; width:100%; }
122
+ form.formtastic fieldset ol li.check_boxes fieldset ol li label input { margin-right:0.2em; }
123
+
124
+
125
+
126
+ /* DATE & TIME OVERRIDES
127
+ --------------------------------------------------------------------------------------------------*/
128
+ form.formtastic fieldset ol li.date fieldset ol li,
129
+ form.formtastic fieldset ol li.time fieldset ol li,
130
+ form.formtastic fieldset ol li.datetime fieldset ol li { float:left; width:auto; margin:0 .3em 0 0; }
131
+
132
+ form.formtastic fieldset ol li.date fieldset ol li label,
133
+ form.formtastic fieldset ol li.time fieldset ol li label,
134
+ form.formtastic fieldset ol li.datetime fieldset ol li label { display:none; }
135
+
136
+ form.formtastic fieldset ol li.date fieldset ol li label input,
137
+ form.formtastic fieldset ol li.time fieldset ol li label input,
138
+ form.formtastic fieldset ol li.datetime fieldset ol li label input { display:inline; margin:0; padding:0; }
@@ -0,0 +1 @@
1
+ html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}table{border-collapse:collapse;border-spacing:0}
@@ -0,0 +1,417 @@
1
+ =container
2
+ margin-left: auto
3
+ margin-right: auto
4
+ width: 960px
5
+
6
+
7
+ =grid
8
+ display: inline
9
+ float: left
10
+ position: relative
11
+ margin-left: 5px
12
+ margin-right: 5px
13
+
14
+
15
+ =no_margin_left
16
+ margin-left: 0
17
+
18
+
19
+ =no_margin_right
20
+ margin-right: 0
21
+
22
+
23
+ =grid_1
24
+ +grid
25
+ width: 30px
26
+
27
+ =grid_2
28
+ +grid
29
+ width: 70px
30
+
31
+ =grid_3
32
+ +grid
33
+ width: 110px
34
+
35
+ =grid_4
36
+ +grid
37
+ width: 150px
38
+
39
+ =grid_5
40
+ +grid
41
+ width: 190px
42
+
43
+ =grid_6
44
+ +grid
45
+ width: 230px
46
+
47
+ =grid_7
48
+ +grid
49
+ width: 270px
50
+
51
+ =grid_8
52
+ +grid
53
+ width: 310px
54
+
55
+ =grid_9
56
+ +grid
57
+ width: 350px
58
+
59
+ =grid_10
60
+ +grid
61
+ width: 390px
62
+
63
+ =grid_11
64
+ +grid
65
+ width: 430px
66
+
67
+ =grid_12
68
+ +grid
69
+ width: 470px
70
+
71
+ =grid_13
72
+ +grid
73
+ width: 510px
74
+
75
+ =grid_14
76
+ +grid
77
+ width: 550px
78
+
79
+ =grid_15
80
+ +grid
81
+ width: 590px
82
+
83
+ =grid_16
84
+ +grid
85
+ width: 630px
86
+
87
+ =grid_17
88
+ +grid
89
+ width: 670px
90
+
91
+ =grid_18
92
+ +grid
93
+ width: 710px
94
+
95
+ =grid_19
96
+ +grid
97
+ width: 750px
98
+
99
+ =grid_20
100
+ +grid
101
+ width: 790px
102
+
103
+ =grid_21
104
+ +grid
105
+ width: 830px
106
+
107
+ =grid_22
108
+ +grid
109
+ width: 870px
110
+
111
+ =grid_23
112
+ +grid
113
+ width: 910px
114
+
115
+ =grid_24
116
+ +grid
117
+ width: 950px
118
+
119
+ =prefix_1
120
+ padding-left: 40px
121
+
122
+ =prefix_2
123
+ padding-left: 80px
124
+
125
+ =prefix_3
126
+ padding-left: 120px
127
+
128
+ =prefix_4
129
+ padding-left: 160px
130
+
131
+ =prefix_5
132
+ padding-left: 200px
133
+
134
+ =prefix_6
135
+ padding-left: 240px
136
+
137
+ =prefix_7
138
+ padding-left: 280px
139
+
140
+ =prefix_8
141
+ padding-left: 320px
142
+
143
+ =prefix_9
144
+ padding-left: 360px
145
+
146
+ =prefix_10
147
+ padding-left: 400px
148
+
149
+ =prefix_11
150
+ padding-left: 440px
151
+
152
+ =prefix_12
153
+ padding-left: 480px
154
+
155
+ =prefix_13
156
+ padding-left: 520px
157
+
158
+ =prefix_14
159
+ padding-left: 560px
160
+
161
+ =prefix_15
162
+ padding-left: 600px
163
+
164
+ =prefix_16
165
+ padding-left: 640px
166
+
167
+ =prefix_17
168
+ padding-left: 680px
169
+
170
+ =prefix_18
171
+ padding-left: 720px
172
+
173
+ =prefix_19
174
+ padding-left: 760px
175
+
176
+ =prefix_20
177
+ padding-left: 800px
178
+
179
+ =prefix_21
180
+ padding-left: 840px
181
+
182
+ =prefix_22
183
+ padding-left: 880px
184
+
185
+ =prefix_23
186
+ padding-left: 920px
187
+
188
+ =suffix_1
189
+ padding-right: 40px
190
+
191
+ =suffix_2
192
+ padding-right: 80px
193
+
194
+ =suffix_3
195
+ padding-right: 120px
196
+
197
+ =suffix_4
198
+ padding-right: 160px
199
+
200
+ =suffix_5
201
+ padding-right: 200px
202
+
203
+ =suffix_6
204
+ padding-right: 240px
205
+
206
+ =suffix_7
207
+ padding-right: 280px
208
+
209
+ =suffix_8
210
+ padding-right: 320px
211
+
212
+ =suffix_9
213
+ padding-right: 360px
214
+
215
+ =suffix_10
216
+ padding-right: 400px
217
+
218
+ =suffix_11
219
+ padding-right: 440px
220
+
221
+ =suffix_12
222
+ padding-right: 480px
223
+
224
+ =suffix_13
225
+ padding-right: 520px
226
+
227
+ =suffix_14
228
+ padding-right: 560px
229
+
230
+ =suffix_15
231
+ padding-right: 600px
232
+
233
+ =suffix_16
234
+ padding-right: 640px
235
+
236
+ =suffix_17
237
+ padding-right: 680px
238
+
239
+ =suffix_18
240
+ padding-right: 720px
241
+
242
+ =suffix_19
243
+ padding-right: 760px
244
+
245
+ =suffix_20
246
+ padding-right: 800px
247
+
248
+ =suffix_21
249
+ padding-right: 840px
250
+
251
+ =suffix_22
252
+ padding-right: 880px
253
+
254
+ =suffix_23
255
+ padding-right: 920px
256
+
257
+ =push_1
258
+ left: 40px
259
+
260
+ =push_2
261
+ left: 80px
262
+
263
+ =push_3
264
+ left: 120px
265
+
266
+ =push_4
267
+ left: 160px
268
+
269
+ =push_5
270
+ left: 200px
271
+
272
+ =push_6
273
+ left: 240px
274
+
275
+ =push_7
276
+ left: 280px
277
+
278
+ =push_8
279
+ left: 320px
280
+
281
+ =push_9
282
+ left: 360px
283
+
284
+ =push_10
285
+ left: 400px
286
+
287
+ =push_11
288
+ left: 440px
289
+
290
+ =push_12
291
+ left: 480px
292
+
293
+ =push_13
294
+ left: 520px
295
+
296
+ =push_14
297
+ left: 560px
298
+
299
+ =push_15
300
+ left: 600px
301
+
302
+ =push_16
303
+ left: 640px
304
+
305
+ =push_17
306
+ left: 680px
307
+
308
+ =push_18
309
+ left: 720px
310
+
311
+ =push_19
312
+ left: 760px
313
+
314
+ =push_20
315
+ left: 800px
316
+
317
+ =push_21
318
+ left: 840px
319
+
320
+ =push_22
321
+ left: 880px
322
+
323
+ =push_23
324
+ left: 920px
325
+
326
+ =pull_1
327
+ left: -40px
328
+
329
+ =pull_2
330
+ left: -80px
331
+
332
+ =pull_3
333
+ left: -120px
334
+
335
+ =pull_4
336
+ left: -160px
337
+
338
+ =pull_5
339
+ left: -200px
340
+
341
+ =pull_6
342
+ left: -240px
343
+
344
+ =pull_7
345
+ left: -280px
346
+
347
+ =pull_8
348
+ left: -320px
349
+
350
+ =pull_9
351
+ left: -360px
352
+
353
+ =pull_10
354
+ left: -400px
355
+
356
+ =pull_11
357
+ left: -440px
358
+
359
+ =pull_12
360
+ left: -480px
361
+
362
+ =pull_13
363
+ left: -520px
364
+
365
+ =pull_14
366
+ left: -560px
367
+
368
+ =pull_15
369
+ left: -600px
370
+
371
+ =pull_16
372
+ left: -640px
373
+
374
+ =pull_17
375
+ left: -680px
376
+
377
+ =pull_18
378
+ left: -720px
379
+
380
+ =pull_19
381
+ left: -760px
382
+
383
+ =pull_20
384
+ left: -800px
385
+
386
+ =pull_21
387
+ left: -840px
388
+
389
+ =pull_22
390
+ left: -880px
391
+
392
+ =pull_23
393
+ left: -920px
394
+
395
+
396
+ =clear
397
+ clear: both
398
+ display: block
399
+ visibility: hidden
400
+ width: 0
401
+ height: 0
402
+
403
+
404
+ .clearfix
405
+ &:after
406
+ +clear
407
+ content: ' '
408
+ font-size: 0
409
+ line-height: 0
410
+
411
+ .clear
412
+ +clear
413
+ overflow: hidden
414
+
415
+ *
416
+ html .clearfix, &:first-child+html .clearfix
417
+ zoom: 1
@@ -0,0 +1,8 @@
1
+ !notice_background_color = #CFC
2
+ !notice_border_color = #6c6
3
+ !notice_color = black
4
+
5
+ !error_background_color = #FCC
6
+ !error_border_color = #C66
7
+ !error_color = black
8
+
@@ -0,0 +1,7 @@
1
+ !primary_color = #FCFAE1
2
+ !second_color = #4C1B1B
3
+ !third_color = #fff
4
+ !html_color = #F6E497
5
+ !link_color = #BD8D46
6
+ !border_color = #000
7
+ !caption_color = #B9121B
@@ -0,0 +1,7 @@
1
+ !primary_color = #F2F2E9
2
+ !second_color = #261E17
3
+ !third_color = #BFBA9F
4
+ !html_color = #261E17
5
+ !link_color = #8C3623
6
+ !border_color = #593622
7
+ !caption_color = #593622
@@ -0,0 +1,8 @@
1
+ !primary_color = #DEE8D7
2
+ !second_color = #4C493A
3
+ !third_color = #fff
4
+ !html_color = #420A1A
5
+ !link_color = #240001
6
+ !border_color = #000
7
+ !caption_color = #91877B
8
+
@@ -0,0 +1,7 @@
1
+ !primary_color = #F9FFFA
2
+ !second_color = #403D35
3
+ !third_color = #fff
4
+ !html_color = #0A0904
5
+ !link_color = #6E7050
6
+ !border_color = #000
7
+ !caption_color = #7BAB9B
@@ -0,0 +1,7 @@
1
+ !primary_color = #D11B3D
2
+ !second_color = #441B2F
3
+ !third_color = #fff
4
+ !html_color = #211D26
5
+ !link_color = #880934
6
+ !border_color = #000
7
+ !caption_color = #FE6730
@@ -0,0 +1,7 @@
1
+ !primary_color = #B4AF91
2
+ !second_color = #40411E
3
+ !third_color = #fff
4
+ !html_color = #C03000
5
+ !link_color = #32331D
6
+ !border_color = #000
7
+ !caption_color = #787746
@@ -0,0 +1,7 @@
1
+ !primary_color = #fff
2
+ !second_color = #25292B
3
+ !third_color = #590202
4
+ !html_color = #2B3C40
5
+ !link_color = #7E9153
6
+ !border_color = #000
7
+ !caption_color = #567155
@@ -0,0 +1,6 @@
1
+ #hd
2
+ +container
3
+ h1
4
+ +grid_16
5
+ #login
6
+ +grid_8
@@ -0,0 +1,30 @@
1
+ @import ../_colors/_all
2
+
3
+ =message_box
4
+ :padding 5px 8px
5
+ :margin 10px 0
6
+ :text-align center
7
+
8
+ =notice
9
+ :background-color #CFC
10
+ :color = !notice_color
11
+ :border
12
+ :style solid
13
+ :width 1px
14
+ :color = !notice_border_color
15
+
16
+ =error
17
+ :background-color = !error_background_color
18
+ :color = !error_color
19
+ :border
20
+ :style solid
21
+ :width 1px
22
+ :color = !error_border_color
23
+
24
+ #flash_notice
25
+ +message_box
26
+ +notice
27
+
28
+ #flash_error
29
+ +message_box
30
+ +error
@@ -0,0 +1,21 @@
1
+ // colors
2
+ @import 960
3
+ @import _colors/themes/japanese_garden
4
+ @import _colors/_all
5
+ // core
6
+ @import _core/_borders
7
+ @import _core/_typography
8
+ @import _core/_tables
9
+ @import _core/_lists
10
+ @import _core/_buttons
11
+ @import _core/_misc
12
+ // components
13
+ @import _components/_messages
14
+ @import _components/_navigation
15
+ @import _components/_login
16
+ @import _components/_search
17
+ @import _components/_header_elements
18
+ @import _components/_main_content_elements
19
+ @import _components/_sidebar_elements
20
+ @import _components/_footer_elements
21
+ @import _components/_social_apps
@@ -0,0 +1,66 @@
1
+ @import config
2
+
3
+
4
+ body
5
+ :background-color = !html_color
6
+
7
+ a
8
+ :color = !link_color
9
+ img
10
+ :border none
11
+
12
+ .clear
13
+ :clear both
14
+ :height 0
15
+ :overflow hidden
16
+
17
+ p
18
+ :color = !second_color
19
+ h1, h2, h3
20
+ :color = !caption_color
21
+
22
+ #container
23
+ :width 960px
24
+ :margin 0 auto
25
+ :background-color = !primary_color
26
+ :padding 20px 10px
27
+ :border-style solid
28
+ :border-width 1px
29
+ :border-color = !border_color
30
+ :margin-top 20px
31
+
32
+ .fieldWithErrors
33
+ :display inline
34
+
35
+ #errorExplanation
36
+ :width 400px
37
+ :border 2px solid #CF0000
38
+ :padding 0
39
+ :padding-bottom 12px
40
+ :margin-bottom 20px
41
+ :background-color #f0f0f0
42
+ h2
43
+ :text-align left
44
+ :padding 5px 5px 5px 15px
45
+ :margin 0
46
+ :font
47
+ :weight bold
48
+ :size 12px
49
+ :background-color #c00
50
+ :color #fff
51
+ p
52
+ :color #333
53
+ :margin-bottom 0
54
+ :padding 8px
55
+ ul
56
+ :margin 2px 24px
57
+ li
58
+ :font-size 12px
59
+ :list-style disc
60
+
61
+ #hd
62
+
63
+ #bd
64
+
65
+ #ft
66
+ text-align: center
@@ -0,0 +1,53 @@
1
+ body
2
+ font: 13px/1.5 'Helvetica Neue',Arial,'Liberation Sans',FreeSans,sans-serif
3
+
4
+
5
+ a:focus
6
+ outline: 1px dotted
7
+
8
+
9
+ hr
10
+ border: 0 #ccc solid
11
+ border-top-width: 1px
12
+ clear: both
13
+ height: 0
14
+
15
+
16
+ h1
17
+ font-size: 25px
18
+
19
+
20
+ h2
21
+ font-size: 23px
22
+
23
+
24
+ h3
25
+ font-size: 21px
26
+
27
+
28
+ h4
29
+ font-size: 19px
30
+
31
+
32
+ h5
33
+ font-size: 17px
34
+
35
+
36
+ h6
37
+ font-size: 15px
38
+
39
+
40
+ ol
41
+ list-style: decimal
42
+
43
+
44
+ ul
45
+ list-style: disc
46
+
47
+
48
+ li
49
+ margin-left: 30px
50
+
51
+
52
+ p, dl, hr, h1, h2, h3, h4, h5, h6, ol, ul, pre, table, address, fieldset
53
+ margin-bottom: 20px
@@ -0,0 +1,7 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "GridLayoutGenerator" do
4
+ it "fails" do
5
+ fail "hey buddy, you should probably rename this file and start specing for real"
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..'))
3
+ require 'grid_layout_generator'
4
+ require 'spec'
5
+ require 'spec/autorun'
6
+
7
+ Spec::Runner.configure do |config|
8
+
9
+ end
metadata ADDED
@@ -0,0 +1,125 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: grid-layout
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Jan Riethmayer
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2010-02-06 00:00:00 +01:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: generator_extensions
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.3.2
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: rspec
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.2.9
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: haml
37
+ type: :development
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 2.3.0
44
+ version:
45
+ description: This generator adds 960.gs to your Rails Application. It does a bit more, please have a look at the README.
46
+ email: jan@riethmayer.de
47
+ executables: []
48
+
49
+ extensions: []
50
+
51
+ extra_rdoc_files:
52
+ - LICENSE
53
+ - README.rdoc
54
+ files:
55
+ - generators/grid_layout_generator.rb
56
+ - generators/templates/mirror/app/helpers/layout_helper.rb
57
+ - generators/templates/mirror/app/helpers/meta_helper.rb
58
+ - generators/templates/mirror/app/views/layouts/application.html.haml
59
+ - generators/templates/mirror/config/initializers/formtastic.rb
60
+ - generators/templates/mirror/public/images/12_col.gif
61
+ - generators/templates/mirror/public/images/16_col.gif
62
+ - generators/templates/mirror/public/images/24_col.gif
63
+ - generators/templates/mirror/public/stylesheets/formtastic.css
64
+ - generators/templates/mirror/public/stylesheets/reset.css
65
+ - generators/templates/mirror/public/stylesheets/sass/960.sass
66
+ - generators/templates/mirror/public/stylesheets/sass/_colors/_all.sass
67
+ - generators/templates/mirror/public/stylesheets/sass/_colors/themes/_cherry_cheesecake.sass
68
+ - generators/templates/mirror/public/stylesheets/sass/_colors/themes/_coffee_and_conversation.sass
69
+ - generators/templates/mirror/public/stylesheets/sass/_colors/themes/_ice_wine_fruit.sass
70
+ - generators/templates/mirror/public/stylesheets/sass/_colors/themes/_japanese_garden.sass
71
+ - generators/templates/mirror/public/stylesheets/sass/_colors/themes/_night_in_shining_armor.sass
72
+ - generators/templates/mirror/public/stylesheets/sass/_colors/themes/_orange_on_olive.sass
73
+ - generators/templates/mirror/public/stylesheets/sass/_colors/themes/_sir_m.sass
74
+ - generators/templates/mirror/public/stylesheets/sass/_components/_footer_elements.sass
75
+ - generators/templates/mirror/public/stylesheets/sass/_components/_header_elements.sass
76
+ - generators/templates/mirror/public/stylesheets/sass/_components/_login.sass
77
+ - generators/templates/mirror/public/stylesheets/sass/_components/_main_content_elements.sass
78
+ - generators/templates/mirror/public/stylesheets/sass/_components/_messages.sass
79
+ - generators/templates/mirror/public/stylesheets/sass/_components/_navigation.sass
80
+ - generators/templates/mirror/public/stylesheets/sass/_components/_search.sass
81
+ - generators/templates/mirror/public/stylesheets/sass/_components/_sidebar_elements.sass
82
+ - generators/templates/mirror/public/stylesheets/sass/_components/_social_apps.sass
83
+ - generators/templates/mirror/public/stylesheets/sass/_config.sass
84
+ - generators/templates/mirror/public/stylesheets/sass/_core/_borders.sass
85
+ - generators/templates/mirror/public/stylesheets/sass/_core/_buttons.sass
86
+ - generators/templates/mirror/public/stylesheets/sass/_core/_lists.sass
87
+ - generators/templates/mirror/public/stylesheets/sass/_core/_misc.sass
88
+ - generators/templates/mirror/public/stylesheets/sass/_core/_tables.sass
89
+ - generators/templates/mirror/public/stylesheets/sass/_core/_typography.sass
90
+ - generators/templates/mirror/public/stylesheets/sass/formtastic_changes.sass
91
+ - generators/templates/mirror/public/stylesheets/sass/style.sass
92
+ - generators/templates/mirror/public/stylesheets/sass/text.sass
93
+ - LICENSE
94
+ - README.rdoc
95
+ has_rdoc: true
96
+ homepage: http://github.com/riethmayer/grid-layout
97
+ licenses: []
98
+
99
+ post_install_message:
100
+ rdoc_options:
101
+ - --charset=UTF-8
102
+ require_paths:
103
+ - lib
104
+ required_ruby_version: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: "0"
109
+ version:
110
+ required_rubygems_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: "0"
115
+ version:
116
+ requirements: []
117
+
118
+ rubyforge_project:
119
+ rubygems_version: 1.3.5
120
+ signing_key:
121
+ specification_version: 3
122
+ summary: A 960 grid layout generator.
123
+ test_files:
124
+ - spec/grid_layout_generator_spec.rb
125
+ - spec/spec_helper.rb