Skip to content

Commit adc1dcc

Browse files
committed
Render card icons with new symbol style of Jenkins.
1 parent 69e771f commit adc1dcc

File tree

2 files changed

+24
-11
lines changed

2 files changed

+24
-11
lines changed

src/main/resources/bootstrap5/card.jelly

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,15 @@
3535
<div class="card-title">
3636
${title}
3737

38-
<j:if test="${pngIcon!=null}">
39-
<img src="${pngIcon}" class="icon-right"/>
40-
</j:if>
41-
<j:if test="${fontAwesomeIcon!=null}">
42-
<fa:svg-icon name="${fontAwesomeIcon}" prefix="${fontAwesomeStyle != null ? fontAwesomeStyle : 'solid'}" class="icon-right"/>
43-
</j:if>
38+
<span class="icon-border">
39+
<j:if test="${pngIcon!=null}">
40+
<img src="${pngIcon}" class="icon-right"/>
41+
</j:if>
42+
<j:if test="${fontAwesomeIcon!=null}">
43+
<fa:svg-icon name="${fontAwesomeIcon}" prefix="${fontAwesomeStyle != null ? fontAwesomeStyle : 'solid'}"
44+
class="icon-right"/>
45+
</j:if>
46+
</span>
4447

4548
</div>
4649
<d:invokeBody/>

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

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,24 @@ pre {
5757
margin-bottom: 1.5rem;
5858
}
5959

60-
.icon-right {
60+
.icon-right {
61+
fill: currentColor;
62+
height: 24px;
63+
width: 24px;
64+
position: relative;
65+
margin: auto;
66+
}
67+
68+
.icon-border {
6169
float: right;
62-
fill: var(--fa-image-color);
70+
background: var(--item-background--active);
71+
border-radius: 100%;
6372
height: 48px;
6473
width: 48px;
65-
position: absolute;
66-
right: 25px;
67-
top: 10px;
74+
content: "";
75+
pointer-events: none;
76+
position: relative;
77+
display: flex;
6878
}
6979

7080
.tooltip-inner {

0 commit comments

Comments
 (0)