diff --git a/website/www/site/assets/js/quotes-slider.js b/website/www/site/assets/js/quotes-slider.js index 35615718a956..6232d5244369 100644 --- a/website/www/site/assets/js/quotes-slider.js +++ b/website/www/site/assets/js/quotes-slider.js @@ -20,6 +20,10 @@ new Swiper('.swiper', { bulletClass: "bullet-class-custom", bulletActiveClass: "bullet-active-class-custom", }, + navigation: { + nextEl: ".swiper-button-next-custom", + prevEl: ".swiper-button-prev-custom", + }, breakpoints: { // switches from mobile to desktop when window width is > 1024px 1025: { diff --git a/website/www/site/assets/scss/_quotes.scss b/website/www/site/assets/scss/_quotes.scss index 8d50f1384b3c..73e847f9a1f6 100644 --- a/website/www/site/assets/scss/_quotes.scss +++ b/website/www/site/assets/scss/_quotes.scss @@ -119,7 +119,6 @@ } } - .bullet-class-custom { display: inline-block; border: none; @@ -169,3 +168,19 @@ } } } + +.swiper-container { + display: flex; + align-items: center; +} + +.swiper-button-next-custom, +.swiper-button-prev-custom { + @media (max-width: $mobile) { + display: none; + } + img { + display: block; + width: 100%; + } +} diff --git a/website/www/site/layouts/index.html b/website/www/site/layouts/index.html index 7e79c2db6f58..edeab5409998 100644 --- a/website/www/site/layouts/index.html +++ b/website/www/site/layouts/index.html @@ -164,16 +164,24 @@

{{ T "home-quotes-title" }} -
-
- {{ $data := index $.Site.Data .Site.Language.Lang }} - {{ range $quote := $data.quotes }} -
- {{ partial "quotes/quote.html" (dict "icon" $quote.icon "text" $quote.text "logoUrl" $quote.logoUrl "linkUrl" $quote.linkUrl "linkText" $quote.linkText) }} +
+
+ previous button +
+
+
+ {{ $data := index $.Site.Data .Site.Language.Lang }} + {{ range $quote := $data.quotes }} +
+ {{ partial "quotes/quote.html" (dict "icon" $quote.icon "text" $quote.text "logoUrl" $quote.logoUrl "linkUrl" $quote.linkUrl "linkText" $quote.linkText) }} +
+ {{ end }}
- {{ end }} +
+
+
+ next button
-
diff --git a/website/www/site/static/images/swiper-button-next.png b/website/www/site/static/images/swiper-button-next.png new file mode 100644 index 000000000000..97b2d965369d Binary files /dev/null and b/website/www/site/static/images/swiper-button-next.png differ diff --git a/website/www/site/static/images/swiper-button-prev.png b/website/www/site/static/images/swiper-button-prev.png new file mode 100644 index 000000000000..0639e9420f76 Binary files /dev/null and b/website/www/site/static/images/swiper-button-prev.png differ