ecm_galleries 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/ecm/galleries/galleries_helper/_render.html.haml +2 -2
- data/app/views/ecm/galleries/picture_galleries/index.html.haml +2 -2
- data/app/views/ecm/galleries/picture_galleries/show.html.haml +4 -2
- data/lib/ecm/galleries/configuration.rb +2 -1
- data/lib/ecm/galleries/version.rb +1 -1
- data/lib/generators/ecm/galleries/install/templates/initializer.rb +9 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe9c5d37fb56874f9c289b1100cc52d8f45277bb40b30996df1f617cab4086a7
|
4
|
+
data.tar.gz: 569e6412180bb2df8dc54517ab0e0b2f45d0680fe40407cafc0c50e820ddc9df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 865e59b09e6a1a7a11f05e11e26f187b630292dce3d80d35f847965ee8fc03872127cc752fe724cd61d04bb893c22e83e69fae4f7516547a22a00324fd498d1f
|
7
|
+
data.tar.gz: cbd4239339391aaba9cc12a6184f0405c6f692e55799b9a8f4a3301c7c3ed6b4cb58345c249bf0fb7e08f4871ca10c984ac1c8b4df65744455306c04145fd3a1
|
@@ -6,8 +6,8 @@
|
|
6
6
|
- resource.picture_details.published.each do |picture_detail|
|
7
7
|
.col-md-6.col-lg-3.d-flex.align-items-stretch.mb-4
|
8
8
|
= bootstrap_card(additional_css_classes: 'text-center border-0 w-100' ) do
|
9
|
-
%a{ href: main_app.url_for(picture_detail.asset
|
10
|
-
%img{ src: main_app.url_for(picture_detail.asset) }
|
9
|
+
%a{ href: main_app.url_for(picture_detail.asset), data: { gallery: dom_id(resource) } }
|
10
|
+
%img{ src: main_app.url_for(picture_detail.asset.variant(variant_options)) }
|
11
11
|
- if show_details
|
12
12
|
.card-body
|
13
13
|
%h5.card-title
|
@@ -3,8 +3,8 @@
|
|
3
3
|
.row
|
4
4
|
- @collection.each do |picture_gallery|
|
5
5
|
.col-4
|
6
|
-
- image_options = if picture_gallery.
|
7
|
-
- { src: main_app.url_for(picture_gallery.
|
6
|
+
- image_options = if picture_gallery.picture_details.first.try(:asset).present?
|
7
|
+
- { src: main_app.url_for(picture_gallery.picture_details.first.asset.variant(Ecm::Galleries::Configuration.thumbnail_variant_options)) }
|
8
8
|
- else
|
9
9
|
- {}
|
10
10
|
= bootstrap_card(image_options: image_options, additional_css_classes: 'text-center border-0') do
|
@@ -3,8 +3,10 @@
|
|
3
3
|
%div{ id: dom_id(@resource), class: dom_class(@resource) }
|
4
4
|
.row
|
5
5
|
- @resource.picture_details.each do |picture_detail|
|
6
|
-
.col-lg-
|
7
|
-
= bootstrap_card(
|
6
|
+
.col-md-6.col-lg-3.d-flex.align-items-stretch.mb-4
|
7
|
+
= bootstrap_card(additional_css_classes: 'text-center border-0' ) do
|
8
|
+
%a{ href: main_app.url_for(picture_detail.asset), data: { gallery: dom_id(@resource) } }
|
9
|
+
%img.img-fluid{ src: main_app.url_for(picture_detail.asset.variant(Ecm::Galleries::Configuration.thumbnail_variant_options)) }
|
8
10
|
.card-body
|
9
11
|
%h5.card-title
|
10
12
|
= picture_detail.title
|
@@ -6,6 +6,7 @@ module Ecm::Galleries
|
|
6
6
|
|
7
7
|
mattr_accessor(:base_controller) { '::FrontendController' }
|
8
8
|
mattr_accessor(:galleries_helper_render_default_options) { { variant_options: {}, show_details: false } }
|
9
|
-
mattr_accessor(:pictures_helper_render_default_options) { {
|
9
|
+
mattr_accessor(:pictures_helper_render_default_options) { { image_tag_only: true } }
|
10
|
+
mattr_accessor(:thumbnail_variant_options) { { combine_options: { resize: "384x216^", extent: "384x216", gravity: "center"} } }
|
10
11
|
end
|
11
12
|
end
|
@@ -10,12 +10,18 @@ Ecm::Galleries.configure do |config|
|
|
10
10
|
#
|
11
11
|
# Default: config.galleries_helper_render_default_options = { variant_options: {}, show_details: false }
|
12
12
|
#
|
13
|
-
config.
|
13
|
+
config.galleries_helper_render_default_options = { variant_options: {}, show_details: false }
|
14
14
|
|
15
15
|
# These options are the defaults that will be applied to when rendering
|
16
16
|
# pictures through the pictures helper.
|
17
17
|
#
|
18
|
-
# Default: config.pictures_helper_render_default_options = {
|
18
|
+
# Default: config.pictures_helper_render_default_options = { image_tag_only: true }
|
19
|
+
#
|
20
|
+
config.pictures_helper_render_default_options = { image_tag_only: true }
|
21
|
+
|
22
|
+
# This options will be applied when rendering thumbails in galleries.
|
23
|
+
#
|
24
|
+
# Default: config.thumbnail_variant_options = { combine_options: { resize: "384x216^", extent: "384x216", gravity: "center" } }
|
19
25
|
#
|
20
|
-
config.
|
26
|
+
config.thumbnail_variant_options = { combine_options: { resize: "384x216^", extent: "384x216", gravity: "center" } }
|
21
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_galleries
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
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-12-
|
11
|
+
date: 2018-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|