twitter-bootstrap-components-rails 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 62080f00d649abb9e7fa4a0d7b6c1e4e0c00a3a6
4
- data.tar.gz: f7e989a1871adc4e2f3237ab9b575d05c865f96b
3
+ metadata.gz: b5423c52d71e50a78d2f9fd76f3e2a893b3f6600
4
+ data.tar.gz: 4d58c84883ee21063a896c0bbefde458614b946d
5
5
  SHA512:
6
- metadata.gz: ba6ed47d1f7b743071191a1c66aac86bde53a2a3b47406107a9d0887c4fa5876d88a3583a182b2745f253bc09fb8935e88c3bf59b12c56ec3a5b75d483875b4b
7
- data.tar.gz: c443a2554d5e37cc9de315e91f7ffb756a98c5d0c0a4504c1979d391d5978ca4905028826f9e527b80729b6ce03201c5315a5b73d352805f05583289830580b3
6
+ metadata.gz: 5bf709b2644d0826984d5d98e989638292a8129c9d28804adc18e94aee0fed3cdbba43342ce010cfb5373984ca72e29a5953d0a9784a10e39e4c72d8788ad2ed
7
+ data.tar.gz: f001070fbc4e5ade59dfd9827b1f23a5b95ab135e5201b3068c21951acde0d218aae1c9d50d3385219af71cd7066057e143961f06d17427a3599502837347e98
@@ -2,9 +2,14 @@ module Twitter
2
2
  module Bootstrap
3
3
  module Components
4
4
  module V3
5
+ # Example with active storage:
6
+ #
7
+ # = bootstrap_thumbnail(image_options: { src: main_app.url_for(picture.asset) })
8
+ #
5
9
  class Thumbnail < Base
6
10
  DEFAULT_IMAGE_SRC = "https://placeholdit.imgix.net/~text?txtsize=16&txt=242x200&w=242&h=200".freeze
7
11
  DEFAULT_CONTAINER_CLASSES = "col-xs-6 col-md-3".freeze
12
+ DEFAULT_THUMBNAIL_CLASSES = "thumbnail".freeze
8
13
 
9
14
  private
10
15
 
@@ -14,6 +19,7 @@ module Twitter
14
19
  context: context,
15
20
  container_id: container_id,
16
21
  container_classes: container_classes,
22
+ thumbnail_classes: thumbnail_classes,
17
23
  image_options: image_options,
18
24
  link_options: link_options
19
25
  }
@@ -31,6 +37,10 @@ module Twitter
31
37
  @options[:container_classes] || DEFAULT_CONTAINER_CLASSES
32
38
  end
33
39
 
40
+ def thumbnail_classes
41
+ @options[:thumbnail_classes] || DEFAULT_THUMBNAIL_CLASSES
42
+ end
43
+
34
44
  def image_options
35
45
  (@options[:image_options] || {}).reverse_merge!(alt: nil, src: DEFAULT_IMAGE_SRC)
36
46
  end
@@ -1,6 +1,6 @@
1
1
  - if block_output
2
2
  %div{ class: container_classes, id: container_id }
3
- .thumbnail
3
+ %div{ class: thumbnail_classes }
4
4
  - if link_options[:href].present?
5
5
  %a{ link_options }
6
6
  %img{ image_options }/
@@ -14,5 +14,5 @@
14
14
  %a.thumbnail{ link_options }
15
15
  %img{ image_options }/
16
16
  - else
17
- .thumbnail
17
+ %div{ class: thumbnail_classes }
18
18
  %img{ image_options }/
@@ -2,7 +2,7 @@ module Twitter
2
2
  module Bootstrap
3
3
  module Components
4
4
  module Rails
5
- VERSION = '0.6.1'.freeze
5
+ VERSION = '0.6.2'.freeze
6
6
  end
7
7
  end
8
8
  end
@@ -0,0 +1 @@
1
+ require 'twitter/bootstrap/components/rails'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter-bootstrap-components-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-31 00:00:00.000000000 Z
11
+ date: 2018-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -205,7 +205,7 @@ files:
205
205
  - lib/twitter/bootstrap/components/rails.rb
206
206
  - lib/twitter/bootstrap/components/rails/engine.rb
207
207
  - lib/twitter/bootstrap/components/rails/version.rb
208
- - lib/twitter_bootstrap_components_rails.rb
208
+ - lib/twitter_bootstrap_components_rails.rb~
209
209
  homepage: https://github.com/robotex82/twitter-bootstrap-components-rails
210
210
  licenses:
211
211
  - MIT
@@ -1 +0,0 @@
1
- require 'twitter_bootstrap_components_rails'