Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BEAM-14418] added arrows to slider #17722

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions website/www/site/assets/js/quotes-slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
17 changes: 16 additions & 1 deletion website/www/site/assets/scss/_quotes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@
}
}


.bullet-class-custom {
display: inline-block;
border: none;
Expand Down Expand Up @@ -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%;
}
}
24 changes: 16 additions & 8 deletions website/www/site/layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,24 @@ <h2 class="calendar-title">
{{ T "home-quotes-title" }}
</div>

<div class="quotes-desktop swiper">
<div class="swiper-wrapper">
{{ $data := index $.Site.Data .Site.Language.Lang }}
{{ range $quote := $data.quotes }}
<div class="swiper-slide">
{{ partial "quotes/quote.html" (dict "icon" $quote.icon "text" $quote.text "logoUrl" $quote.logoUrl "linkUrl" $quote.linkUrl "linkText" $quote.linkText) }}
<div class="swiper-container">
<div class="swiper-button-prev-custom">
<img src="/images/swiper-button-prev.png" alt="previous button">
</div>
<div class="quotes-desktop swiper">
<div class="swiper-wrapper">
{{ $data := index $.Site.Data .Site.Language.Lang }}
{{ range $quote := $data.quotes }}
<div class="swiper-slide">
{{ partial "quotes/quote.html" (dict "icon" $quote.icon "text" $quote.text "logoUrl" $quote.logoUrl "linkUrl" $quote.linkUrl "linkText" $quote.linkText) }}
</div>
{{ end }}
</div>
{{ end }}
<div id="swiper-pagination-id" class="swiper-pagination"></div>
</div>
<div class="swiper-button-next-custom">
<img src="/images/swiper-button-next.png" alt="next button">
</div>
<div id="swiper-pagination-id" class="swiper-pagination"></div>
</div>

</div>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.