Skip to content

Commit f43a052

Browse files
committed
refactor: use jenkins cards over bootstrap cards
Signed-off-by: Lewis Birks <22620804+lewisbirks@users.noreply.github.com>
1 parent 58c4929 commit f43a052

2 files changed

Lines changed: 62 additions & 30 deletions

File tree

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,43 @@
11
<?jelly escape-by-default='true'?>
2-
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:bs="/bootstrap5">
2+
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout">
33

44
<st:header name="Content-Type" value="text/html;charset=UTF-8"/>
55

6-
<bs:page it="${it}">
6+
<l:layout title="${it.displayName}" norefresh="true" nogrid="true">
7+
<st:include it="${it.owner}" page="sidepanel.jelly"/>
78

8-
<j:if test="${size(it.errorMessages) > 0}">
9-
<div class="row py-3">
10-
<div class="col">
9+
<l:main-panel>
1110

12-
<bs:card title="${%Error Messages}" fontAwesomeIcon="triangle-exclamation">
13-
<pre>
14-
<samp id="errors" class="log-output">
11+
<st:adjunct includes="io.jenkins.plugins.bootstrap5"/>
12+
<l:app-bar title="${title}"/>
13+
14+
<div class="${class}">
15+
<j:if test="${size(it.errorMessages) > 0}">
16+
<l:card title="${%Error Messages}">
17+
<div class="bs5-console-output">
18+
<pre id="errors">
1519
<j:forEach var="message" items="${it.errorMessages}">
1620
<div>
1721
${message}
1822
</div>
1923
</j:forEach>
20-
</samp>
21-
</pre>
22-
</bs:card>
23-
</div>
24-
</div>
25-
</j:if>
26-
27-
<div class="row py-3">
28-
<div class="col">
29-
30-
<bs:card title="${%Information Messages}" fontAwesomeIcon="circle-info">
31-
32-
<pre>
33-
<samp id="info" class="log-output">
24+
</pre>
25+
</div>
26+
</l:card>
27+
</j:if>
28+
29+
<l:card title="${%Information Messages}">
30+
<div class="bs5-console-output">
31+
<pre id="info">
3432
<j:forEach var="message" items="${it.infoMessages}">
3533
<div>
3634
${message}
3735
</div>
3836
</j:forEach>
39-
</samp>
40-
</pre>
41-
</bs:card>
42-
37+
</pre>
38+
</div>
39+
</l:card>
4340
</div>
44-
</div>
45-
46-
</bs:page>
47-
41+
</l:main-panel>
42+
</l:layout>
4843
</j:jelly>

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

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,40 @@ pre {
155155
backdrop-filter: contrast(0.6) brightness(2.4) saturate(2) blur(15px);
156156
box-shadow: 0 0 8px 2px rgba(0,0,30,.05), 0 0 1px 1px rgba(0,0,20,.025), 0 10px 20px rgba(0,0,20,.15);
157157
}
158+
159+
/* ------------------------------------------------------------------------------------------------------------------- */
160+
/* Console output */
161+
/* ------------------------------------------------------------------------------------------------------------------- */
162+
163+
.bs5-console-output {
164+
overflow-y: auto;
165+
margin: 0 -1rem -1rem;
166+
padding: 0 1rem 1rem;
167+
168+
pre {
169+
background: transparent;
170+
border: none;
171+
margin: 0;
172+
padding: 0;
173+
line-height: 1.75;
174+
font-size: var(--font-size-sm);
175+
overflow-wrap: break-word;
176+
177+
a {
178+
overflow-wrap: break-word;
179+
}
180+
}
181+
}
182+
183+
@media (width >= 1000px) {
184+
.jenkins-card__content .bs5-console-output {
185+
height: 300px;
186+
}
187+
}
188+
189+
@media (width < 1000px) {
190+
.jenkins-card__content .bs5-console-output {
191+
max-height: 300px;
192+
}
193+
}
194+

0 commit comments

Comments
 (0)