From 6680ef9235ddadcf81103382709c79066c23ade1 Mon Sep 17 00:00:00 2001 From: Chris Harris <1834925+df2@users.noreply.github.com> Date: Mon, 28 Mar 2022 03:37:35 -0700 Subject: [PATCH 1/2] Replace `!important` modifier with more specific selectors ... (#1100) --- src/scss/ui/_lists.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scss/ui/_lists.scss b/src/scss/ui/_lists.scss index b62d3624e..7d2404f03 100644 --- a/src/scss/ui/_lists.scss +++ b/src/scss/ui/_lists.scss @@ -26,7 +26,8 @@ .list-group-item.active { background-color: inherit; - border-left: 2px solid $yellow !important; + border-left-color: $yellow; + border-left-width: $border-width-wide; } .list-group-item { From 278fe7bba180687459396b9f52bccda6ad2ad8cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kuna?= <1282324+codecalm@users.noreply.github.com> Date: Mon, 28 Mar 2022 12:38:01 +0200 Subject: [PATCH 2/2] New carousel indicators: dots, vertical, thumbs (#1101) --- gulpfile.js | 2 +- src/pages/_docs/carousel.md | 47 ++++++++++++++++++- src/pages/_includes/example.html | 1 + src/pages/_includes/ui/carousel.html | 23 +++++----- src/pages/carousel.html | 30 ++++++++---- src/scss/_core.scss | 1 + src/scss/_variables.scss | 5 ++ src/scss/ui/_carousel.scss | 68 ++++++++++++++++++++++++++++ 8 files changed, 154 insertions(+), 23 deletions(-) create mode 100644 src/scss/ui/_carousel.scss diff --git a/gulpfile.js b/gulpfile.js index 5f1ab91eb..31836f443 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -348,7 +348,7 @@ gulp.task('mjs', () => { */ gulp.task('watch-jekyll', (cb) => { browserSync.notify('Building Jekyll') - return spawn('bundle', ['exec', 'jekyll', 'build', '--watch', '--destination', demoDir, '--trace'], { stdio: 'inherit' }) + return spawn('bundle', ['exec', 'jekyll', 'build', '--watch', '--incremental', '--destination', demoDir, '--trace'], { stdio: 'inherit' }) .on('close', cb) }) diff --git a/src/pages/_docs/carousel.md b/src/pages/_docs/carousel.md index 1acb8cbb0..99c30e3bf 100644 --- a/src/pages/_docs/carousel.md +++ b/src/pages/_docs/carousel.md @@ -11,6 +11,49 @@ bootstrap-link: components/carousel/ Use a carousel to make your website design more visually appealing for users. In the default carousel design, respective elements slide automatically and users can go to the next slide by clicking an arrow. {% capture code %} -{% include ui/carousel.html show-indicators=true show-controls=true id="carousel-sample" %} +{% include ui/carousel.html indicators=true controls=true id="carousel-sample" %} {% endcapture %} -{% include example.html code=code max-width="20rem" centered=true %} +{% include example.html code=code max-width="30rem" centered=true %} + +## Dots indicators + +You can replace the standard indicators with dots. Just add the `carousel-indicators-dot` class to your carousel: + +{% capture code %} +{% include ui/carousel.html id="carousel-indicators-dot" title="Carousel with dot indicators" indicators=true indicators-dot=true offset=20 fade=true %} +{% endcapture %} +{% include example.html code=code max-width="30rem" centered=true %} + +## Thumb indicators + +The syntax is similar with thumbnails. Add class `carousel-indicators-thumb` and add `background-image` to element `[data-bs-target]`. Default thumbnails have an aspect ratio of 1:1. To change this use `ratio` utils. + +{% capture code %} +{% include ui/carousel.html id="carousel-indicators-thumb" title="Carousel with thumbnail indicators" indicators=true indicators-thumb=true indicators-thumb-ratio=true offset=25 fade=true %} +{% endcapture %} +{% include example.html code=code max-width="30rem" centered=true %} + +## Vertical indicators + +To make the indicators go to the right side, add the `carousel-indicators-vertical` class. You can combine it with other classes that are responsible for dots or thumbnails. + +{% capture code %} +{% include ui/carousel.html id="carousel-indicators-dot-vertical" title="Carousel with vertical dot indicators" indicators=true indicators-vertical=true indicators-dot=true offset=30 fade=true %} +{% endcapture %} +{% include example.html code=code max-width="30rem" centered=true %} + +Likewise, you can add thumbnails on the right side: + +{% capture code %} +{% include ui/carousel.html id="carousel-indicators-thumb-vertical" title="Carousel with thumbnail indicators" indicators=true indicators-vertical=true indicators-thumb=true indicators-thumb-ratio=true offset=22 fade=true %} +{% endcapture %} +{% include example.html code=code max-width="30rem" centered=true %} + +## Carousel with captions + +Add captions to your slides easily with the `.carousel-caption` element within any `.carousel-item`. To make the text more readable on the image you can add `carousel-caption-background` which will add a black overlay over the image. + +{% capture code %} +{% include ui/carousel.html id="carousel-captions" title="Carousel with captions" captions=true controls=true offset=15 %} +{% endcapture %} +{% include example.html code=code max-width="30rem" centered=true %} \ No newline at end of file diff --git a/src/pages/_includes/example.html b/src/pages/_includes/example.html index a03fda053..f2bd644df 100644 --- a/src/pages/_includes/example.html +++ b/src/pages/_includes/example.html @@ -42,6 +42,7 @@ {% assign html = html | replace_regex: 'src="([^"]+)"', 'src="..."' %} {% assign html = html | replace_regex: 'href="([^#][^"]+)"', 'href="#"' %} {% assign html = html | replace_regex: '\{% hide %\}.*?\{% endhide %\}', '' %} +{% assign html = html | replace_regex: 'class=" ', 'class="' %} {% assign html = html | htmlbeautifier %} diff --git a/src/pages/_includes/ui/carousel.html b/src/pages/_includes/ui/carousel.html index 7c5c3edf2..0f85d2a62 100644 --- a/src/pages/_includes/ui/carousel.html +++ b/src/pages/_includes/ui/carousel.html @@ -1,13 +1,14 @@ {% assign limit = include.limit | default: 5 %} {% assign offset = include.offset | default: 0 %} {% assign photos = site.data.photos | where: "horizontal", true %} - {% endif %}