bs3_helpers 0.0.2 → 0.0.3
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c86f88483cf513b78f789957b96a674d542a6c45
|
4
|
+
data.tar.gz: 2aeb341aac5eb65f9bda1837a849d022cda6a8fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f6ad527e58071b3c1cd4809b66e79bf592dbb4f9e91b3dcea5cd8add401137632c0d48de341ed7cfb2e1b128535c0ecb6dbd00356bff6ed23dd03bc120c7d22
|
7
|
+
data.tar.gz: 789362a3513a19040e62ce7e48363bd5d801d62b1476fb5f57df94674d4220566979fed8146d089397ce4026ac2a3f3a204d0a2dff384b29a8d5bca1e8b9fc64
|
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
module Bs3Helpers
|
3
|
+
module Helpers
|
4
|
+
module LayoutHelper
|
5
|
+
def grid(opts={},&block)
|
6
|
+
@grids = %w{ col offset pull push }
|
7
|
+
@sizes = %w{ xs sm md lg xl }
|
8
|
+
index = 13
|
9
|
+
|
10
|
+
@sizes.each do |s|
|
11
|
+
index.times do |i|
|
12
|
+
instance_variable_set "@col_#{s}_#{i}", "#{@grids.fetch(0)}-#{s}-#{i}"
|
13
|
+
instance_variable_set "@col_#{s}_#{@grids.fetch(1)}_#{i}", "#{@grids.fetch(0)}-#{s}-#{@grids.fetch(1)}-#{i}"
|
14
|
+
instance_variable_set "@col_#{s}_#{@grids.fetch(2)}_#{i}", "#{@grids.fetch(0)}-#{s}-#{@grids.fetch(2)}-#{i}"
|
15
|
+
instance_variable_set "@col_#{s}_#{@grids.fetch(3)}_#{i}", "#{@grids.fetch(0)}-#{s}-#{@grids.fetch(3)}-#{i}"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
@classes = []
|
19
|
+
|
20
|
+
if opts[:full]
|
21
|
+
@classes << @col_xs_12
|
22
|
+
@classes << @col_sm_12
|
23
|
+
@classes << @col_md_12
|
24
|
+
@classes << @col_lg_12
|
25
|
+
@classes << @col_xl_12
|
26
|
+
end
|
27
|
+
|
28
|
+
content_tag :div,'',class: @classes.join(' '),&block
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/bs3_helpers/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bs3_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Bolding
|
@@ -49,7 +49,10 @@ files:
|
|
49
49
|
- README.rdoc
|
50
50
|
- Rakefile
|
51
51
|
- lib/bs3_helpers.rb
|
52
|
+
- lib/bs3_helpers/helpers/alert_helper.rb
|
52
53
|
- lib/bs3_helpers/helpers/button_helper.rb
|
54
|
+
- lib/bs3_helpers/helpers/carousel_helper.rb
|
55
|
+
- lib/bs3_helpers/helpers/layout_helper.rb
|
53
56
|
- lib/bs3_helpers/version.rb
|
54
57
|
- lib/tasks/bs3_helpers_tasks.rake
|
55
58
|
- test/bs3_helpers_test.rb
|