Skip to content

Commit

Permalink
Update content and spacing, add link to get more themes (#152)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Jacomb <timjacomb1@gmail.com>
  • Loading branch information
janfaracik and timja authored Dec 1, 2022
1 parent e9cb22d commit 08eae65
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You can configure this plugin globally, or each user can configure it in their c

### Global

Manage Jenkins → Configure System → Built-in Themes
Manage Jenkins → Configure System → Themes

![Global configuration](docs/images/global-theme-manager.png)

Expand All @@ -40,7 +40,7 @@ You can stop users from being able to change their theme by selecting the

### User

'Your name' profile link (in top right) → Configure → Built-in Themes
'Your name' profile link (in top right) → Configure → Themes

### Configuration as Code example

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public boolean isEnabled() {
@NonNull
@Override
public String getDisplayName() {
return "Built-in Themes";
return "Themes";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** Dummy javadoc comment till 11.0.18 is released https://bugs.openjdk.org/browse/JDK-8297889 */
@DefaultAnnotationForParameters(NonNull.class)
package io.jenkins.plugins.thememanager;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:st="jelly:stapler" xmlns:th="/lib/theme-manager">
<f:section title="${%Built-in Themes}">
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:l="/lib/layout" xmlns:th="/lib/theme-manager">
<f:section title="${%Themes}">
<a class="tm-link" href="${rootURL}/manage/pluginManager/available?filter=UI Themes">
<j:set var="icon">
<l:icon src="symbol-plugins" />
</j:set>
<j:out value="${%plugin-link(icon)}" />
</a>

<th:selector />

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
plugin-link=You can get more themes at {0} Plugins

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
grid-gap: 2rem;
margin-bottom: 2rem;
margin-bottom: 1rem;
}

.app-theme-picker__item {
Expand Down Expand Up @@ -130,3 +130,20 @@
.app-theme-picker__item label:hover::before {
border-color: var(--input-border-hover);
}

.tm-link {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.4ch;
float: right;
}

.tm-link svg {
width: 1rem;
height: 1rem;
}

.tm-link svg * {
stroke-width: 45px;
}
6 changes: 3 additions & 3 deletions src/main/resources/lib/theme-manager/selector.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

<st:adjunct includes="lib.form.radioBlock.radioBlock"/>

<f:entry title="${%Theme}" field="theme">
<f:entry title="${%Select theme}" field="theme">
<div class="app-theme-picker">
<j:set var="currentInstance" value="${instance['theme']}" />
<j:set var="currentDescriptor" value="${currentInstance.descriptor}" />
<j:set var="uniqueId" value="${h.generateId()}" />

<j:forEach var="theme" items="${descriptors}" varStatus="loop">
<div class="radioBlock-container">
<div class="jenkins-!-display-contents">
<!-- this ID marks the beginning -->
<div class="tr help-sibling radio-block-start row-group-start row-set-start" hasHelp="false">
<div class="app-theme-picker__item">
Expand Down Expand Up @@ -49,4 +49,4 @@
</j:forEach>
</div>
</f:entry>
</j:jelly>
</j:jelly>

0 comments on commit 08eae65

Please sign in to comment.