<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Creating a Custom Carousel in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Creating-a-Custom-Carousel/m-p/752037#M32713</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/514018"&gt;@RGrimsley&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd highly recommend you to use one of the available carousel frameworks available out in the wild since they&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Two of the frameworks I can recommend are:&lt;/P&gt;
&lt;P&gt;- &lt;A href="https://swiperjs.com/" target="_blank" rel="noopener"&gt;swiper.js&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;- &lt;A href="https://kenwheeler.github.io/slick/" target="_blank" rel="noopener"&gt;slick slider&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;an implementation of swiper.js could look like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;html+Hubl&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% require_head %}
  &amp;lt;link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.css" /&amp;gt;

  &amp;lt;!-- Demo styles --&amp;gt;
  &amp;lt;style&amp;gt;
    html,
    body {
      position: relative;
      height: 100%;
    }

    body {
      background: #eee;
      font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
      font-size: 14px;
      color: #000;
      margin: 0;
      padding: 0;
    }

    .swiper {
      width: 100%;
      height: 100%;
    }

    .swiper-slide {
      text-align: center;
      font-size: 18px;
      background: #fff;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .swiper-slide img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .swiper {
      margin-left: auto;
      margin-right: auto;
    }
  &amp;lt;/style&amp;gt;
{% end_require_head %}

{% require_js %}
  &amp;lt;script src="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.js"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script&amp;gt;
    var swiper = new Swiper(".mySwiper", {
      slidesPerView: 1,
      spaceBetween: 30,
      loop: true,
      pagination: {
        el: ".swiper-pagination",
        clickable: true,
      },
      navigation: {
        nextEl: ".swiper-button-next",
        prevEl: ".swiper-button-prev",
      },
    });
  &amp;lt;/script&amp;gt;
{% end_require_js %}

