Skip to content

Commit

Permalink
Add prism configuration (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
timja authored Jun 1, 2022
1 parent 1b22573 commit 276b5a8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>theme-manager</artifactId>
<version>1.2</version>
<version>1.3</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class DarkThemeManagerFactory extends ThemeManagerFactory {

public static final String THEME_CSS = "theme.css";
public static final String THEME_URL_NAME = "theme-dark";
public static final String PRISM_THEME = "tomorrow";

@DataBoundConstructor
public DarkThemeManagerFactory() {
Expand All @@ -21,6 +22,7 @@ public DarkThemeManagerFactory() {
public Theme getTheme() {
return Theme.builder()
.withCssUrl(getCssUrl())
.withProperty("prism-api", "theme", PRISM_THEME)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;

import static io.jenkins.plugins.darktheme.DarkThemeManagerFactory.*;

public class DarkThemeSystemManagerFactory extends ThemeManagerFactory {

@DataBoundConstructor
Expand All @@ -16,7 +18,9 @@ public DarkThemeSystemManagerFactory() {

@Override
public Theme getTheme() {
return Theme.builder().build();
return Theme.builder()
.withProperty("prism-api", "theme", PRISM_THEME)
.build();
}

@Extension
Expand Down

0 comments on commit 276b5a8

Please sign in to comment.