Skip to content

Commit

Permalink
Move help link to left, restyle it, decrease spacing between componen…
Browse files Browse the repository at this point in the history
…ts, shrink header a touch
  • Loading branch information
janfaracik committed Oct 22, 2021
1 parent 5032586 commit dc4a6ed
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 19 deletions.
9 changes: 3 additions & 6 deletions core/src/main/resources/lib/form/helpLink.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,9 @@ THE SOFTWARE.
<j:choose>
<j:when test="${attrs.url!=null}">
<j:set var="altText" value="${attrs.featureName != null ? '%Help for feature:' + ' ' + attrs.featureName : '%[Help]'}" />
<span class="setting-help">
<a href="#" class="help-button" helpURL="${rootURL}${attrs.url}"><l:helpIcon class="icon-help" tooltip="${altText}"/></a>
</span>
<a href="#" class="help-button" helpURL="${rootURL}${attrs.url}">
?
</a>
</j:when>
<j:otherwise>
<span class="setting-no-help"></span>
</j:otherwise>
</j:choose>
</j:jelly>
58 changes: 56 additions & 2 deletions war/src/main/less/base/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -654,11 +654,65 @@ label.attach-previous {
}

.help-button {
margin-left: 2px;
margin-right: 2ch;
position: relative;
width: 18px;
height: 18px;
margin-left: 1ch;
display: inline-flex;
justify-content: center;
align-items: center;
color: var(--text-color)!important;
line-height: 18px;
border-radius: 100%;

&::before {
content: "?";
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: var(--text-color);
opacity: 0.1;
border-radius: inherit;
transition: 0.2s ease;
}

&::after {
content: "";
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
box-shadow: 0 0 0 10px transparent;
border-radius: inherit;
opacity: 0.1;
transition: 0.2s ease;
}

&:hover {
text-decoration: none;

&::before {
opacity: 0.2;
}
}

&:active {
&::before {
opacity: 0.3;
}

&::after {
box-shadow: 0 0 0 5px var(--text-color);
}
}

&:active, &:focus {
outline: none;
text-decoration: none;
}
}

.setting-help .help-button {
Expand Down
11 changes: 5 additions & 6 deletions war/src/main/less/modules/app-bar.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
align-items: center;
justify-content: space-between;
margin-bottom: 2rem;
padding-bottom: 2rem;
border-bottom: 2px solid var(--panel-border-color);

.jenkins-app-bar__content {
display: flex;
Expand All @@ -20,13 +18,14 @@
margin-left: 2rem;
}

&--no-border {
border-bottom: none;
margin-bottom: 0;
&--border {
margin-bottom: 2rem;
padding-bottom: 2rem;
border-bottom: 2px solid var(--panel-border-color);
}

h1 {
margin: 0;
font-size: 1.8rem;
font-size: 1.7rem;
}
}
18 changes: 13 additions & 5 deletions war/src/main/less/modules/form.less
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
.jenkins-form {
max-width: 80ch;
}

.jenkins-form-item {
margin-bottom: 2rem;
max-width: 600px;
margin-bottom: 1.75rem;

&--small {
max-width: 300px;
}

&--medium {
max-width: 450px;
}
}

.jenkins-fieldset {
Expand All @@ -17,7 +25,8 @@
}

.jenkins-form-label {
display: block;
display: flex;
align-items: center;
font-weight: bold;
margin-top: 0;
margin-bottom: 0.75rem;
Expand All @@ -38,7 +47,7 @@
border: 2px solid var(--input-border);
padding: 8px;
border-radius: 6px;
width: 350px;
width: 100%;
box-shadow: 0 0 0 10px transparent;
transition: 0.2s ease;

Expand Down Expand Up @@ -170,7 +179,6 @@
}

.jenkins-radio {
max-width: 60ch;
margin-top: 2px;

&:not(:last-of-type) {
Expand Down

0 comments on commit dc4a6ed

Please sign in to comment.