Skip to content

Commit

Permalink
Push
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Feb 8, 2025
1 parent a2f855a commit 16f2b22
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 45 deletions.
28 changes: 15 additions & 13 deletions core/src/main/resources/lib/layout/app-bar.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ THE SOFTWARE.
-->

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:x="jelly:xml" xmlns:l="/lib/layout">
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:x="jelly:xml">
<st:documentation>
<st:attribute name="title" use="required">
The title for the application bar
Expand All @@ -37,17 +37,19 @@ THE SOFTWARE.
Generates a row containing the page title and an optional set of controls
</st:documentation>

<div class="jenkins-app-bar">
<div class="jenkins-app-bar__content">
<x:element name="${headingLevel ?: 'h1'}">
${title}
<j:if test="${attrs.subtitle != null}">
<span class="jenkins-app-bar__subtitle">${attrs.subtitle}</span>
</j:if>
</x:element>
<j:if test="${mode=='main-panel' or mode=='side-panel'}">
<div class="jenkins-app-bar">
<div class="jenkins-app-bar__content">
<x:element name="${headingLevel ?: 'h1'}">
${title}
<j:if test="${attrs.subtitle != null}">
<span class="jenkins-app-bar__subtitle">${attrs.subtitle}</span>
</j:if>
</x:element>
</div>
<div class="jenkins-app-bar__controls">
<d:invokeBody/>
</div>
</div>
<div class="jenkins-app-bar__controls">
<d:invokeBody/>
</div>
</div>
</j:if>
</j:jelly>
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/layout/main-panel.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ THE SOFTWARE.
<a id="skip2content" />
<button id="opencloseting" class="jenkins-button jenkins-button--tertiary">
<l:icon src="symbol-sidebar" />
${%Menu}
${%Menu}2
</button>
<x:comment>&#10;start of main content ⇒&#10;</x:comment>
<d:invokeBody />
Expand Down
28 changes: 13 additions & 15 deletions src/main/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import Tooltips from "@/components/tooltips";
import StopButtonLink from "@/components/stop-button-link";
import ConfirmationLink from "@/components/confirmation-link";
import Dialogs from "@/components/dialogs";
import Utils from "@/components/dropdowns/utils";
import Path from "@/util/path";
import { createElementFromHtml } from "@/util/dom";

Dropdowns.init();
CommandPalette.init();
Expand All @@ -16,21 +19,16 @@ StopButtonLink.init();
ConfirmationLink.init();
Dialogs.init();

const closer = document.querySelector("#closer")
const sidepanel = document.querySelector("#side-panel")
const thing = document.querySelector("#main-panel #opencloseting");
const sidepanel = document.querySelector("#side-panel #tasks")
const thing2 = document.querySelector("#main-panel #opencloseting");

if (!sidepanel) {
closer.remove();
thing.remove();
} else {
thing.addEventListener("click", () => {
closer.classList.toggle("opennn");
sidepanel.classList.toggle("opennn");
})

closer.addEventListener("click", () => {
closer.classList.toggle("opennn");
sidepanel.classList.toggle("opennn");
})
thing2.remove();
thing2.remove();
}

Utils.generateDropdown(thing2, (instance) => {
const parent = createElementFromHtml(`<div class="jenkins-dropdown testtest"></div>`)
parent.append(sidepanel.cloneNode(true))
instance.setContent(parent);
})
16 changes: 0 additions & 16 deletions src/main/scss/base/_layout-commons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,6 @@
flex-direction: column;
gap: 0;

#opencloseting {
display: flex;
margin: -0.5rem 0 0 -0.9rem;

svg {
width: 1.5rem;
height: 1.5rem;
}
}

&__side-panel {
position: fixed;

Expand Down Expand Up @@ -135,12 +125,6 @@
display: none;
}
}

@starting-style { /* <-- and this line */
.app-page-body__side-panel.opennn {
translate: 0 100%;
}
}
}
}

Expand Down
12 changes: 12 additions & 0 deletions src/main/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,15 @@
@use "components";
@use "form";
@use "pages";

.testtest {
min-width: 240px;

#tasks, .task {
display: contents;
}

.jenkins-search-container {
display: none;
}
}

0 comments on commit 16f2b22

Please sign in to comment.