cmor_testimonials 0.0.17.pre → 0.0.18.pre

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
  SHA256:
3
- metadata.gz: c12e8a6b252d9be5a2d6d529c778ca0b1c7b706838781141b092135e33cc9258
4
- data.tar.gz: 71416fbbfce7e35138b697887ced23f792b8b2b45a209ac210dee369599598c7
3
+ metadata.gz: c396a0e5491765c4b24076959b2786562c6242b9cc460a86a5b5d3370fe3b145
4
+ data.tar.gz: bd42b36c688d569bdf3204ff28f04f4d02ce988aed90086eeb738985cc7b5295
5
5
  SHA512:
6
- metadata.gz: ccda5453df81c55fabc799452fb0c908da439adef5ec9ef0fd6926e5ac76ffbbac3c0b5117b6f75f7a95185dcb9cbf1be70276386d0f96afc34fd37449b19a03
7
- data.tar.gz: f6916fc3bfbcd264395927e9e896b060649827a24cd7e71f0b66c51e500e27240a8f141c836a047206491b8665c3a8e62bcce5ea79b86ab3cc51162b62be8730
6
+ metadata.gz: b1f592a3755f15d60ca0fa6dc39a08e80cce9148c27b19a011f971687f78c9ccec338e658edb3e8c0a3aa939bbd2b011e27bcb783540b8df2dafebc6af1d88d4
7
+ data.tar.gz: 7225bc7f544c64ea0d8071433320820be5beae5024ad2f806e13935a879f3d7ba7eb07a1cc07adc821f842d8168c6fc99e2279c2614fff55bf98f8abdd02c466
@@ -1,15 +1,27 @@
1
- .cmor-testimonials-category .carousel-control-prev,
2
- .cmor-testimonials-category .carousel-control-next {
3
- color: gray;
4
- }
5
-
6
-
7
- .carousel-control-prev:before {
1
+ .cmor-testimonials-category .carousel-control-prev .control:before {
8
2
  content:"\2039";
9
3
  font-size: 250%;
10
4
  }
11
5
 
12
- .carousel-control-next:before {
6
+ .cmor-testimonials-category .carousel-control-next .control:before {
13
7
  content:"\203A";
14
8
  font-size: 250%;
9
+ }
10
+
11
+ .cmor-testimonials-category .carousel-control-prev {
12
+ justify-content: flex-start;
13
+ }
14
+
15
+ .cmor-testimonials-category .carousel-control-next {
16
+ justify-content: flex-end;
17
+ }
18
+
19
+ .cmor-testimonials-category .testimonial,
20
+ .cmor-testimonials-category .title {
21
+ padding-left: 1rem;
22
+ padding-right: 1rem;
23
+ }
24
+
25
+ .cmor-testimonials-category .testimonial {
26
+ font-style: italic;
15
27
  }
@@ -4,17 +4,20 @@ module Cmor
4
4
  def render_category(category_or_identifier, options = {})
5
5
  default_variant_options = Cmor::Testimonials::Configuration.image_variant_options[:category]
6
6
  options.reverse_merge!(
7
- autostart: true,
8
- interval: 5.0,
9
- keyboard: true,
10
- pause: :hover,
11
- ride: false,
12
- wrap: true,
13
- controls: true,
14
- indicators: false,
15
- variant_options: default_variant_options,
16
- font_awesome: false,
17
- show_image: true
7
+ autostart: true,
8
+ interval: 5.0,
9
+ keyboard: true,
10
+ pause: :hover,
11
+ ride: false,
12
+ wrap: true,
13
+ controls: true,
14
+ indicators: false,
15
+ variant_options: default_variant_options,
16
+ font_awesome: false,
17
+ show_image: true,
18
+ control_html: { class: 'text-dark' },
19
+ image_container_html: { class: 'col-12 text-center'},
20
+ text_container_html: { class: 'col-12 text-center'},
18
21
  )
19
22
  category = if category_or_identifier.is_a?(Cmor::Testimonials::Category)
20
23
  category_or_identifier
@@ -1,4 +1,4 @@
1
- .cmor-testimonials-category.carousel.slide{class: dom_class(category), id: dom_id(category), data: { ride: 'carousel', interval: (options[:interval].to_f * 1000).to_i, keyboard: options[:keyboard].to_s, pause: options[:pause], wrap: options[:wrap].to_s } }
1
+ .cmor-testimonials-category.carousel.slide{class: "#{dom_class(category)} #{category.identifier}", id: dom_id(category), data: { ride: 'carousel', interval: (options[:interval].to_f * 1000).to_i, keyboard: options[:keyboard].to_s, pause: options[:pause], wrap: options[:wrap].to_s } }
2
2
  - if options[:indicators]
3
3
  / Carousel indicators
4
4
  %ol.carousel-indicators
@@ -7,24 +7,29 @@
7
7
  / Wrapper for carousel items
8
8
  .carousel-inner
9
9
  - category.testimonials.published.each_with_index do |testimonial, i|
10
- .item.carousel-item.text-center{ class: ((i == 0) ? 'active' : '') }
11
- - if options[:show_image] && testimonial.image.respond_to?(:variant)
12
- .img-box
13
- %img.img-thumbnail.rounded-circle{:alt => "", :src => main_app.url_for(testimonial.image.variant(options[:variant_options])) }/
14
- %p.testimonial= markup_helper(self).to_html(testimonial, :body)
15
- %p.overview
16
- - if testimonial.role.present?
17
- = "<b>#{testimonial.fullname}</b>, #{testimonial.role} - #{testimonial.company}".html_safe
18
- - else
19
- = "<b>#{testimonial.fullname}</b> - #{testimonial.company}".html_safe
10
+ .item.carousel-item{ class: ((i == 0) ? 'active' : '') }
11
+ .row
12
+ - if options[:show_image] && testimonial.image.respond_to?(:variant)
13
+ .testimonial-image-container{ options[:image_container_html] }
14
+ %img.img-thumbnail.rounded-circle{ alt: "", src: main_app.url_for(testimonial.image.variant(options[:variant_options])) }/
15
+ .testimonial-text-container{ options[:text_container_html] }
16
+ %div.testimonial
17
+ = markup_helper(self).to_html(testimonial, :body)
18
+ %div.title
19
+ - if testimonial.role.present?
20
+ %p= "<b>#{testimonial.fullname}</b>, #{testimonial.role} - #{testimonial.company}".html_safe
21
+ - else
22
+ %p= "<b>#{testimonial.fullname}</b> - #{testimonial.company}".html_safe
20
23
  - if options[:controls]
21
- %a.carousel-control-prev{"data-slide" => "prev", :href => "##{dom_id(category)}", :role => "button"}
24
+ %a.carousel-control-prev{options[:control_html], "data-slide" => "prev", :href => "##{dom_id(category)}", :role => "button"}
22
25
  - if options[:font_awesome]
23
26
  %i.fa.fa-angle-left
24
27
  - else
28
+ %span.control
25
29
  %span.sr-only= t('.previous')
26
- %a.carousel-control-next{"data-slide" => "next", :href => "##{dom_id(category)}", :role => "button"}
30
+ %a.carousel-control-next{options[:control_html], "data-slide" => "next", :href => "##{dom_id(category)}", :role => "button"}
27
31
  - if options[:font_awesome]
28
32
  %i.fa.fa-angle-right
29
33
  - else
34
+ %span.control
30
35
  %span.sr-only= t('.next')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmor_testimonials
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17.pre
4
+ version: 0.0.18.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugen Müller
@@ -31,28 +31,28 @@ dependencies:
31
31
  requirements:
32
32
  - - '='
33
33
  - !ruby/object:Gem::Version
34
- version: 0.0.17.pre
34
+ version: 0.0.18.pre
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - '='
40
40
  - !ruby/object:Gem::Version
41
- version: 0.0.17.pre
41
+ version: 0.0.18.pre
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: cmor_core_frontend
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - '='
47
47
  - !ruby/object:Gem::Version
48
- version: 0.0.17.pre
48
+ version: 0.0.18.pre
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - '='
54
54
  - !ruby/object:Gem::Version
55
- version: 0.0.17.pre
55
+ version: 0.0.18.pre
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: sqlite3
58
58
  requirement: !ruby/object:Gem::Requirement