roots-rails 0.0.1.alpha

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 (44) hide show
  1. data/.gitignore +5 -0
  2. data/Gemfile +4 -0
  3. data/lib/generators/roots/framework_generator.rb +28 -0
  4. data/lib/generators/roots/install_generator.rb +36 -0
  5. data/lib/generators/templates/favicon.ico +0 -0
  6. data/lib/generators/templates/images/apple-touch-icon-114x114.png +0 -0
  7. data/lib/generators/templates/images/apple-touch-icon-72x72.png +0 -0
  8. data/lib/generators/templates/images/apple-touch-icon.png +0 -0
  9. data/lib/generators/templates/images/preview.png +0 -0
  10. data/lib/generators/templates/layouts/application.sass +23 -0
  11. data/lib/generators/templates/layouts/config.html.haml +57 -0
  12. data/lib/generators/templates/layouts/layout.html.haml +26 -0
  13. data/lib/generators/templates/noise.png +0 -0
  14. data/lib/generators/templates/sass/modules/_animation.sass +454 -0
  15. data/lib/generators/templates/sass/modules/_buttons.sass +233 -0
  16. data/lib/generators/templates/sass/modules/_code.sass +41 -0
  17. data/lib/generators/templates/sass/modules/_forms.sass +209 -0
  18. data/lib/generators/templates/sass/modules/_interaction.sass +89 -0
  19. data/lib/generators/templates/sass/modules/_reset.sass +238 -0
  20. data/lib/generators/templates/sass/modules/_tables.sass +76 -0
  21. data/lib/generators/templates/sass/modules/_typography.sass +367 -0
  22. data/lib/generators/templates/sass/modules/_ui.sass +205 -0
  23. data/lib/generators/templates/sass/modules/_utilities.sass +372 -0
  24. data/lib/generators/templates/sass/roots.sass +54 -0
  25. data/lib/generators/templates/scripts/pie.htc +96 -0
  26. data/lib/generators/templates/scripts/selectivizr.js +5 -0
  27. data/lib/roots.rb +6 -0
  28. data/lib/roots/engine.rb +6 -0
  29. data/lib/roots/version.rb +4 -0
  30. data/readme.md +24 -0
  31. data/roots-rails.gemspec +28 -0
  32. data/vendor/assets/stylesheets/modules/_animation.sass +454 -0
  33. data/vendor/assets/stylesheets/modules/_buttons.sass +233 -0
  34. data/vendor/assets/stylesheets/modules/_code.sass +41 -0
  35. data/vendor/assets/stylesheets/modules/_fluid.sass +160 -0
  36. data/vendor/assets/stylesheets/modules/_forms.sass +209 -0
  37. data/vendor/assets/stylesheets/modules/_interaction.sass +89 -0
  38. data/vendor/assets/stylesheets/modules/_reset.sass +238 -0
  39. data/vendor/assets/stylesheets/modules/_tables.sass +76 -0
  40. data/vendor/assets/stylesheets/modules/_typography.sass +367 -0
  41. data/vendor/assets/stylesheets/modules/_ui.sass +205 -0
  42. data/vendor/assets/stylesheets/modules/_utilities.sass +372 -0
  43. data/vendor/assets/stylesheets/roots.sass +57 -0
  44. metadata +132 -0
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
5
+ .DS_Store
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'http://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in roots.gemspec
4
+ gemspec
@@ -0,0 +1,28 @@
1
+
2
+ module Roots
3
+ module Generators
4
+ class FrameworkGenerator < Rails::Generators::Base
5
+ desc "Places roots in your asset pipeline so you can edit it"
6
+ source_root File.expand_path('../../templates', __FILE__)
7
+
8
+ def generate
9
+ say_notice = false
10
+
11
+ if yes? "This will replace your application.css file - is this ok / have you backed it up? [y/n]", "\e[31m"
12
+
13
+ if File.exist? "app/assets/stylesheets/application.css"
14
+ remove_file "app/assets/stylesheets/application.css"
15
+ copy_file "layouts/application.sass", "app/assets/stylesheets/application.sass"
16
+ say_notice = true
17
+ end
18
+
19
+ directory "sass", "app/assets/stylesheets"
20
+ end
21
+
22
+ say "\nComplete! Make sure to visit application.sass to configure.\n\n", "\e[32m" if say_notice
23
+
24
+ end
25
+
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,36 @@
1
+
2
+ module Roots
3
+ module Generators
4
+ class InstallGenerator < Rails::Generators::Base
5
+ desc "Loads sass framework, replaces layout, removes public/index.html"
6
+ source_root File.expand_path('../../templates', __FILE__)
7
+
8
+ def replace_layout
9
+ remove_file "app/views/layouts/application.html.erb"
10
+ copy_file "layouts/layout.html.haml", "app/views/layouts/application.html.haml"
11
+ copy_file "layouts/config.html.haml", "app/views/layouts/_config.html.haml"
12
+ end
13
+
14
+ def replace_application_css
15
+ remove_file "app/assets/stylesheets/application.css"
16
+ copy_file "layouts/application.sass", "app/assets/stylesheets/application.sass"
17
+ end
18
+
19
+ def install_dependencies
20
+ copy_file "scripts/selectivizr.js", "vendor/assets/javascripts/selectivizr.js"
21
+ copy_file "scripts/pie.htc", "vendor/assets/javascripts/pie.htc"
22
+ remove_file "public/favicon.ico"
23
+ copy_file "favicon.ico", "public/favicon.ico"
24
+ directory "images", "public/roots"
25
+ copy_file "noise.png", "app/assets/images/noise.png"
26
+ end
27
+
28
+ def remove_defaults
29
+ remove_file "app/assets/rails.png"
30
+ remove_file "public/index.html"
31
+ say "\nComplete! Make sure to visit these two files to configure things: \n - app/views/layouts/config.html.haml\n - app/assets/stylesheets/application.sass\n\n", "\e[32m"
32
+ end
33
+
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,23 @@
1
+ // This is roots' version of the application file. You will have to
2
+ // manually load each stylsheet that you want to use here (this is a
3
+ // best practice anyway, gives you control over what's included and in
4
+ // what order). Just use an @import directive like is done below.
5
+
6
+ @import "roots"
7
+
8
+ // Uncomment only one of these - first one removes all default browser styles
9
+ // and the second is a port of normalize.css (http://necolas.github.com/normalize.css/)
10
+
11
+ // +global-reset
12
+ // +normalize
13
+
14
+ // If you uncomment this line, it will load roots styles on to default elements, much
15
+ // like a traditional css framework. If you don't want to replace everything, it can
16
+ // be broken down into many sub-mixins, which can be found in the file _roots.sass.
17
+ // It is *strongly recommended* to at very least use +base.
18
+
19
+ // +framework
20
+
21
+ // ------------------------------
22
+ // @import your stylsheets here
23
+ // ------------------------------
@@ -0,0 +1,57 @@
1
+ %meta{ :charset => 'utf8' }
2
+ %meta{ 'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge, chrome=1' }
3
+
4
+ -# -----------------------------------------------------
5
+ -# CONFIGURATION: This is important stuff, do it first!
6
+ -# -----------------------------------------------------
7
+
8
+ - title = "Your page title here"
9
+ - author = "Your name or company name"
10
+ - description = "Short description of your site"
11
+ - url = "http://example.com"
12
+ - preview_image = "/roots/preview.png" # 75x75 square. if you really can't, pass false
13
+
14
+ - favicons = true # see section below for size details
15
+ - facebook_tags = true
16
+ - mobile_site = false
17
+ - ie_app = true
18
+
19
+ -# -----------------------------------------------------
20
+
21
+ %title= title
22
+ %meta{ :name => 'description', :content => "#{description}" }
23
+ %meta{ :name => 'author', :content => "#{author}" }
24
+
25
+ - if favicons
26
+ -# 16x16, .ico
27
+ %link{ :rel => "shortcut icon", :href => "/favicon.ico" }
28
+ -# 57x57, .png
29
+ %link{ :rel => "apple-touch-icon", :href => "/roots/apple-touch-icon.png" }
30
+ -# 72x72, .png
31
+ %link{ :rel => "apple-touch-icon", :sizes => "72x72", :href => "/roots/apple-touch-icon-72x72.png" }
32
+ -# 114x114, .png
33
+ %link{ :rel => "apple-touch-icon", :sizes => "114x114", :href => "/roots/apple-touch-icon-114x114.png" }
34
+
35
+ - if facebook_tags
36
+ %meta{ property: 'og:title', content: "#{title}"}
37
+ %meta{ property: 'og:description', content: "#{description}"}
38
+ %meta{ property: 'og:image', content: "#{preview_image}"}
39
+ %meta{ property: 'og:url', content: "#{url}" }
40
+ -# more than just a website? Docs @ http://developers.facebook.com/docs/opengraph/objects/builtin/
41
+ %meta{ property: 'og:type', content: 'website' }
42
+
43
+ - if mobile_site
44
+ %meta{ :name => 'viewport', :content => 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' }
45
+
46
+ - if ie_app
47
+ -# You can get more detailed with this if you want. Docs @ http://msdn.microsoft.com/en-us/library/gg131029.aspx
48
+ %meta{ name: "application-name", content: "#{title}" }
49
+ %meta{ name: "msapplication-starturl", content: "#{url}" }
50
+ -# by all means, change this color
51
+ %meta{ name: "msapplication-navbutton-color", content: "#E88F4E" }
52
+
53
+ -# ---------------------------------------------------------------------------
54
+ -# Any other stuff you need in the head goes here! (fonts, stylesheets, etc.)
55
+ -# ---------------------------------------------------------------------------
56
+ -# NOTE: Script loads are blocking. It's recommended to load javascript at the bottom
57
+ -# of the page unless it's something like a webfont.
@@ -0,0 +1,26 @@
1
+ !!! 5
2
+ %head
3
+ = render 'layouts/config'
4
+ = stylesheet_link_tag 'application'
5
+
6
+ -# JS resources - not yet ready
7
+ -# resources = %w[ modal tooltip tabs alerts selection slider scrollspy imgfade spinner ]
8
+
9
+ -# ------------------------------------------------------------------------------------------
10
+
11
+ %body
12
+ = yield
13
+
14
+ -# ------------------------------------------------------------------------------------------
15
+
16
+ -# project resources - not yet ready
17
+ -# resources.each do |r|
18
+ -# %script{ src: "script/#{r}.js" }
19
+
20
+ -# help IE out with advanced selectors (http://selectivizr.com/)
21
+ /[if (gte IE6)&(lte IE8)]
22
+ =javascript_include_tag 'selectivizr.js'
23
+
24
+ =javascript_include_tag 'application'
25
+
26
+
Binary file
@@ -0,0 +1,454 @@
1
+ // ------------------------------
2
+ // Preset animations
3
+ // ------------------------------
4
+
5
+ // Ported directly from Eric Meyer's compass-animation module, which was adapted from Dan Eden's animate.css
6
+ // https://github.com/ericam/compass-animation
7
+ // http://daneden.me/animate/
8
+
9
+ // Includes: flash, bounce, shake, tada, swing, wobble, pulse, hinge,
10
+ // rollIn/Out, bounceIn/Out(Up/Down/Left/Right), fadeIn/Out(Up/Down/Left/Right), and
11
+ // rotateIn/Out(Up/Down/Left/Right)
12
+
13
+ // Excludes the "big" animations because they are atrocious and should never be used.
14
+ // Will include more custom-written ones in the future
15
+
16
+ +keyframes(flash)
17
+ 0%
18
+ opacity: 1
19
+ 25%
20
+ opacity: 0
21
+ 50%
22
+ opacity: 1
23
+ 75%
24
+ opacity: 0
25
+ 100%
26
+ opacity: 1
27
+
28
+ +keyframes(bounce)
29
+ 0%
30
+ +translateY(0)
31
+ 20%
32
+ +translateY(0)
33
+ 40%
34
+ +translateY(-30px)
35
+ 50%
36
+ +translateY(0)
37
+ 60%
38
+ +translateY(-15px)
39
+ 80%
40
+ +translateY(0)
41
+ 100%
42
+ +translateY(0)
43
+
44
+ +keyframes(shake)
45
+ 0%
46
+ +translateX(0)
47
+ 10%
48
+ +translateX(-10px)
49
+ 20%
50
+ +translateX(10px)
51
+ 30%
52
+ +translateX(-10px)
53
+ 40%
54
+ +translateX(10px)
55
+ 50%
56
+ +translateX(-10px)
57
+ 60%
58
+ +translateX(10px)
59
+ 70%
60
+ +translateX(-10px)
61
+ 80%
62
+ +translateX(10px)
63
+ 90%
64
+ +translateX(-10px)
65
+ 100%
66
+ +translateX(0)
67
+
68
+ +keyframes(tada)
69
+ 0%
70
+ +scale(1)
71
+ 10%
72
+ +transform(scale(0.9) rotate(-3deg))
73
+ 20%
74
+ +transform(scale(0.9) rotate(-3deg))
75
+ 30%
76
+ +transform(scale(1.1) rotate(3deg))
77
+ 40%
78
+ +transform(scale(1.1) rotate(-3deg))
79
+ 50%
80
+ +transform(scale(1.1) rotate(3deg))
81
+ 60%
82
+ +transform(scale(1.1) rotate(-3deg))
83
+ 70%
84
+ +transform(scale(1.1) rotate(3deg))
85
+ 80%
86
+ +transform(scale(1.1) rotate(-3deg))
87
+ 90%
88
+ +transform(scale(1.1) rotate(3deg))
89
+ 100%
90
+ +transform(scale(1) rotate(0))
91
+
92
+ +keyframes(swing)
93
+ 20%, 40%, 60%, 80%, 100%
94
+ +transform-origin(top center)
95
+ 20%
96
+ +rotate(15deg)
97
+ 40%
98
+ +rotate(-10deg)
99
+ 60%
100
+ +rotate(5deg)
101
+ 80%
102
+ +rotate(-5deg)
103
+ 100%
104
+ +rotate(0deg)
105
+
106
+ +keyframes(wobble)
107
+ 0%
108
+ +translateX(0%)
109
+ 15%
110
+ +transform(translateX(-25%) rotate(-5deg))
111
+ 30%
112
+ +transform(translateX(20%) rotate(3deg))
113
+ 45%
114
+ +transform(translateX(-15%) rotate(-3deg))
115
+ 60%
116
+ +transform(translateX(10%) rotate(2deg))
117
+ 75%
118
+ +transform(translateX(-5%) rotate(-1deg))
119
+ 100%
120
+ +transform(translateX(0%))
121
+
122
+ +keyframes(pulse)
123
+ 0%
124
+ +scale(1)
125
+ 50%
126
+ +scale(1.1)
127
+ 100%
128
+ +scale(1)
129
+
130
+ +keyframes(hinge)
131
+ 0%
132
+ +rotate(0)
133
+ +transform-origin(top left)
134
+ +animation-timing-function(ease-in-out)
135
+ 20%, 60%
136
+ +rotate(80deg)
137
+ +transform-origin(top left)
138
+ +animation-timing-function(ease-in-out)
139
+ 40%
140
+ +rotate(60deg)
141
+ +transform-origin(top left)
142
+ +animation-timing-function(ease-in-out)
143
+ 80%
144
+ +transform(rotate(60deg) translateY(0))
145
+ +opacity(1)
146
+ +transform-origin(top left)
147
+ +animation-timing-function(ease-in-out)
148
+ 100%
149
+ +translateY(700px)
150
+ +opacity(0)
151
+
152
+ +keyframes(rollIn)
153
+ 0%
154
+ +opacity(0)
155
+ +transform(translateX(-100%) rotate(-120deg))
156
+ 100%
157
+ +opacity(1)
158
+ +transform(translateX(0px) rotate(0deg))
159
+
160
+ +keyframes(rollOut)
161
+ 0%
162
+ +opacity(1)
163
+ +transform(translateX(0px) rotate(0deg))
164
+ 100%
165
+ +opacity(0)
166
+ +transform(translateX(-100%) rotate(-120deg))
167
+
168
+ +keyframes(bounceIn)
169
+ 0%
170
+ opacity: 0
171
+ +scale(0.3)
172
+ 50%
173
+ opacity: 1
174
+ +scale(1.05)
175
+ 70%
176
+ +scale(0.9)
177
+ 100%
178
+ +scale(1)
179
+
180
+ +keyframes(bounceInDown)
181
+ 0%
182
+ opacity: 0
183
+ +translateY(-2000px)
184
+ 60%
185
+ opacity: 1
186
+ +translateY(30px)
187
+ 80%
188
+ +translateY(-10px)
189
+ 100%
190
+ +translateY(0)
191
+
192
+ +keyframes(bounceInUp)
193
+ 0%
194
+ opacity: 0
195
+ +translateY(2000px)
196
+ 60%
197
+ opacity: 1
198
+ +translateY(-30px)
199
+ 80%
200
+ +translateY(10px)
201
+ 100%
202
+ +translateY(0)
203
+
204
+ +keyframes(bounceInRight)
205
+ 0%
206
+ opacity: 0
207
+ +translateX(2000px)
208
+ 60%
209
+ opacity: 1
210
+ +translateX(-30px)
211
+ 80%
212
+ +translateX(10px)
213
+ 100%
214
+ +translateX(0)
215
+
216
+ +keyframes(bounceInLeft)
217
+ 0%
218
+ opacity: 0
219
+ +translateX(-2000px)
220
+ 60%
221
+ opacity: 1
222
+ +translateX(30px)
223
+ 80%
224
+ +translateX(-10px)
225
+ 100%
226
+ +translateX(0)
227
+
228
+ +keyframes(bounceOut)
229
+ 0%
230
+ +scale(1)
231
+ 25%
232
+ +scale(0.95)
233
+ 50%
234
+ opacity: 1
235
+ +scale(1.1)
236
+ 100%
237
+ opacity: 0
238
+ +scale(0.3)
239
+
240
+ +keyframes(bounceOutUp)
241
+ 0%
242
+ +translateY(0)
243
+ 20%
244
+ opacity: 1
245
+ +translateY(20px)
246
+ 100%
247
+ opacity: 0
248
+ +translateY(-2000px)
249
+
250
+ +keyframes(bounceOutDown)
251
+ 0%
252
+ +translateY(0)
253
+ 20%
254
+ opacity: 1
255
+ +translateY(-20px)
256
+ 100%
257
+ opacity: 0
258
+ +translateY(2000px)
259
+
260
+ +keyframes(bounceOutLeft)
261
+ 0%
262
+ +translateX(0)
263
+ 20%
264
+ opacity: 1
265
+ +translateX(20px)
266
+ 100%
267
+ opacity: 0
268
+ +translateX(-2000px)
269
+
270
+ +keyframes(bounceOutRight)
271
+ 0%
272
+ +translateX(0)
273
+ 20%
274
+ opacity: 1
275
+ +translateX(-20px)
276
+ 100%
277
+ opacity: 0
278
+ +translateX(2000px)
279
+
280
+ +keyframes(fadeIn)
281
+ 0%
282
+ opacity: 0
283
+ 100%
284
+ opacity: 1
285
+
286
+ +keyframes(fadeInUp)
287
+ 0%
288
+ +translateY(20px)
289
+ opacity: 0
290
+ 100%
291
+ +translateY(0)
292
+ opacity: 1
293
+
294
+ +keyframes(fadeInDown)
295
+ 0%
296
+ +translateY(-20px)
297
+ opacity: 0
298
+ 100%
299
+ +translateY(0)
300
+ opacity: 1
301
+
302
+ +keyframes(fadeInRight)
303
+ 0%
304
+ +translateX(20px)
305
+ opacity: 0
306
+ 100%
307
+ +translateX(0)
308
+ opacity: 1
309
+
310
+ +keyframes(fadeInLeft)
311
+ 0%
312
+ +translateX(-20px)
313
+ opacity: 0
314
+ 100%
315
+ +translateX(0)
316
+ opacity: 1
317
+
318
+ +keyframes(fadeOut)
319
+ 0%
320
+ opacity: 1
321
+ 100%
322
+ opacity: 0
323
+
324
+ +keyframes(fadeOutUp)
325
+ 0%
326
+ +translateY(0)
327
+ opacity: 1
328
+ 100%
329
+ +translateY(-20px)
330
+ opacity: 0
331
+
332
+ +keyframes(fadeOutDown)
333
+ 0%
334
+ +translateY(0)
335
+ opacity: 1
336
+ 100%
337
+ +translateY(20px)
338
+ opacity: 0
339
+
340
+ +keyframes(fadeOutRight)
341
+ 0%
342
+ +translateX(0)
343
+ opacity: 1
344
+ 100%
345
+ +translateX(20px)
346
+ opacity: 0
347
+
348
+ +keyframes(fadeOutLeft)
349
+ 0%
350
+ +translateX(0)
351
+ opacity: 1
352
+ 100%
353
+ +translateX(-20px)
354
+ opacity: 0
355
+
356
+ +keyframes(rotateIn)
357
+ 0%
358
+ +transform-origin(center center)
359
+ +rotate(-200deg)
360
+ opacity: 0
361
+ 100%
362
+ +transform-origin(center center)
363
+ +rotate(0)
364
+ opacity: 1
365
+
366
+ +keyframes(rotateInDownLeft)
367
+ 0%
368
+ +transform-origin(left bottom)
369
+ +rotate(-90deg)
370
+ opacity: 0
371
+ 100%
372
+ +transform-origin(left bottom)
373
+ +rotate(0)
374
+ opacity: 1
375
+
376
+ +keyframes(rotateInUpLeft)
377
+ 0%
378
+ +transform-origin(left bottom)
379
+ +rotate(90deg)
380
+ opacity: 0
381
+ 100%
382
+ +transform-origin(left bottom)
383
+ +rotate(0)
384
+ opacity: 1
385
+
386
+ +keyframes(rotateInUpRight)
387
+ 0%
388
+ +transform-origin(right bottom)
389
+ +rotate(-90deg)
390
+ opacity: 0
391
+ 100%
392
+ +transform-origin(right bottom)
393
+ +rotate(0)
394
+ opacity: 1
395
+
396
+ +keyframes(rotateInDownRight)
397
+ 0%
398
+ +transform-origin(right bottom)
399
+ +rotate(90deg)
400
+ opacity: 0
401
+ 100%
402
+ +transform-origin(right bottom)
403
+ +rotate(0)
404
+ opacity: 1
405
+
406
+ +keyframes(rotateOut)
407
+ 0%
408
+ +transform-origin(center center)
409
+ +rotate(0)
410
+ opacity: 1
411
+ 100%
412
+ +transform-origin(center center)
413
+ +rotate(200deg)
414
+ opacity: 0
415
+
416
+ +keyframes(rotateOutDownLeft)
417
+ 0%
418
+ +transform-origin(left bottom)
419
+ +rotate(0)
420
+ opacity: 1
421
+ 100%
422
+ +transform-origin(left bottom)
423
+ +rotate(90deg)
424
+ opacity: 0
425
+
426
+ +keyframes(rotateOutUpLeft)
427
+ 0%
428
+ +transform-origin(left bottom)
429
+ +rotate(0)
430
+ opacity: 1
431
+ 100%
432
+ +transform-origin(left bottom)
433
+ +rotate(-90deg)
434
+ opacity: 0
435
+
436
+ +keyframes(rotateOutDownRight)
437
+ 0%
438
+ +transform-origin(right bottom)
439
+ +rotate(0)
440
+ opacity: 1
441
+ 100%
442
+ +transform-origin(right bottom)
443
+ +rotate(-90deg)
444
+ opacity: 0
445
+
446
+ +keyframes(rotateOutUpRight)
447
+ 0%
448
+ +transform-origin(right bottom)
449
+ +rotate(0)
450
+ opacity: 1
451
+ 100%
452
+ +transform-origin(right bottom)
453
+ +rotate(90deg)
454
+ opacity: 0