Skip to content

Commit a59b15b

Browse files
committed
Add a carousel component with theme-aware buttons.
1 parent 76d8450 commit a59b15b

File tree

3 files changed

+33
-8
lines changed

3 files changed

+33
-8
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?jelly escape-by-default='true'?>
2+
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:fa="/font-awesome">
3+
<st:documentation>
4+
Renders a Bootstrap carousel.
5+
6+
<st:attribute name="id" use="required" type="String">
7+
The ID of the carousel.
8+
</st:attribute>
9+
10+
</st:documentation>
11+
12+
<st:adjunct includes="io.jenkins.plugins.bootstrap5"/>
13+
14+
<div id="${id}" class="carousel slide carousel" data-bs-interval="false">
15+
<div class="carousel-inner">
16+
<d:invokeBody/>
17+
</div>
18+
<button class="carousel-control-prev" type="button" data-bs-target="#overview-carousel" data-bs-slide="prev">
19+
<fa:svg-icon name="chevron-left" />
20+
<span class="visually-hidden">Previous</span>
21+
</button>
22+
<button class="carousel-control-next" type="button" data-bs-target="#overview-carousel" data-bs-slide="next">
23+
<fa:svg-icon name="chevron-right" />
24+
<span class="visually-hidden">Next</span>
25+
</button>
26+
</div>
27+
28+
</j:jelly>

src/main/webapp/css/jenkins-style.css

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,12 @@ pre {
3131
}
3232

3333
/* ------------------------------------------------------------------------------------------------------------------- */
34-
/* Bootstrap Carousel */
34+
/* Bootstrap carousel */
3535
/* ------------------------------------------------------------------------------------------------------------------- */
3636

37-
.carousel-control-prev {
38-
width: 20px;
39-
}
40-
41-
.carousel-control-next {
42-
width: 20px;
37+
.carousel-control-prev, .carousel-control-next {
38+
width: 15px;
39+
fill: var(--text-color);
4340
}
4441

4542
/* ------------------------------------------------------------------------------------------------------------------- */

0 commit comments

Comments
 (0)