diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..914c6fb --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +.DS_Store +.idea/ +node_modules/ +.vagrant/ +dist/ +hpi/ +target/ +work/ +*.iml +webapp/ diff --git a/README.md b/README.md index 492c23d..473dccf 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,44 @@ # jenkins-dark [![Build status](https://ci.appveyor.com/api/projects/status/14lnufroy4v83xjk?svg=true)](https://ci.appveyor.com/project/camalot/jenkins-dark-stylish) -A stylish for Jenkins to give a dark theme. +A theme for Jenkins to give a dark look. ``` NOTE: This has not been tested with Jenkins 2.x. ``` -You will need to add the domains that you want this to apply to yourself. - -``` - @-moz-document domain("my-jenkins-ci-host.com") { ... } -``` +You will need to add the domains that you want this to apply to yourself if you use the Stylish plugin. ## How to install -_note: these steps may be slightly different for FireFox version of Stylish_ +### Simple Theme Jenkins Plugin (auto-updated) +- Install the [Simple Theme Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Simple+Theme+Plugin) on your Jenkins Server +- Click `Manage Jenkins` +- Click `Configure System` and scroll to `Theme` section +- Specify the URL of `http://camalot.github.io/jenkins-dark-stylish/jenkins-dark.min.css` for the CSS +- Click `Save` + +### Native Jenkins Plugin +- Download the [latest release hpi file](https://github.com/camalot/jenkins-dark-stylish/releases/latest) +- Go to `Jenkins -> Manage Jenkins -> Manage Plugins -> Advanced` +- Go to the `Upload Plugin` section +- Select the `hpi` file you downloaded +- Click `Upload` +- Restart Jenkins +- Profit! + +### Stylish + +_NOTE: these steps may be slightly different for FireFox version of Stylish_ - Install Stylish: - [Chrome][stylish-chrome] - [Firefox][stylish-firefox] -- Download the [latest release](https://github.com/camalot/jenkins-dark-stylish/releases/latest) +- Download the [latest release zip](https://github.com/camalot/jenkins-dark-stylish/releases/latest) - Extract to a known location -- Open the `css` file in your text editor of choice -- Modify the `@-moz-document` line to contain the domains you want to apply this to - - `@-moz-document domain("my-jenkins-ci-host.com") { ... }` -- Save the changes -- Open the Stylish Style Manager (_Manage installed styles._) -- Click on _Write new Style_ -- Under _Mozilla Format_, Click on _Import_ button +- Open the Stylish Style Manager (`Manage installed styles`) +- Click on `Write new Style` +- Under `Mozilla Format`, Click on `Import` button - Select the `jenkins-dark.css` file that you extracted earlier +- Add your domains that you want this to apply to - Profit! ## Screenshots @@ -51,11 +62,21 @@ _note: these steps may be slightly different for FireFox version of Stylish_ ## How to build ``` -$ npm install less -$ npm install less-plugin-clean-css -$ lessc --no-color --clean-css ./jenkins-dark.less ./dist/jenkins-dark.css +$ npm install +$ grunt ``` +This will generate the following: + - dist/jenkins-dark.css + - dist/jenkins-dark.min.css + +## How to contribute + +- Fork the _Jenkins-Dark-Stylish_ repository +- Clone the repository +- Create a new branch (eg. `feature/style-menus`) +- Create a pull request into `develop` + [stylish-chrome]: https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe?hl=en [stylish-firefox]: https://addons.mozilla.org/en-US/firefox/addon/stylish/ diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..ec1f792 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,15 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! +VAGRANTFILE_API_VERSION = "2" + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + config.vm.box = "centos" + config.vm.network :forwarded_port, guest: 8080, host: 8880 + # Provisioning + provision_cmd = "wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo; " \ + "rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key; " \ + "yum install jenkins java-1.6.0-openjdk -y; " + config.vm.provision :shell, :inline => provision_cmd +end diff --git a/appveyor.yml b/appveyor.yml index 32fc52f..8b1106c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,28 +3,99 @@ skip_tags: true image: WMF 5 environment: nodejs_version: 5.11.0 + git_email: + secure: ZLfpxUrw1AeB4Hzmg9poFh3ehcghbjDXbGa1zdUAmb0= + git_name: + secure: bOGR0uSE/yW6nUd9i7fcJg== + gh_access_token: + secure: Es5XTlIJiCiCFJHGDOA09AGFVZQL0jIWtUuPp4+m7MBcfeoVGbWQP2jYU3oSL5bw install: -- ps: Install-Product node $env:nodejs_version x64 -- cmd: npm install -g less -- cmd: npm install -g less-plugin-clean-css +- ps: | + Install-Product node $env:nodejs_version x64; + (Get-Content -Path "${env:APPVEYOR_BUILD_FOLDER}\package.json") | foreach { $_ -replace "`"version`": `"0.0.0`"", "`"version`": `"$ENV:APPVEYOR_BUILD_VERSION`"" } | Set-Content -Path "${env:APPVEYOR_BUILD_FOLDER}\package.json"; +- ps: (Get-Content -Path "${env:APPVEYOR_BUILD_FOLDER}\package.json") +- cmd: npm install -g grunt-cli +- cmd: npm install -g grunt +- cmd: npm update -g npm +- cmd: npm install +- ps: | + $mvnVersion = '3.2.5' + Add-Type -AssemblyName System.IO.Compression.FileSystem + if (!(Test-Path -Path "C:\maven\")) { + (new-object System.Net.WebClient).DownloadFile( + "http://www.us.apache.org/dist/maven/maven-3/${mvnVersion}/binaries/apache-maven-${mvnVersion}-bin.zip", + 'c:\maven-bin.zip' + ) + [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\maven-bin.zip", "C:\maven") + } +- cmd: SET PATH=C:\maven\apache-maven-3.2.5\bin;%JAVA_HOME%\bin;%PATH% +- cmd: SET MAVEN_OPTS=-Xmx4g +- cmd: SET JAVA_OPTS=-XX:MaxPermSize=2g -Xmx4g build_script: -- cmd: lessc --lint jenkins-dark.less -- cmd: lessc jenkins-dark.less ./dist/jenkins-dark.css -- cmd: lessc --clean-css jenkins-dark.less ./dist/jenkins-dark.min.css -- ps: Compress-Archive -Path ${env:APPVEYOR_BUILD_FOLDER}/dist/*.css -DestinationPath ./dist/${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.zip +- ps: | + $dist = "${env:APPVEYOR_BUILD_FOLDER}\}\dist\"; + if ( !(Test-Path -Path $dist) ) { + New-Item -Path $dist -ItemType Directory -Force; + } +- cmd: grunt +- ps: | + $webapp = "${env:APPVEYOR_BUILD_FOLDER}\plugin\src\main\webapp"; + if ( (Test-Path -Path $webapp) ) { + Remove-Item -Path $webapp | Out-Null; + } + New-Item -Path $webapp -ItemType Directory -Force | Out-Null; + Copy-Item -Path ${env:APPVEYOR_BUILD_FOLDER}\dist\*.min.css -Destination ${env:APPVEYOR_BUILD_FOLDER}\plugin\src\main\webapp\ + Compress-Archive -Path "${env:APPVEYOR_BUILD_FOLDER}/dist/*.css" -DestinationPath "${env:APPVEYOR_BUILD_FOLDER}/dist/${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.zip" + $plugin = "${env:APPVEYOR_BUILD_FOLDER}\plugin\"; + $target = Join-Path -Path $plugin -ChildPath target; + if ( (Test-Path -Path $target) ) { + Remove-Item -Path $target | Out-Null; + } + New-Item -Path $target -ItemType Directory -Force | Out-Null; + Set-Location $plugin; + & mvn package -B; + "Sleeping..." | Write-Host; + Start-Sleep -s 15; + "Time to wake up..." | Write-Host; + Copy-Item -Path "$target\jenkins-dark-theme.hpi" -Destination "${env:APPVEYOR_BUILD_FOLDER}\dist\${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.hpi" artifacts: - path: dist/jenkins-dark.css name: css - path: dist/*.zip name: zip +- path: dist/*.hpi + name: hpi +cache: + - c:\maven + - c:\Users\appveyor\.m2 deploy: - provider: GitHub tag: $(APPVEYOR_PROJECT_NAME)-$(APPVEYOR_BUILD_VERSION) release: $(APPVEYOR_PROJECT_NAME)-$(APPVEYOR_BUILD_VERSION) auth_token: secure: Es5XTlIJiCiCFJHGDOA09AGFVZQL0jIWtUuPp4+m7MBcfeoVGbWQP2jYU3oSL5bw - artifact: zip + artifact: zip, hpi draft: false force_update: true on: branch: master +after_deploy: +- ps: | + if ( $ENV:APPVEYOR_PULL_REQUEST_NUMBER -eq $null -and $ENV:APPVEYOR_REPO_BRANCH -match 'master$' ) { + Set-Location "${env:APPVEYOR_BUILD_FOLDER}"; + & git reset --hard; + & git config --global credential.helper store; + Add-Content "$ENV:USERPROFILE\.git-credentials" "https://$($ENV:gh_access_token):x-oauth-basic@github.com`n"; + & git config --global user.email "$ENV:git_email" + & git config --global user.name "$ENV:git_user" + $temp = "c:\temp\jenkins-dark-stylish"; + $VERSION = "$ENV:APPVEYOR_BUILD_VERSION"; + if ( !(Test-Path -Path $temp )) { + New-Item -Path $temp -Force -ItemType Directory | Out-Null; + } + Copy-Item -Path "${env:APPVEYOR_BUILD_FOLDER}\dist\*.css" -Destination $temp; + & git checkout gh-pages; + Copy-Item -Path "$temp\*.*" -Destination ${env:APPVEYOR_BUILD_FOLDER}; + & git commit -a -m "version $VERSION"; + & git push origin gh-pages; + } diff --git a/gruntfile.js b/gruntfile.js new file mode 100644 index 0000000..be9b9be --- /dev/null +++ b/gruntfile.js @@ -0,0 +1,76 @@ +module.exports = function(grunt) { + require('load-grunt-tasks')(grunt); + + var pkg = grunt.file.readJSON('package.json'); + + grunt.initConfig({ + clean: { + dist: { + src: ["dist/*"] + } + }, + + less: { + dist: { + options: { + //paths: ["assets/css"] + }, + files: {"dist/jenkins-dark.css": "jenkins-dark.less"} + } + }, + cssmin: { + target: { + files: [{ + expand: true, + cwd: 'dist/', + src: ['*.css', '!*.min.css'], + dest: 'dist/', + ext: '.min.css' + }] + } + }, + replace: { + dist: { + options: { + patterns: [{ + match: /\${VERSION}/g, + replacement: pkg.version + }, { + match: /jenkins-dark-theme<\/artifactId>\s+[^>]*<\/version>/g, + replacement: 'jenkins-dark-theme\n ' + pkg.version + '' + }] + }, + files: [{ + src: ['dist/jenkins-dark.css'], + dest: 'dist/jenkins-dark.css' + }, { + src: ['plugin/pom.xml'], + dest: 'plugin/pom.xml' + }] + } + }, + postcss: { + options: { + map: false, + processors: [ + require('autoprefixer')({ + browsers: 'last 2 versions' + }), // add vendor prefixes + require('postcss-encode-base64-inlined-images'), + require('cssnano')() // minify the result + ] + }, + dist: { + files: [{ + expand: true, + cwd: 'dist/', + src: ['*.css', '!*.min.css'], + dest: 'dist/', + ext: '.min.css' + }] + } + } + }); + grunt.loadNpmTasks('grunt-contrib-less'); + grunt.registerTask('default', ['clean', 'less', 'replace', 'cssmin', 'postcss']); +} diff --git a/jenkins-dark.less b/jenkins-dark.less index efc4d97..b25bcf7 100644 --- a/jenkins-dark.less +++ b/jenkins-dark.less @@ -1,209 +1,217 @@ +/** +* Author: Ryan Conrad +* Version: ${VERSION} +* GitHub: https://github.com/camalot/jenkins-dark-stylish/ +* Issues: https://github.com/camalot/jenkins-dark-stylish/issues +**/ @import url( './parts/_variables.less'); -@-moz-document domain("my-jenkins-ci-host.com") { - @import url( './parts/_keyframes.less'); - ::-webkit-scrollbar { - max-width: 10px !important; - max-height: 10px !important; - background: lighten(@background-light,8.8%) !important; - } - ::-webkit-scrollbar-corner, - ::-webkit-scrollbar-track { - background: lighten(@background-light,8.8%) !important; - } - ::-webkit-scrollbar-thumb { - border-radius: 5px !important; - background: rgba(80,80,80,.6) !important; - } - ::-webkit-scrollbar-corner, - ::-webkit-scrollbar-track { - background: lighten(@background-light,8.8%) !important; - } - ::selection { - background-color: lighten(@blue,20%) !important; - color: @white !important; - } - #main-panel, - .bottom-sticker-inner, - .top-sticker-inner, - body, - html { - background: @background-dark; - color: @text-light; - } - #breadcrumbBar, - #footer-container { - background: @background-black; - color: @text-light; - } - body, - form, - p, - table, - td, - th { - color: @text-light; - } - form { - margin: 0; - padding: 0; - } - .model-link, - a, - a:link, - a:visited { - text-decoration: none; - color: @blue; - outline: none; - } - .setting-input, - input[type='password']:hover, - input[type='text']:hover { - border-color: #4183C4; - } - .setting-input, - input[type='password'], - input[type='text'] { - font-size: 1.2em; - border: solid 1px #111; - color: @text-light; - background-color: #3a3a3a; - outline: none; - padding: 6px 5px 4px; - border-radius: 0; - box-shadow: none; - } - footer { - background: @background-black; - color: @text-light; - border-color: @background-333; - border-bottom: none; - } - #header { - background: @background-black; - } - @import url( './parts/_notifications.less'); - @import url( './parts/_wtf.less'); - @import url( './parts/_code-editor.less'); - .bottom-sticker-edge { - /* hide the shadow on the bottom panel */ - display: none; - } - #menuSelector, - .healthReportDetails { - -webkit-filter: invert(100%); - } - .healthReportDetails img { - -webkit-filter: invert(100%); - } - .hetero-list-container .dd-handle, - .repeated-container .dd-handle { - background-image: @drag-handle-image; - } - .repeated-chunk.hover { - border-color: #111; - } - @import url( './parts/_icons.less'); - .greyed { - color: #d1d1d1; - } - .redbold { - color: darkred; - font-weight: bold; - } - .greenbold { - color: #6c0; - font-weight: bold; - } - .inverse { - color: @black; - } - .section-header { - margin: 5px; - padding: 10px; - font-size: 3em; - background-color: @blue; - color: @text-light; - text-transform: uppercase; - border: none; - border-bottom: none; - } - @import url("./parts/_breadcrumbs.less"); - @import url("./parts/_side-panel.less"); - @import url("./parts/_main-panel.less"); - - - /* bigtable */ - .bigtable tr { - border: 1px solid @background-dark; - } - #projectstatus .header { - border-bottom-color: @background-dark; - } - .bigtable th, - .bigtable tr.header { - background-color: @background-black; - border-color: @background-dark; - color: @text-light; - } - table.sortable span.sortarrow { - color: @text-light; - } - .bigtable tr.header th { - background-color: @background-black; - color: @text-light; - } - table.sortable a.sortheader { - color: @text-light; - } - table.bigtable.pane > tbody > tr > td:last-child {} - .pane-frame .bigtable tr, - .pane-frame table {} - table.stripped tr:nth-child(even) { - background: @background-black; - color: @text-light; - } - .bigtable .plugin-category td.pane { - font-size: 3em; - text-align: center; - text-transform: uppercase; - background-color: #4183C4; - color: @text-light; - } - @import url( './parts/_dashboard.less'); - @import url( './parts/_buildHistory.less'); - @import url( './parts/_tasks.less'); - #buildQueue .pane[colspan='2'] { - text-align: center; - padding: 10px 0; - color: #999; - } - @import url( './parts/_login.less'); - .setting-name { - text-transform: capitalize; - vertical-align: middle; - } - .setting-name::after {} - #filter-box, - #search-box { - border: solid 1px @background-black; - border-radius: 0; - box-shadow: none; - background: #3a3a3a @search-image-16 3px center no-repeat !important; - padding: 4px 3px 4px 25px !important; - color: @text-light; - } - #filter-box:hover, - #search-box:hover { - border-color: @blue; - } - @import url( './parts/_buttons.less'); - @import url( './parts/_tabs.less'); - /* this is the trend timeline */ - .timeline-container { - -webkit-filter: invert(80%); - } - /* this is inside the timeline, so we invert it back to normal */ - .timeline-container .timeline-event-icon > img { - -webkit-filter: invert(80%); - } +.jenkins_ver::after { + content: ' : Jenkins-Dark v${VERSION}'; +} +#l10n-footer { + display: none; +} +@import url( './parts/_keyframes.less'); +::-webkit-scrollbar { + max-width: 10px !important; + max-height: 10px !important; + background: lighten(@background-light,8.8%) !important; +} +::-webkit-scrollbar-corner, +::-webkit-scrollbar-track { + background: lighten(@background-light,8.8%) !important; +} +::-webkit-scrollbar-thumb { + border-radius: 5px !important; + background: rgba(80,80,80,.6) !important; +} +::-webkit-scrollbar-corner, +::-webkit-scrollbar-track { + background: lighten(@background-light,8.8%) !important; +} +::selection { + background-color: lighten(@blue,20%) !important; + color: @white !important; +} +#main-panel, +.bottom-sticker-inner, +.top-sticker-inner, +body, +html { + background: @background-dark; + color: @text-light; +} +#breadcrumbBar, +#footer-container { + background: @background-black; + color: @text-light; +} +body, +form, +p, +table, +td, +th { + color: @text-light; +} +form { + margin: 0; + padding: 0; +} +.model-link, +a, +a:link, +a:visited { + text-decoration: none; + color: @blue; + outline: none; +} +.setting-input, +input[type='password']:hover, +input[type='text']:hover { + border-color: #4183C4; +} +.setting-input, +input[type='password'], +input[type='text'] { + font-size: 1.2em; + border: solid 1px #111; + color: @text-light; + background-color: #3a3a3a; + outline: none; + padding: 6px 5px 4px; + border-radius: 0; + box-shadow: none; +} +footer { + background: @background-black; + color: @text-light; + border-color: @background-333; + border-bottom: none; +} +#header { + background: @background-black; +} +@import url( './parts/_notifications.less'); +@import url( './parts/_wtf.less'); +@import url( './parts/_code-editor.less'); +.bottom-sticker-edge { + /* hide the shadow on the bottom panel */ + display: none; +} +#menuSelector, +.healthReportDetails { + -webkit-filter: invert(100%); +} +.healthReportDetails img { + -webkit-filter: invert(100%); +} +.hetero-list-container .dd-handle, +.repeated-container .dd-handle { + background-image: @drag-handle-image; +} +.repeated-chunk.hover { + border-color: #111; +} +@import url( './parts/_icons.less'); +.greyed { + color: #d1d1d1; +} +.redbold { + color: darkred; + font-weight: bold; +} +.greenbold { + color: #6c0; + font-weight: bold; +} +.inverse { + color: @black; +} +.section-header { + margin: 5px; + padding: 10px; + font-size: 3em; + background-color: @blue; + color: @text-light; + text-transform: uppercase; + border: none; + border-bottom: none; +} +@import url("./parts/_breadcrumbs.less"); +@import url("./parts/_side-panel.less"); +@import url("./parts/_main-panel.less"); +/* bigtable */ +.bigtable tr { + border: 1px solid @background-dark; +} +#projectstatus .header { + border-bottom-color: @background-dark; +} +.bigtable th, +.bigtable tr.header { + background-color: @background-black; + border-color: @background-dark; + color: @text-light; +} +table.sortable span.sortarrow { + color: @text-light; +} +.bigtable tr.header th { + background-color: @background-black; + color: @text-light; +} +table.sortable a.sortheader { + color: @text-light; +} +table.bigtable.pane > tbody > tr > td:last-child {} +.pane-frame .bigtable tr, +.pane-frame table {} +table.stripped tr:nth-child(even) { + background: @background-black; + color: @text-light; +} +.bigtable .plugin-category td.pane { + font-size: 3em; + text-align: center; + text-transform: uppercase; + background-color: #4183C4; + color: @text-light; +} +@import url( './parts/_dashboard.less'); +@import url( './parts/_buildHistory.less'); +@import url( './parts/_tasks.less'); +#buildQueue .pane[colspan='2'] { + text-align: center; + padding: 10px 0; + color: #999; +} +@import url( './parts/_login.less'); +.setting-name { + text-transform: capitalize; + vertical-align: middle; +} +.setting-name::after {} +#filter-box, +#search-box { + border: solid 1px @background-black; + border-radius: 0; + box-shadow: none; + background: #3a3a3a @search-image-16 3px center no-repeat !important; + padding: 4px 3px 4px 25px !important; + color: @text-light; +} +#filter-box:hover, +#search-box:hover { + border-color: @blue; +} +@import url( './parts/_buttons.less'); +@import url( './parts/_tabs.less'); +/* this is the trend timeline */ +.timeline-container { + -webkit-filter: invert(80%); +} +/* this is inside the timeline, so we invert it back to normal */ +.timeline-container .timeline-event-icon > img { + -webkit-filter: invert(80%); } diff --git a/package.json b/package.json new file mode 100644 index 0000000..454949f --- /dev/null +++ b/package.json @@ -0,0 +1,52 @@ +{ + "name": "jenkins-dark-theme", + "version": "0.0.0", + "description": "A dark theme for Jenkins", + "repository": { + "type": "git", + "url": "https://github.com/camalot/jenkins-dark-stylish" + }, + "bugs": { + "url": "https://github.com/camalot/jenkins-dark-stylish/issues" + }, + "keywords": [ + "stylish", + "theme", + "jenkins" + ], + "author": { + "name": "Ryan Conrad", + "url": "http://bit13.com/", + "email": "camalot@gmail.com" + }, + "contributors": [], + "license": { + "type": "Apache-2.0", + "url": "https://raw.githubusercontent.com/camalot/jenkins-dark-stylish/master/LICENSE" + }, + "devDependencies": { + "autoprefixer": "^6.3.3", + "cssnano": "^3.5.2", + "grunt": "^0.4.5", + "grunt-autoprefixer": "^3.0.3", + "grunt-contrib-clean": "^0.5.0", + "grunt-contrib-copy": "^0.4.1", + "grunt-contrib-cssmin": "^0.6.2", + "grunt-contrib-imagemin": "^1.0.0", + "grunt-contrib-jshint": "^0.6.5", + "grunt-contrib-less": "^1.3.0", + "grunt-contrib-uglify": "^0.2.7", + "grunt-image-embed": "^0.3.3", + "grunt-postcss": "^0.7.2", + "grunt-replace": "^0.11.0", + "grunt-rev": "^0.1.0", + "imagemin-svgo": "^4.2.0", + "install": "^0.3.0", + "jenkins-core-theme": "^1.1.40", + "load-grunt-tasks": "^3.3.0", + "npm": "^3.4.1", + "pixrem": "^3.0.0", + "postcss-encode-base64-inlined-images": "0.0.1" + }, + "dependencies": {} +} diff --git a/parts/_code-editor.less b/parts/_code-editor.less index 7039c9f..0a5a4d8 100644 --- a/parts/_code-editor.less +++ b/parts/_code-editor.less @@ -93,7 +93,7 @@ z-index: 10; position: absolute; visibility: hidden; - border-left: 6px solid @green; + border-left: 6px solid @green !important; border-right: none; width: 0; } @@ -113,23 +113,20 @@ width: auto; border: 0; background: transparent; - background: rgba(255, 255, 255, .4); -} -/* Kludge to turn off filter in ie9+, which also accepts rgba */ -.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) { - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + background: rgba(0, 255, 0, .4) !important; } + .CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {} .CodeMirror-focused pre.CodeMirror-cursor { visibility: visible; } div.CodeMirror-selected { - background: lighten(@blue,50%); + background: lighten(@blue,50%) !important; color: @white !important; } .CodeMirror-focused div.CodeMirror-selected { - background: lighten(@blue,50%); - color: @white; + background: lighten(@blue,50%) !important; + color: @white !important; } .CodeMirror-searching { background: #ffa; diff --git a/parts/_dashboard.less b/parts/_dashboard.less index 963fd51..1859402 100644 --- a/parts/_dashboard.less +++ b/parts/_dashboard.less @@ -12,10 +12,12 @@ table#computers { .job-status-green-anime, .job-status-blue-anime, .job-status-nobuilt-anime, + .job-status-aborted-anime, .job-status-red, .job-status-yellow, .job-status-green, .job-status-blue, + .job-status-aborted, .job-status-nobuilt, .job-status- { td { @@ -29,7 +31,8 @@ table#computers { &.job-status-yellow-anime, &.job-status-green-anime, &.job-status-blue-anime, - &.job-status-nobuilt-anime { + &.job-status-nobuilt-anime, + &.job-status-aborted-anime, { animation: pulse 5s infinite; } } @@ -40,7 +43,8 @@ table#computers { &.job-status-yellow-anime, &.job-status-green-anime, &.job-status-blue-anime, - &.job-status-nobuilt-anime { + &.job-status-nobuilt-anime, + &.job-status-aborted-anime, { animation: pulse-alt 5s infinite; } } diff --git a/parts/_icons.less b/parts/_icons.less index eb5ad84..51d466d 100644 --- a/parts/_icons.less +++ b/parts/_icons.less @@ -4,6 +4,10 @@ img.icon-hourglass { content: @clock-image-16; } +img[src$="artifactory-icon.png"][height="16px"] { + margin-right: 4px; +} + .icon-stop { content: @stop-build-image-16; } @@ -151,6 +155,7 @@ img[src$="/images/atom.gif"] { .icon-yellow, .icon-nobuilt-anime, .icon-nobuilt, +.icon-aborted, .icon-grey-anime, .icon-grey, .icon-blue-anime, @@ -362,6 +367,7 @@ img[src$="red.png"] { /* swap out the animation images for new ones */ img { &.icon-grey-anime, + &.icon-aborted-anime, &.icon-nobuilt-anime { .spinning-build-image(); &.icon-xlg { @@ -378,7 +384,8 @@ img { } } } -img[src$="nobuilt_anime.gif"] +img[src$="aborted_anime.gif"], +img[src$="nobuilt_anime.gif"], img[src$="grey_anime.gif"] { vertical-align: text-top; .spinning-build-image(); @@ -397,6 +404,7 @@ img[src$="grey_anime.gif"] { } img { &.icon-grey, + &.icon-aborted, &.icon-nobuilt { &.icon-xlg { content: @grey-image-48; @@ -412,6 +420,7 @@ img { } } } +img[src$="aborted.png"], img[src$="nobuilt.png"], img[src$="grey.png"] { vertical-align: text-top; diff --git a/plugin/pom.xml b/plugin/pom.xml new file mode 100644 index 0000000..c6d4e05 --- /dev/null +++ b/plugin/pom.xml @@ -0,0 +1,40 @@ + + 4.0.0 + + + org.jenkins-ci.plugins + plugin + 1.642.2 + + + com.bit13.jenkins-dark + jenkins-dark-theme + 0.1.0 + hpi + + Dark Theme Plugin + https://github.com/camalot/jenkins-dark-stylish + + + + camalot + Ryan Conrad + camalot@gmail.com + + + + + + repo.jenkins-ci.org + http://repo.jenkins-ci.org/public/ + + + + + repo.jenkins-ci.org + http://repo.jenkins-ci.org/public/ + + + + diff --git a/plugin/src/main/java/com/bit13/jenkins/JenkinsDarkThemeDecorator.java b/plugin/src/main/java/com/bit13/jenkins/JenkinsDarkThemeDecorator.java new file mode 100644 index 0000000..e3b3f9f --- /dev/null +++ b/plugin/src/main/java/com/bit13/jenkins/JenkinsDarkThemeDecorator.java @@ -0,0 +1,7 @@ +package com.bit13.jenkins; +import hudson.Extension; +import hudson.model.PageDecorator; + +@Extension +public class JenkinsDarkThemeDecorator extends PageDecorator { +} diff --git a/plugin/src/main/resources/com/bit13/jenkins/JenkinsDarkThemeDecorator/header.jelly b/plugin/src/main/resources/com/bit13/jenkins/JenkinsDarkThemeDecorator/header.jelly new file mode 100644 index 0000000..ece186c --- /dev/null +++ b/plugin/src/main/resources/com/bit13/jenkins/JenkinsDarkThemeDecorator/header.jelly @@ -0,0 +1,4 @@ + + + + diff --git a/plugin/src/main/resources/index.jelly b/plugin/src/main/resources/index.jelly new file mode 100644 index 0000000..f9f2627 --- /dev/null +++ b/plugin/src/main/resources/index.jelly @@ -0,0 +1,7 @@ + + +
+ Changes Jenkins theme to a Dark Theme. +