Skip to content

Commit

Permalink
Merge branch 'dashboard-app-bar-new' into ui-vertical-slice-5
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Aug 11, 2023
2 parents 0ea3a01 + 4506c7d commit 991104e
Show file tree
Hide file tree
Showing 3 changed files with 158 additions and 0 deletions.
76 changes: 76 additions & 0 deletions core/src/main/resources/hudson/model/View/index.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,82 @@ THE SOFTWARE.
<st:include page="sidepanel.jelly" />
<!-- no need for additional breadcrumb here as we're on an index page already including breadcrumb -->
<l:main-panel>
<j:if test="${(it.class.name=='hudson.model.AllView' and it.ownerItemGroup == app)}">
<div class="rotating-title"><p>Afternoon Jan</p><p>Jenkins</p></div>
</j:if>
<div class="jenkins-app-bar">
<div class="jenkins-app-bar__content">
<h1 class="testheading">
<j:set var="iconClass" value="${it.owner.iconColor.getIconClassName()}" />
<j:if test="${iconClass != null}">
<l:icon src="${iconClass}" />
</j:if>
${(it.class.name=='hudson.model.AllView' and it.ownerItemGroup == app) ? '%Dashboard' : it.owner.displayName}
</h1>
</div>
<div class="jenkins-app-bar__controls">
<st:include page="tasks-new.jelly" it="${it.owner}" optional="true">
<!-- made overridable for ViewGroup that doesn't allow modifications -->
<a class="jenkins-button" href="${rootURL}/${it.viewUrl}newJob">
<l:icon src="symbol-add" />
${%New project}
</a>
</st:include>
<j:if test="${it.isEditable()}">
<!-- /configure URL on Jenkins object is overloaded with Jenkins's system config, so always use the explicit name. -->
<a class="jenkins-button" href="${rootURL}/${it.viewUrl}configure">
${%Configure}
</a>
</j:if>
<l:overflowButton>
<a href="${it.class.name=='hudson.model.AllView' ? rootURL + '/asynchPeople/' : rootURL + '/' + it.viewUrl + 'asynchPeople/' }"
class="jenkins-dropdown__item">
<div class="jenkins-dropdown__item__icon">
<l:icon src="symbol-people" />
</div>
${%People}
</a>
<a href="${rootURL}/${it.viewUrl}builds"
class="jenkins-dropdown__item">
<div class="jenkins-dropdown__item__icon">
<l:icon src="symbol-build-history" />
</div>
${%Build history}
</a>
<div class="jenkins-dropdown__separator" />
<j:if test="${app.fingerprintMap.ready}">
<a href="${rootURL}/projectRelationship"
class="jenkins-dropdown__item">
<div class="jenkins-dropdown__item__icon">
<l:icon src="symbol-project-relationship" />
</div>
${%Project Relationship}
</a>
<a href="${rootURL}/fingerprintCheck"
class="jenkins-dropdown__item">
<div class="jenkins-dropdown__item__icon">
<l:icon src="symbol-fingerprint" />
</div>
${%Check File Fingerprint}
</a>
</j:if>
<div class="jenkins-dropdown__separator" />
<j:if test="${it.owner.canDelete(it)}">
<l:confirmationLink class="jenkins-dropdown__item jenkins-!-destructive-color"
href="doDelete"
message="${%delete.view(it.displayName)}"
permission="${it.DELETE}"
post="true">
<div class="jenkins-dropdown__item__icon">
<l:icon src="symbol-trash" />
</div>
${%Delete view}
</l:confirmationLink>
</j:if>
</l:overflowButton>
</div>
</div>

<st:include page="view-index-top.jelly" it="${it.owner}" optional="true">
<!-- allow the owner to take over the top section, but we also need the default to be backward compatible -->
<div id="view-message">
Expand Down
7 changes: 7 additions & 0 deletions war/src/main/scss/modules/dropdowns.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ $dropdown-padding: 0.4rem;
background-color: var(--text-color-secondary);
opacity: 0.1;
}

// Hide the separator if the next element is also a selector,
// or if the selector is the last child in its parent
&:has(+ .jenkins-dropdown__separator),
&:last-child {
display: none;
}
}

&__heading {
Expand Down
75 changes: 75 additions & 0 deletions war/src/main/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ $icon-size: 1.375rem;
border-radius: 2px;
}
}

.hours {
rotate: var(--hours);

Expand All @@ -220,6 +221,39 @@ $icon-size: 1.375rem;
}
}

.rotating-title {
position: relative;
height: 0.95rem;
margin: -1.05rem 0 0.4rem 0;

p {
position: absolute;
top: 0;
left: 0;
right: 0;
font-weight: 600;
font-size: 0.95rem;
user-select: none;
pointer-events: none;
color: var(--text-color-secondary);
width: 100%;
white-space: nowrap;
margin: 0;

&:first-of-type {
animation: rotate-title-1 0.3s both 4s;
}

&:last-of-type {
font-family: "Georgia", serif;
font-weight: 600;
font-size: 1rem;
letter-spacing: unset !important;
animation: rotate-title-2 0.4s both 4.2s;
}
}
}

.populism {
display: flex;
align-items: center;
Expand Down Expand Up @@ -254,3 +288,44 @@ $icon-size: 1.375rem;
text-decoration-thickness: 2px;
}
}

@keyframes rotate-title-1 {
to {
transform: translateY(-0.3rem);
opacity: 0;
filter: blur(1px);
}
}

@keyframes rotate-title-2 {
0% {
transform: translateY(0.3rem);
opacity: 0;
filter: blur(1px);
}

85% {
transform: translateY(-0.05rem);
opacity: 1;
filter: blur(0);
}

100% {
transform: translateY(0);
}
}

.testheading {
display: flex;
align-items: center;
justify-content: start;
gap: 1rem;
font-size: 1.5rem !important;
font-weight: 650 !important;

img, svg {
width: 2rem;
height: 2rem;
margin-block: -10px;
}
}

0 comments on commit 991104e

Please sign in to comment.