Skip to content

Commit

Permalink
Updates testimonials carousel to initialize JS via 'data' attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
matyikriszta committed May 27, 2022
1 parent 134d5a1 commit aa7b004
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,4 @@ $(function() {
});

$('[data-bs-toggle="tooltip"]').tooltip();

const myCarousel = document.querySelector("#testimonials-carousel");
new bootstrap.Carousel(myCarousel);
});
4 changes: 2 additions & 2 deletions app/views/members/_testimonials.html.haml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.carousel.slider#testimonials-carousel
.carousel.slider{ 'data-ride': 'carousel' }
.carousel-inner
- @testimonials.each_with_index do |testimonial, index|
.carousel-item{ class: ('active' if index === 0) }
%blockquote
%p= testimonial.text
%footer.clearfix
= image_tag(testimonial.member.avatar(32), class: 'th radius left', alt: testimonial.member.name)
= image_tag(testimonial.member.avatar(32), class: 'rounded-circle ml-2', alt: testimonial.member.name)
%cite.left
= testimonial.member.full_name

0 comments on commit aa7b004

Please sign in to comment.