diff --git a/src/main/js/app.js b/src/main/js/app.js
index c59153608751..4428b0ee5a56 100644
--- a/src/main/js/app.js
+++ b/src/main/js/app.js
@@ -2,6 +2,7 @@ import Dropdowns from "@/components/dropdowns";
import CommandPalette from "@/components/command-palette";
import Notifications from "@/components/notifications";
import SearchBar from "@/components/search-bar";
+import Header from "@/components/header";
import Tooltips from "@/components/tooltips";
import StopButtonLink from "@/components/stop-button-link";
import ConfirmationLink from "@/components/confirmation-link";
@@ -11,6 +12,7 @@ Dropdowns.init();
CommandPalette.init();
Notifications.init();
SearchBar.init();
+Header.init();
Tooltips.init();
StopButtonLink.init();
ConfirmationLink.init();
diff --git a/src/main/js/components/header/index.js b/src/main/js/components/header/index.js
new file mode 100644
index 000000000000..ea79a6e2cfb7
--- /dev/null
+++ b/src/main/js/components/header/index.js
@@ -0,0 +1,10 @@
+function init() {
+ window.addEventListener("scroll", () => {
+ const navigation = document.querySelector("#page-header");
+ navigation.style.setProperty("--background-opacity", Math.min(70, window.scrollY) + "%");
+ navigation.style.setProperty("--background-blur", Math.min(40, window.scrollY) + "px");
+ navigation.style.setProperty("--border-opacity", Math.min(10, window.scrollY) + "%");
+ });
+}
+
+export default { init };
diff --git a/src/main/scss/components/_breadcrumbs.scss b/src/main/scss/components/_breadcrumbs.scss
index f50677846430..caaf51140f17 100644
--- a/src/main/scss/components/_breadcrumbs.scss
+++ b/src/main/scss/components/_breadcrumbs.scss
@@ -1,15 +1,10 @@
@use "../abstracts/mixins";
.jenkins-breadcrumbs {
- position: sticky;
- top: 0;
- z-index: 999;
display: flex;
align-items: center;
- padding: 0.55rem 0.7rem 0.55rem 0.75rem;
- backdrop-filter: blur(15px);
+ gap: 0.625rem;
overflow-x: auto;
- background: var(--breadcrumbs-bar-background);
&__list {
display: contents;
@@ -24,47 +19,36 @@
display: inline-flex;
align-items: center;
justify-content: center;
- color: var(--text-color);
font-weight: 500;
- font-size: 0.875rem;
- padding: 0.2rem 0.4rem;
+ font-size: 14px;
+ padding: 0;
- & > a {
- @include mixins.item;
+ &:first-of-type {
+ font-family: "Georgia";
+ font-weight: 600;
+ font-size: 1.125rem;
+ }
+ & > a {
display: inline-flex;
align-items: center;
justify-content: center;
+ gap: 1rem;
font-weight: inherit;
font-size: inherit;
margin: 0;
padding: 0;
- color: var(--text-color);
+ color: inherit;
text-decoration: none;
margin-right: 0 !important;
- transition: var(--standard-transition);
-
- &::before,
- &::after {
- inset: -0.25rem -0.6rem;
- }
-
- &:hover,
- &:active,
- &:focus,
- &:focus-visible {
- color: var(--text-color);
- }
- }
+ transition: opacity var(--standard-transition);
- & > .model-link {
- @media (hover: none) {
- margin-right: 30px !important;
+ &:hover {
+ opacity: 0.75;
}
- &:hover,
- &--open {
- margin-right: 30px !important;
+ &:active {
+ opacity: 0.5;
}
}
}
@@ -74,8 +58,7 @@
.separator {
position: relative;
width: 1rem;
- height: 1rem;
- margin: 0.375rem 0.2rem;
+ height: 1.25rem;
&::after {
content: "";
@@ -83,51 +66,20 @@
inset: 0;
transition: var(--standard-transition);
background: var(--text-color-secondary);
- mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'%3E%3Ctitle%3EChevron Forward%3C/title%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M184 112l144 144-144 144'/%3E%3C/svg%3E");
- opacity: 0.6;
+ mask-size: contain;
+ mask-position: center;
+ mask-repeat: no-repeat;
+ mask-image: url("data:image/svg+xml,%3Csvg width='10' height='20' viewBox='0 0 10 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 18L8 2' stroke='black' stroke-width='1.5px' stroke-linecap='round'/%3E%3C/svg%3E%0A");
+ opacity: 0.2;
+ scale: 1.1;
}
}
- .separator {
+ .separator, .children {
&:last-of-type {
display: none;
}
}
-
- .children {
- cursor: pointer;
-
- &:hover {
- &::after {
- opacity: 1;
- transform: rotate(90deg);
- }
- }
-
- &:active {
- &::after {
- transform: translateY(2px) rotate(90deg);
- opacity: 0.5;
- }
- }
-
- &:hover,
- &:active,
- &:focus,
- &:focus-visible {
- &::after {
- background: var(--text-color);
- }
- }
-
- // Increase the hit target
- &::before {
- content: "";
- position: absolute;
- inset: -14px -5px;
- background: transparent;
- }
- }
}
}
@@ -311,30 +263,3 @@
}
}
}
-
-// TODO: Remove when YUI dropdowns are removed
-
-#breadcrumb-menu .header {
- font-weight: bold;
- font-size: 0.875rem;
- pointer-events: none;
-}
-
-#breadcrumb-menu .separator {
- position: relative;
- display: block !important;
- color: transparent;
- overflow: hidden;
- width: 100%;
-
- &::after {
- content: "";
- position: absolute;
- top: 9px;
- left: -50vw;
- right: -50vw;
- background: var(--text-color);
- height: 2px;
- opacity: 0.1;
- }
-}
diff --git a/src/main/scss/components/_page-header.scss b/src/main/scss/components/_page-header.scss
index 76c7fc9028e4..34cbaff5cdd2 100644
--- a/src/main/scss/components/_page-header.scss
+++ b/src/main/scss/components/_page-header.scss
@@ -1,207 +1,55 @@
@use "../abstracts/mixins";
.page-header {
+ --background-opacity: 0%;
+ --background-blur: 0;
+ --border-opacity: 0%;
+ position: sticky;
+ top: 0;
+ z-index: 20;
display: flex;
align-items: center;
- height: 3.5rem;
+ justify-content: space-between;
font-size: var(--font-size-base);
line-height: var(--line-height-base);
- background-color: var(--header-bg-classic);
-}
-
-.page-header > * {
- margin-right: 0.75rem;
-}
-
-.page-header__brand {
- display: inline-block;
- height: 3.5rem;
- position: relative;
- flex: 1; // push controls to the end of the block
-}
-
-// Need to use the element selector to increase weight otherwise it will be overriden by the
-// a:visited selector if it is declared later
-// Only styled by the overrides with the new UI enabled
-a.page-header__brand-link {
- display: none;
-}
-
-.page-header__brand-name {
- color: inherit;
-}
-
-.page-header__brand-image {
- height: 2rem;
- width: 1.5rem;
- margin-right: 0.75rem;
-}
-
-.page-header__am-wrapper {
- display: contents;
-}
-
-.page-header__hyperlinks {
- display: flex;
- align-items: center;
-}
-
-.page-header__hyperlinks > a,
-.page-header__hyperlinks > button,
-.am-container > a {
- @include mixins.item;
-
- --text-color: var(--header-link-color);
-
- display: inline-flex;
- align-items: center;
- appearance: none;
- background: transparent;
- outline: none;
- border: none;
- cursor: pointer;
- color: var(--text-color);
- text-decoration: none;
- padding: 0.5rem;
- margin-right: 0 !important;
-
- svg {
- width: 1.25rem;
- height: 1.25rem;
- }
-
- &::before,
- &::after {
- inset: 0 !important;
- }
-
- .jenkins-menu-dropdown-chevron {
- position: relative;
- top: unset !important;
- right: unset !important;
- margin-left: 0.5rem;
-
- &::after {
- opacity: 1;
+ margin-bottom: calc(var(--section-padding) * -1);
+ padding: calc(var(--section-padding) / 1.65) var(--section-padding);
+
+ &::before {
+ content: "";
+ position: absolute;
+ inset: 0;
+ backdrop-filter: blur(var(--background-blur));
+ background: color-mix(in srgb, var(--background) var(--background-opacity), transparent);
+ border-bottom: 1.5px solid color-mix(in srgb, var(--text-color-secondary) var(--border-opacity), transparent);
+ z-index: -1;
+ background-clip: padding-box;
+ }
+
+ #jenkins-head-icon {
+ height: 2rem;
+ margin-left: 0.15rem;
+ }
+
+ .page-header__actions {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 0.5rem;
+
+ .jenkins-button {
+ min-width: 2.375rem;
+ padding: 0.5rem;
+
+ svg {
+ width: 1.25rem;
+ height: 1.25rem;
+ }
}
}
-}
-
-.page-header__hyperlinks a span {
- &:not(:first-child) {
- margin-left: 0.25rem;
- }
-}
-
-/* Search box */
-
-// Style it through the id selector to override the YUI selectors set by
-// the YUI Autocomplete module
-#searchform {
- position: relative;
- font-family: var(--font-family-sans);
- display: inline-flex;
- height: 2.5rem;
-}
-
-// Need to add the id selector to override the ".yui-skin-sam .yui-ac-input" set by
-// the YUI Autocomplete module
-#search-box.main-search__input {
- position: static;
- padding: 0.25rem 2.5rem;
- margin: 0;
- font-size: var(--font-size-base);
- line-height: var(--line-height-base);
- font-weight: bold;
- color: var(--search-input-color);
- border-radius: var(--form-input-border-radius);
- border: 2px solid var(--header-search-border);
- outline: none;
- box-shadow: 0 0 0 10px transparent;
- transition: 0.2s ease;
-
- &::placeholder {
- font-weight: normal;
- }
-
- &:active,
- &:focus {
- border-color: var(--focus-input-border);
- box-shadow: 0 0 0 5px var(--focus-input-glow);
- }
-}
-
-.main-search__icon-leading,
-.main-search__icon-trailing {
- position: absolute;
- display: inline-flex;
- height: 2.5rem;
- width: 2.5rem;
- justify-content: center;
- align-items: center;
- background: transparent;
-}
-
-.main-search__icon-leading {
- left: 0;
- pointer-events: none;
-
- svg {
- width: 16px;
- height: 16px;
- }
-}
-
-.main-search__icon-trailing {
- right: 0;
- outline-color: var(--header-link-outline);
- &:link,
- &:visited {
- color: var(--search-input-color);
+ // TODO - Might not need this
+ .page-header__am-wrapper, .page-header__hyperlinks {
+ display: contents;
}
-
- &:hover,
- &:focus {
- color: var(--header-link-bg-classic-hover);
- }
-
- &:active {
- fill: var(--header-link-bg-classic-active);
- }
-
- svg {
- width: 20px;
- height: 20px;
- }
-}
-
-#search-box-completion {
- text-align: left;
- width: 25em;
- position: absolute;
- z-index: 1000;
-}
-
-#search-box-completion ul {
- padding: 0.75rem 0;
- width: 100%;
- margin: 0;
- list-style: none;
-}
-
-#search-box-completion li {
- white-space: nowrap;
- padding: 0.25rem 1.25rem;
- font-size: var(--font-size-base);
- line-height: var(--line-height-base);
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-#search-box-sizer {
- position: absolute;
- visibility: hidden;
- min-width: 15rem;
- max-width: calc(100vw - 500px);
}
From c9c8669d63fd66ab31258d03594d25c4732e31e1 Mon Sep 17 00:00:00 2001
From: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date: Thu, 16 Jan 2025 10:41:21 +0000
Subject: [PATCH 02/96] Push
---
src/main/js/components/header/index.js | 4 +++-
src/main/scss/components/_app-bar.scss | 4 ++--
src/main/scss/components/_page-header.scss | 1 +
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/main/js/components/header/index.js b/src/main/js/components/header/index.js
index ea79a6e2cfb7..dac6014af7a4 100644
--- a/src/main/js/components/header/index.js
+++ b/src/main/js/components/header/index.js
@@ -3,7 +3,9 @@ function init() {
const navigation = document.querySelector("#page-header");
navigation.style.setProperty("--background-opacity", Math.min(70, window.scrollY) + "%");
navigation.style.setProperty("--background-blur", Math.min(40, window.scrollY) + "px");
- navigation.style.setProperty("--border-opacity", Math.min(10, window.scrollY) + "%");
+ if (!document.querySelector(".jenkins-search--app-bar")) {
+ navigation.style.setProperty("--border-opacity", Math.min(10, window.scrollY) + "%");
+ }
});
}
diff --git a/src/main/scss/components/_app-bar.scss b/src/main/scss/components/_app-bar.scss
index bce8aa213a41..b944ddb1535c 100644
--- a/src/main/scss/components/_app-bar.scss
+++ b/src/main/scss/components/_app-bar.scss
@@ -51,10 +51,10 @@
&--sticky {
position: sticky;
- top: 40px;
+ top: 45px;
padding-top: var(--section-padding);
margin-top: calc(var(--section-padding) * -1);
- z-index: 2;
+ z-index: 21;
&::before,
&::after {
diff --git a/src/main/scss/components/_page-header.scss b/src/main/scss/components/_page-header.scss
index 34cbaff5cdd2..0cd706d226aa 100644
--- a/src/main/scss/components/_page-header.scss
+++ b/src/main/scss/components/_page-header.scss
@@ -14,6 +14,7 @@
line-height: var(--line-height-base);
margin-bottom: calc(var(--section-padding) * -1);
padding: calc(var(--section-padding) / 1.65) var(--section-padding);
+ min-height: 70px;
&::before {
content: "";
From 82b85a2234564536194cfa4fccaf7af52517fff0 Mon Sep 17 00:00:00 2001
From: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date: Thu, 16 Jan 2025 10:58:29 +0000
Subject: [PATCH 03/96] More responsive
---
.../views/JenkinsHeader/headerContent.jelly | 24 ++++++++++++++++++-
.../resources/lib/layout/header/login.jelly | 8 -------
.../images/symbols/person-circle.svg | 6 ++++-
3 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/core/src/main/resources/jenkins/views/JenkinsHeader/headerContent.jelly b/core/src/main/resources/jenkins/views/JenkinsHeader/headerContent.jelly
index f7a2974500bc..122f1d5eb1c1 100644
--- a/core/src/main/resources/jenkins/views/JenkinsHeader/headerContent.jelly
+++ b/core/src/main/resources/jenkins/views/JenkinsHeader/headerContent.jelly
@@ -1,9 +1,31 @@
-
+
diff --git a/core/src/main/resources/lib/layout/header/login.jelly b/core/src/main/resources/lib/layout/header/login.jelly
index cdea47232ad3..be378dafcb5b 100644
--- a/core/src/main/resources/lib/layout/header/login.jelly
+++ b/core/src/main/resources/lib/layout/header/login.jelly
@@ -1,13 +1,5 @@
-
-
-
-
-
-
-
-
diff --git a/war/src/main/resources/images/symbols/person-circle.svg b/war/src/main/resources/images/symbols/person-circle.svg
index 7f79912a0c15..35773df54f77 100644
--- a/war/src/main/resources/images/symbols/person-circle.svg
+++ b/war/src/main/resources/images/symbols/person-circle.svg
@@ -1 +1,5 @@
-Person Circle
\ No newline at end of file
+
+
+
+
+
From 3d08ab850a2d012895cdfe96941f7edde9e7d1f6 Mon Sep 17 00:00:00 2001
From: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Date: Thu, 16 Jan 2025 11:04:18 +0000
Subject: [PATCH 04/96] Update headerContent.jelly
---
.../jenkins/views/JenkinsHeader/headerContent.jelly | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/core/src/main/resources/jenkins/views/JenkinsHeader/headerContent.jelly b/core/src/main/resources/jenkins/views/JenkinsHeader/headerContent.jelly
index 122f1d5eb1c1..5697d353b218 100644
--- a/core/src/main/resources/jenkins/views/JenkinsHeader/headerContent.jelly
+++ b/core/src/main/resources/jenkins/views/JenkinsHeader/headerContent.jelly
@@ -1,7 +1,10 @@
-
+