jenkins: add local dark theme css

This commit is contained in:
Brad Stein 2026-01-20 17:43:23 -03:00
parent 13891e794a
commit 6db7521114
4 changed files with 103 additions and 1 deletions

View File

@ -94,6 +94,7 @@ spec:
- -c - -c
- | - |
set -e set -e
mkdir -p /var/jenkins_home/userContent
exec env $(cat /vault/secrets/jenkins-env) /usr/bin/tini -- /usr/local/bin/jenkins.sh exec env $(cat /vault/secrets/jenkins-env) /usr/bin/tini -- /usr/local/bin/jenkins.sh
ports: ports:
- name: http - name: http
@ -152,6 +153,9 @@ spec:
mountPath: /config/jcasc mountPath: /config/jcasc
- name: init-scripts - name: init-scripts
mountPath: /usr/share/jenkins/ref/init.groovy.d mountPath: /usr/share/jenkins/ref/init.groovy.d
- name: init-scripts
mountPath: /var/jenkins_home/userContent/jenkins-theme.css
subPath: jenkins-theme.css
- name: plugin-dir - name: plugin-dir
mountPath: /usr/share/jenkins/ref/plugins mountPath: /usr/share/jenkins/ref/plugins
- name: tmp - name: tmp

View File

@ -18,6 +18,7 @@ configMapGenerator:
- name: jenkins-init-scripts - name: jenkins-init-scripts
namespace: jenkins namespace: jenkins
files: files:
- jenkins-theme.css=scripts/jenkins-theme.css
- git-notify-token.groovy=scripts/git-notify-token.groovy - git-notify-token.groovy=scripts/git-notify-token.groovy
- theme.groovy=scripts/theme.groovy - theme.groovy=scripts/theme.groovy
options: options:

View File

@ -0,0 +1,97 @@
@import url("https://cdn.jsdelivr.net/gh/Jorg3Lucas/jenkins-modern-themes@main/dist/modern-blue-grey.css");
:root {
--atlas-bg: #0f1216;
--atlas-surface: #171b21;
--atlas-surface-alt: #1f252d;
--atlas-border: #2b313b;
--atlas-text: #e6e9ef;
--atlas-text-muted: #b3bac6;
--atlas-link: #8fb7ff;
}
body,
#page-body,
#page-header,
#header,
#main-panel,
#main-panel-content,
#side-panel,
.top-sticker-inner,
.bottom-sticker-inner,
#breadcrumbBar,
#breadcrumbs {
background-color: var(--atlas-bg) !important;
color: var(--atlas-text) !important;
}
#side-panel .task-link,
#breadcrumbs a,
#breadcrumbs,
#projectstatus th a,
#projectstatus td,
#projectstatus th {
color: var(--atlas-text-muted) !important;
}
a,
a:visited,
a:link {
color: var(--atlas-link) !important;
}
a:hover {
opacity: 0.85;
}
#main-panel,
#main-panel-content,
#description,
.pane,
table.pane {
background-color: var(--atlas-surface) !important;
color: var(--atlas-text) !important;
}
table.pane tr:nth-child(odd) td {
background-color: var(--atlas-surface) !important;
}
table.pane tr:nth-child(even) td,
#projectstatus tr:hover td {
background-color: var(--atlas-surface-alt) !important;
}
input,
select,
textarea,
#search-box {
background-color: var(--atlas-surface-alt) !important;
color: var(--atlas-text) !important;
border-color: var(--atlas-border) !important;
}
#header,
#page-header {
background-color: #202734 !important;
}
#header .login,
#page-header .login {
color: var(--atlas-text) !important;
}
#side-panel .task-link,
#side-panel .task-link:visited,
#side-panel .task-link:hover {
color: var(--atlas-text) !important;
}
#footer {
background-color: var(--atlas-bg) !important;
color: var(--atlas-text-muted) !important;
}
.jenkins_ver:after {
content: "atlas dark";
}

View File

@ -6,7 +6,7 @@ def decorators = instance.getExtensionList(SimpleThemeDecorator.class)
if (decorators?.size() > 0) { if (decorators?.size() > 0) {
def theme = decorators[0] def theme = decorators[0]
theme.setCssUrl("https://jenkins-contrib-themes.github.io/jenkins-material-theme/dist/material-ocean.css") theme.setCssUrl("https://ci.bstein.dev/userContent/jenkins-theme.css")
theme.setJsUrl("") theme.setJsUrl("")
instance.save() instance.save()
println("Applied simple-theme-plugin dark theme") println("Applied simple-theme-plugin dark theme")