{# start module layout #}
&amp;lt;div class="swiper mySwiper"&amp;gt;
    &amp;lt;div class="swiper-wrapper"&amp;gt;
      {% for single_slide in module.slides %}&amp;lt;div class="swiper-slide"&amp;gt;
{# your content/layout of each slide goes here #}
&amp;lt;/div&amp;gt;
{% endfor %}
    &amp;lt;/div&amp;gt;
    &amp;lt;div class="swiper-button-next"&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;div class="swiper-button-prev"&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;div class="swiper-pagination"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
{# end module layout #}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for more options like responsive breakpoints you can check out the &lt;A href="https://swiperjs.com/demos" target="_blank" rel="noopener"&gt;demos&lt;/A&gt;. If you want one of the functions like breakpoints, you can simply copy/paste the snippet into the JS part.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So this&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;script&amp;gt;
    var swiper = new Swiper(".mySwiper", {
      slidesPerView: 1,
      spaceBetween: 30,
      loop: true,
      pagination: {
        el: ".swiper-pagination",
        clickable: true,
      },
      navigation: {
        nextEl: ".swiper-button-next",
        prevEl: ".swiper-button-prev",
      },
    });
  &amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;becomes this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;script&amp;gt;
    var swiper = new Swiper(".mySwiper", {
      slidesPerView: 1,
      spaceBetween: 30,
      loop: true,
      pagination: {
        el: ".swiper-pagination",
        clickable: true,
      },
      navigation: {
        nextEl: ".swiper-button-next",
        prevEl: ".swiper-button-prev",
      },
breakpoints: {
        640: {
          slidesPerView: 2,
          spaceBetween: 20,
        },
        768: {
          slidesPerView: 4,
          spaceBetween: 40,
        },
        1024: {
          slidesPerView: 5,
          spaceBetween: 50,
        },
      }
    });
  &amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope that helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
    <pubDate>Mon, 06 Feb 2023 11:29:54 GMT</pubDate>
    <dc:creator>Anton</dc:creator>
    <dc:date>2023-02-06T11:29:54Z</dc:date>
    <item>
      <title>Creating a Custom Carousel</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Creating-a-Custom-Carousel/m-p/751772#M32710</link>
      <description>&lt;P&gt;Hey, folks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After hours of fooling around, I was finally able to find the right code placement to get my content on one line. There are currently 7 posts being featured. Now, I'm really struggling with:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Getting the content to loop (after 7)&lt;/LI&gt;&lt;LI&gt;Once that's done, getting the most recent post to be featured in the middle of the page&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;Here's my current CSS:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.section-title-3 {&lt;BR /&gt;font-family: roobert-bold;&lt;BR /&gt;font-size: 32px;&lt;BR /&gt;line-height: 1.2em;&lt;BR /&gt;text-align: left;&lt;BR /&gt;width: 100%;&lt;BR /&gt;margin-left: 30px;&lt;BR /&gt;margin-top: 30px;&lt;BR /&gt;margin-bottom: 10px;&lt;BR /&gt;color: #1e2d39;&lt;BR /&gt;}&lt;BR /&gt;.section-title-3 a {&lt;BR /&gt;overflow: hidden;&lt;BR /&gt;position: relative;&lt;BR /&gt;display: inline-block;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;.section-title-3 a::before,&lt;BR /&gt;.section-title-3 a::after {&lt;BR /&gt;content: '';&lt;BR /&gt;position: absolute;&lt;BR /&gt;width: 52%;&lt;BR /&gt;left: 0;&lt;BR /&gt;}&lt;BR /&gt;.section-title-3 a::before {&lt;BR /&gt;background-color: #426270;&lt;BR /&gt;height: 2px;&lt;BR /&gt;bottom: 0;&lt;BR /&gt;transform-origin: 100% 50%;&lt;BR /&gt;transform: scaleX(0);&lt;BR /&gt;transition: transform .3s cubic-bezier(0.76, 0, 0.24, 1);&lt;BR /&gt;}&lt;BR /&gt;.section-title-3 a::after {&lt;BR /&gt;content: attr(data-replace);&lt;BR /&gt;height: 100%;&lt;BR /&gt;top: 0;&lt;BR /&gt;transform-origin: 100% 50%;&lt;BR /&gt;transform: translate3d(200%, 0, 0);&lt;BR /&gt;transition: transform .3s cubic-bezier(0.76, 0, 0.24, 1);&lt;BR /&gt;color: #426270;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;.section-title-3 a:hover::before {&lt;BR /&gt;color: #1e2d39;&lt;BR /&gt;transform-origin: 0% 50%;&lt;BR /&gt;transform: scaleX(1);&lt;BR /&gt;}&lt;BR /&gt;.section-title-3 a:hover::after {&lt;BR /&gt;transform: translate3d(0, 0, 0);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;.section-title-3 a span {&lt;BR /&gt;color: #1e2d39;&lt;BR /&gt;display: inline-block;&lt;BR /&gt;transition: transform .3s cubic-bezier(0.76, 0, 0.24, 1);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;.section-title-3 a:hover span {&lt;BR /&gt;transform: translate3d(-200%, 0, 0);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;.listing-columns-wrap .content-wrapper {&lt;BR /&gt;padding-top: 0px;&lt;BR /&gt;padding-bottom: 0px;&lt;BR /&gt;padding-right: -100px;&lt;BR /&gt;padding-left: -100px;&lt;BR /&gt;margin: auto;&lt;BR /&gt;}&lt;BR /&gt;.listing-columns-wrap .row {&lt;BR /&gt;padding-left: 0;&lt;BR /&gt;padding-right: 0;&lt;BR /&gt;float: none;&lt;BR /&gt;}&lt;BR /&gt;.listing-carousel-wrap .blog-index-wrap {&lt;BR /&gt;display: flex;&lt;BR /&gt;flex-wrap: nowrap;&lt;BR /&gt;width: 3000px;&lt;BR /&gt;margin: auto;&lt;BR /&gt;}&lt;BR /&gt;.listing-carousel-wrap .blog-index-wrap:after, .listing-main-wrap .blog-index-wrap:before {&lt;BR /&gt;content: "";&lt;BR /&gt;display: inline-block;&lt;BR /&gt;clear: both;&lt;BR /&gt;}&lt;BR /&gt;.listing-carousel-wrap .blog-index-wrap .post-items-3 {&lt;BR /&gt;transition: box-shadow .2s;&lt;BR /&gt;float: middle;&lt;BR /&gt;margin-bottom: 1%;&lt;BR /&gt;margin-right: 1%;&lt;BR /&gt;position: relative;&lt;BR /&gt;width: 31.77%;&lt;BR /&gt;min-height: 473px;&lt;BR /&gt;background: #e8eceb;&lt;BR /&gt;justify-content: center;&lt;BR /&gt;overflow: hidden;&lt;BR /&gt;}&lt;BR /&gt;.listing-carousel-wrap .blog-index-wrap .post-items-3:hover {&lt;BR /&gt;box-shadow: 0 0 13px rgba(33,33,33,.2);&lt;BR /&gt;}&lt;BR /&gt;.listing-carousel-wrap .blog-index-wrap .post-items-3:hover .summary-title{&lt;BR /&gt;font-family: roobert-bold;&lt;BR /&gt;}&lt;BR /&gt;.listing-carousel-wrap .blog-index-wrap .post-items-3:nth-child(3n) {&lt;BR /&gt;margin-right: 1%;&lt;BR /&gt;}&lt;BR /&gt;.listing-carousel-wrap .summary-thumbnail-outer-container {&lt;BR /&gt;position: relative;&lt;BR /&gt;}&lt;BR /&gt;.listing-carousel-wrap a.gallery-image-container {&lt;BR /&gt;margin: 15px;&lt;BR /&gt;display: block;&lt;BR /&gt;}&lt;BR /&gt;.listing-carousel-wrap a.gallery-image-container .summary-thumbnail.img-wrapper {&lt;BR /&gt;overflow: hidden;&lt;BR /&gt;padding-bottom: 66.6667%;&lt;BR /&gt;position: relative;&lt;BR /&gt;width: 100%;&lt;BR /&gt;height: auto;&lt;BR /&gt;}&lt;BR /&gt;.listing-carousel-wrap a.gallery-image-container .summary-thumbnail.img-wrapper img {&lt;BR /&gt;position: absolute;&lt;BR /&gt;font-size: 13px;&lt;BR /&gt;line-height: normal;&lt;BR /&gt;transition: .6s opacity;&lt;BR /&gt;left: 0;&lt;BR /&gt;top: 0;&lt;BR /&gt;width: 100%;&lt;BR /&gt;height: 100%;&lt;BR /&gt;object-fit: cover;&lt;BR /&gt;}&lt;BR /&gt;.listing-carousel-wrap .summary-content.gallery-meta-container .summary-title {&lt;BR /&gt;font-size: 20px;&lt;BR /&gt;line-height: 1.2em;&lt;BR /&gt;text-align: left;&lt;BR /&gt;font-family: roobert-semibold;&lt;BR /&gt;margin: 15px;&lt;BR /&gt;}&lt;BR /&gt;.listing-carousel-wrap .summary-content.gallery-meta-container .summary-title a.summary-title-link {&lt;BR /&gt;color: #1e2d39;&lt;BR /&gt;}&lt;BR /&gt;.listing-columns-wrap .summary-excerpt.summary-excerpt-only {&lt;BR /&gt;margin: 15px;&lt;BR /&gt;}&lt;BR /&gt;.listing-carousel-wrap .summary-excerpt.summary-excerpt-only p {&lt;BR /&gt;font-size: 14px;&lt;BR /&gt;line-height: 1.4em;&lt;BR /&gt;margin: 0;&lt;BR /&gt;text-align: left;&lt;BR /&gt;font-family: roobert-light;&lt;BR /&gt;margin: 15px&lt;BR /&gt;}&lt;BR /&gt;.listing-carousel-wrap .container--below-content {&lt;BR /&gt;font-size: 13px;&lt;BR /&gt;line-height: normal;&lt;BR /&gt;padding-bottom: 15px;&lt;BR /&gt;}&lt;BR /&gt;.listing-carousel-wrap .container--below-content .summary-metadata-item--date {&lt;BR /&gt;color: #1e2d39;&lt;BR /&gt;opacity: .7;&lt;BR /&gt;margin: 15px;&lt;BR /&gt;font-size: 13px;&lt;BR /&gt;line-height: 1.4em;&lt;BR /&gt;text-transform: none;&lt;BR /&gt;font-family: roobert-regular;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/83477"&gt;@media&lt;/a&gt;(max-width: 767px){&lt;BR /&gt;.listing-carousel-wrap .blog-index-wrap .post-items-3 {&lt;BR /&gt;float: left;&lt;BR /&gt;margin-bottom: 3.18182%;&lt;BR /&gt;margin-right: 0;&lt;BR /&gt;min-height: unset;&lt;BR /&gt;position: relative;&lt;BR /&gt;width: 100%;&lt;BR /&gt;}&lt;BR /&gt;.listing-carousel-wrap .content-wrapper{&lt;BR /&gt;padding: 35px 36px 0;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/83477"&gt;@media&lt;/a&gt;(max-width: 640px){&lt;BR /&gt;.listing-carousel-wrap .content-wrapper{&lt;BR /&gt;padding: 35px 20px 0;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here's the HTML:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;div class="listing-carousel-wrap"&amp;gt;&lt;BR /&gt;&amp;lt;div class="section-title-3"&amp;gt;&lt;BR /&gt;&amp;lt;a href="&lt;A href="https://www.ichorstrategies.com/recent-insights/" target="_blank"&gt;https://www.ichorstrategies.com/recent-insights/&lt;/A&gt;" data-replace="Read More"&amp;gt;&lt;BR /&gt;&amp;lt;span&amp;gt;&lt;BR /&gt;{% inline_text field="section_title" value="{{ module.section_title }}" %}&lt;BR /&gt;&amp;lt;/span&amp;gt;&lt;BR /&gt;&amp;lt;/a&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;div class="content-wrapper"&amp;gt;&lt;BR /&gt;&amp;lt;div class="row"&amp;gt;&lt;BR /&gt;&amp;lt;section class="blog-index-wrap"&amp;gt;&lt;BR /&gt;&lt;BR /&gt;{% set author_posts = blog_recent_author_posts(module.select_blog, "eric-eve", 7) %}&lt;BR /&gt;{% for author_post in author_posts %}&lt;BR /&gt;&lt;BR /&gt;&amp;lt;div class="post-items-3"&amp;gt;&lt;BR /&gt;{% if author_post.featured_image %}&lt;BR /&gt;&amp;lt;div class="summary-thumbnail-outer-container"&amp;gt;&lt;BR /&gt;&amp;lt;a href="{{ author_post.absolute_url }}" class="gallery-image-container"&amp;gt;&lt;BR /&gt;&amp;lt;div class="summary-thumbnail img-wrapper"&amp;gt;&lt;BR /&gt;&amp;lt;img src="{{ author_post.featured_image }}" alt="{{ author_post.name }}"&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/a&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;{% endif %}&lt;/P&gt;&lt;P&gt;&amp;lt;div class="summary-content gallery-meta-container"&amp;gt;&lt;BR /&gt;&amp;lt;div class="summary-title"&amp;gt;&lt;BR /&gt;&amp;lt;a href="{{ author_post.absolute_url }}" class="summary-title-link"&amp;gt;{{ author_post.name }}&amp;lt;/a&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;div class="summary-excerpt summary-excerpt-only"&amp;gt;&lt;BR /&gt;&amp;lt;p&amp;gt;&lt;BR /&gt;{{ author_post.post_list_content|truncatehtml(300)|striptags|safe }}&lt;BR /&gt;&amp;lt;/p&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;div class="container--below-content"&amp;gt;&lt;BR /&gt;&amp;lt;div class="summary-metadata--primary"&amp;gt;&lt;BR /&gt;&amp;lt;time class="summary-metadata-item summary-metadata-item--date"&amp;gt;{{ author_post.publish_date_local_time.strftime('%b %d, %Y') }}&amp;lt;/time&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;{% endfor %}&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/section&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If someone can help me with this, YOU WILL BE A LIFESAVER!!!&lt;/P&gt;</description>
      <pubDate>Sun, 05 Feb 2023 02:24:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Creating-a-Custom-Carousel/m-p/751772#M32710</guid>
      <dc:creator>RGrimsley</dc:creator>
      <dc:date>2023-02-05T02:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Custom Carousel</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Creating-a-Custom-Carousel/m-p/752037#M32713</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/514018"&gt;@RGrimsley&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd highly recommend you to use one of the available carousel frameworks available out in the wild since they&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Two of the frameworks I can recommend are:&lt;/P&gt;
&lt;P&gt;- &lt;A href="https://swiperjs.com/" target="_blank" rel="noopener"&gt;swiper.js&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;- &lt;A href="https://kenwheeler.github.io/slick/" target="_blank" rel="noopener"&gt;slick slider&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;an implementation of swiper.js could look like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;html+Hubl&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% require_head %}
  &amp;lt;link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.css" /&amp;gt;

  &amp;lt;!-- Demo styles --&amp;gt;
  &amp;lt;style&amp;gt;
    html,
    body {
      position: relative;
      height: 100%;
    }

    body {
      background: #eee;
      font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
      font-size: 14px;
      color: #000;
      margin: 0;
      padding: 0;
    }

    .swiper {
      width: 100%;
      height: 100%;
    }

    .swiper-slide {
      text-align: center;
      font-size: 18px;
      background: #fff;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .swiper-slide img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .swiper {
      margin-left: auto;
      margin-right: auto;
    }
  &amp;lt;/style&amp;gt;
{% end_require_head %}

{% require_js %}
  &amp;lt;script src="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.js"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script&amp;gt;
    var swiper = new Swiper(".mySwiper", {
      slidesPerView: 1,
      spaceBetween: 30,
      loop: true,
      pagination: {
        el: ".swiper-pagination",
        clickable: true,
      },
      navigation: {
        nextEl: ".swiper-button-next",
        prevEl: ".swiper-button-prev",
      },
    });
  &amp;lt;/script&amp;gt;
{% end_require_js %}

{# start module layout #}
&amp;lt;div class="swiper mySwiper"&amp;gt;
    &amp;lt;div class="swiper-wrapper"&amp;gt;
      {% for single_slide in module.slides %}&amp;lt;div class="swiper-slide"&amp;gt;
{# your content/layout of each slide goes here #}
&amp;lt;/div&amp;gt;
{% endfor %}
    &amp;lt;/div&amp;gt;
    &amp;lt;div class="swiper-button-next"&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;div class="swiper-button-prev"&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;div class="swiper-pagination"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
{# end module layout #}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for more options like responsive breakpoints you can check out the &lt;A href="https://swiperjs.com/demos" target="_blank" rel="noopener"&gt;demos&lt;/A&gt;. If you want one of the functions like breakpoints, you can simply copy/paste the snippet into the JS part.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So this&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;script&amp;gt;
    var swiper = new Swiper(".mySwiper", {
      slidesPerView: 1,
      spaceBetween: 30,
      loop: true,
      pagination: {
        el: ".swiper-pagination",
        clickable: true,
      },
      navigation: {
        nextEl: ".swiper-button-next",
        prevEl: ".swiper-button-prev",
      },
    });
  &amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;becomes this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;script&amp;gt;
    var swiper = new Swiper(".mySwiper", {
      slidesPerView: 1,
      spaceBetween: 30,
      loop: true,
      pagination: {
        el: ".swiper-pagination",
        clickable: true,
      },
      navigation: {
        nextEl: ".swiper-button-next",
        prevEl: ".swiper-button-prev",
      },
breakpoints: {
        640: {
          slidesPerView: 2,
          spaceBetween: 20,
        },
        768: {
          slidesPerView: 4,
          spaceBetween: 40,
        },
        1024: {
          slidesPerView: 5,
          spaceBetween: 50,
        },
      }
    });
  &amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope that helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 11:29:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Creating-a-Custom-Carousel/m-p/752037#M32713</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2023-02-06T11:29:54Z</dc:date>
    </item>
  </channel>
</rss>

