elasticss-rails 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/README.md +30 -27
- data/lib/elasticss-rails/version.rb +1 -1
- data/lib/generators/elasticss/install_generator.rb +27 -0
- metadata +3 -2
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# ElastiCSS for Rails 3.1 Asset Pipeline
|
2
|
-
ElastiCSS is a simple css framework to layout web-based interfaces, based on the printed layout techniques of 4 columns but with capabilities to unlimited column combinations. and capacity to make elastic, fixed and liquid layout easily
|
2
|
+
ElastiCSS is a simple css framework to layout web-based interfaces, based on the printed layout techniques of 4 columns but with capabilities to unlimited column combinations. and capacity to make elastic, fixed and liquid layout easily
|
3
3
|
|
4
4
|
elasticss-rails project integrates ElastiCSS framework for Rails 3.1 Asset Pipeline (Rails 3.2 supported)
|
5
5
|
|
@@ -23,15 +23,23 @@ Install the gem using the bundle command:
|
|
23
23
|
|
24
24
|
bundle install
|
25
25
|
|
26
|
+
## To add the elasticss CSS and JS assets
|
27
|
+
|
28
|
+
You can run the generator command
|
29
|
+
|
30
|
+
rails g elasticss:install
|
31
|
+
|
32
|
+
Or you can add them **manually**:
|
26
33
|
|
27
34
|
## Add elasticss CSS assets
|
28
35
|
|
36
|
+
|
29
37
|
Add to your `app/assets/stylesheets/application.css`
|
30
38
|
|
31
|
-
|
39
|
+
*= require elastic
|
32
40
|
|
33
41
|
If you need to add the print support you can add it as well
|
34
|
-
|
42
|
+
|
35
43
|
*= require elastic.print
|
36
44
|
|
37
45
|
## Add elasticss JS assets
|
@@ -45,7 +53,7 @@ Add to your `app/assets/javascripts/application.js`
|
|
45
53
|
Layout (generates ElastiCSS layout) - (ERB and HAML supported):
|
46
54
|
|
47
55
|
You need to first add the haml-rails to the gemfile:
|
48
|
-
|
56
|
+
|
49
57
|
gem 'haml-rails'
|
50
58
|
|
51
59
|
And last but not least if you want HAML to be your default template engine you
|
@@ -75,36 +83,31 @@ But wait there is more:
|
|
75
83
|
|
76
84
|
|
77
85
|
## Changelog
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
</ul>
|
86
|
+
- Added a install generator (v0.1.5)
|
87
|
+
- Current gem v.0.1.4
|
88
|
+
- Full integration with rails asset pipeline
|
89
|
+
- Skip inclusion of JS with an argument
|
90
|
+
- Release gem v.0.1.0
|
91
|
+
- Support for HAML templates
|
92
|
+
- Released gem v.0.0.3
|
93
|
+
- Released gem v.0.0.2
|
94
|
+
- Released gem v.0.0.1
|
88
95
|
|
89
96
|
|
90
97
|
## Contributors & Patches & Forks
|
91
|
-
|
92
|
-
|
93
|
-
|
98
|
+
|
99
|
+
- Abraham Kuri Vargas ([@kurenn](http://twitter.com/kurenn))
|
100
|
+
- Ricardo Cruz ([@rkrdo89](http://twitter.com/rkrdo89))
|
94
101
|
|
95
102
|
## ElastiCSS author & team
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
<li>Javier Ayala (@javi_ayala)</li>
|
100
|
-
</ul>
|
103
|
+
- Fernando Trasviña ([@azendal](http://twitter.com/azendal))
|
104
|
+
- Sergio de la Garza ([@sgarza](http://twitter.com/azendal))
|
105
|
+
- Javier Ayala ([@javi_ayala](http://twitter.com/javi_ayala))
|
101
106
|
|
102
107
|
## Future
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
<li>Provide a stylesheet for templates</li>
|
107
|
-
</ul>
|
108
|
+
- Add dinamic columns layout with argument
|
109
|
+
- Writing tests (not implemented yet)
|
110
|
+
- Provide a stylesheet for templates
|
108
111
|
|
109
112
|
|
110
113
|
## Credits
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module Elasticss
|
4
|
+
module Generators
|
5
|
+
class InstallGenerator < ::Rails::Generators::Base
|
6
|
+
|
7
|
+
desc 'This generator adds the elasticss files to the assets manifest'
|
8
|
+
def add_assets
|
9
|
+
insert_into_file "app/assets/javascripts/application#{detect_js_format[0]}", "#{detect_js_format[1]} require elastic\n", :after => "jquery_ujs\n"
|
10
|
+
insert_into_file "app/assets/stylesheets/application#{detect_css_format[0]}", "#{detect_css_format[1]} require elastic\n", :after => "require_self\n"
|
11
|
+
end
|
12
|
+
|
13
|
+
def detect_js_format
|
14
|
+
return ['.js.coffee', '#='] if File.exist?('app/assets/javascripts/application.js.coffee')
|
15
|
+
return ['.js', '//='] if File.exist?('app/assets/javascripts/application.js')
|
16
|
+
end
|
17
|
+
|
18
|
+
def detect_css_format
|
19
|
+
return ['.css', ' *='] if File.exist?('app/assets/stylesheets/application.css')
|
20
|
+
return ['.css.sass', ' //='] if File.exist?('app/assets/stylesheets/application.css.sass')
|
21
|
+
return ['.sass', ' //='] if File.exist?('app/assets/stylesheets/application.sass')
|
22
|
+
return ['.css.scss', ' //='] if File.exist?('app/assets/stylesheets/application.css.scss')
|
23
|
+
return ['.scss', ' //='] if File.exist?('app/assets/stylesheets/application.scss')
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticss-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
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:
|
12
|
+
date: 2013-02-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -44,6 +44,7 @@ files:
|
|
44
44
|
- lib/elasticss-rails.rb
|
45
45
|
- lib/elasticss-rails/engine.rb
|
46
46
|
- lib/elasticss-rails/version.rb
|
47
|
+
- lib/generators/elasticss/install_generator.rb
|
47
48
|
- lib/generators/elasticss/layout/layout_generator.rb
|
48
49
|
- lib/generators/elasticss/layout/templates/.DS_Store
|
49
50
|
- lib/generators/elasticss/layout/templates/layout_3_columns.html.erb
|