1 of 22

Hands-on: How to use and create Jenkins themes?

by Tobias Gruetzmacher, Oleg Nenashev,

and Tim Jacomb

1

UI/UX Hackfest

May 25 - 29

2 of 22

What if Jenkins had themes?

2

3 of 22

It does!

3

4 of 22

Agenda

  • Introduction to the Simple Theme Plugin
  • How to do a small changes to the UI?
  • How to do a bigger theme or to create a new one?
  • UI/UX Hackfest: Working on a Jenkins Dark Theme together

4

5 of 22

Using UI Themes in Jenkins

  • Simple Theme Plugin - allows customizing the Jenkins UI by providing custom CSS and Javascript files. It also supports replacing the Favicon
    1. There are many themes created by Jenkins users.
  • Login Theme Plugin - allows modifying or replacing the Jenkins login screen. It is required to customize login screens starting from Jenkins 2.128 (announcement).

Documentation: https://www.jenkins.io/doc/book/managing/ui-themes/

5

6 of 22

Theme Support Policy

Jenkins themes are provided “as is”, without warranty of any kind, implicit or explicit. The Jenkins core, plugins and other component updates may break theme compatibility without notice.

6

7 of 22

A new look for Jenkins

Easy theming using the Simple Theme Plugin

7

8 of 22

Getting started

8

Live Demo

9 of 22

Simple changes (Extra CSS)

  • Change headers: h1 { color: red; }
  • Hide logo: #jenkins-head-icon { display: none; }
  • Replace logo:�

9

#jenkins-head-icon {

width: 0;

height: 0;

padding: 32px;

background: url(http://icons.iconarchive.com/icons/icojam/matreshka/48/red-matreshka-inside-icon-icon.png);

background-repeat: no-repeat;

}

10 of 22

Using themes

Older themes probably don’t look good on modern Jenkins:

10

11 of 22

Developing themes

Example: Neo2 (https://github.com/TobiX/jenkins-neo2-theme)

  • LESS
  • cssnano
  • Grunt
  • yarn

11

12 of 22

Live Hands-On

12

13 of 22

Dark Theme

13

Jenkins

14 of 22

14

Jenkins

15 of 22

Experiments

  • Neo2 Theme Dark mode (removed)
  • camalot/jenkins-dark-stylish
  • Other (abandoned?) themes
  • ...

15

Jenkins

16 of 22

16

Jenkins

17 of 22

17

Jenkins

18 of 22

Challenges

  • Hard to maintain
  • Need in custom images
  • Not official

18

Jenkins

19 of 22

Official Dark Theme?

19

Jenkins

20 of 22

UI/UX Hackfest 2020

  • Just started…
  • Official incubated project
  • Jenkins core changes needed:
    • CSS variables
    • Maintaining browser compatibility is a challenge
  • May 27 Meeting notes

20

Jenkins

21 of 22

DEMO!

21

Jenkins

22 of 22

UI/UX Hackfest ideas

  • Create a new Dark theme for Jenkins (JENKINS-61480)
  • Blue Ocean Theme - apply Blue Ocean styling to the Jenkins UI
  • Improve existing themes and adapt them to recent Jenkins versions (e.g. Neo2 theme)
  • Document managing themes in the Simple Theme Plugin docs
  • Create a new microsite on github.io or jenkins.io with themes listing (aka "theme marketplace")

22

Jenkins