I need to add a custom logo to my Jenkins page which should appear on login page and post login pages as well.
As others pointed out, install the Login Page Theme plugin
Go to Manage Jenkins -> Configure System -> Login Page Theme
To change the logo, simply add the following style element in the Head section
<style>
.simple-page .logo {
background-image: url('https://www.jenkins.io/images/logos/snow/snow.png');
background-repeat: no-repeat;
background-position: 50% 0;
height: 350px;
background-size: contain;
}
.simple-page form {
width: unset;
max-width: unset;
}
<style>
To change the header text shown below the logo, add the following script element in the Header section
<script>
document.getElementsByTagName('h1')[0].textContent = 'Welcome to Balajee\'s Jenkins!'
</script>
Finally hit save and apply.
When you login next time, you should see something like this
As plugin page clearly says..
Only install this plugin, or make it available for installation, if you trust all your Jenkins administrators not to abuse these options.
I think you need to read this post on the Jenkins blog (assuming Jenkins >= 2.128):
New design, UX and extensibility digest for login page et. al.
Overview
... New design for the login and signup forms and Jenkins is (re)starting pages introduced in Jenkins 2.128 ... This meant to drop the usage of the jelly layout lib (aka xmlns:l="/lib/layout") and as well the page decorators it supported. However there is a new SimplePageDecorator extension point.
SimplePageDecorator - custom implementations
Have a look at Login Theme Plugin, which allows you to configure your own custom content to be injected into the new login/sign-up page.
The Simple Theme plugin can be used to customize the rest of the pages.
Related
i understand v-cloak is used to display nothing when a new page is loaded.
in my rails app, when i try to switch page (i am using vue component in Rails View), there is a short glimpse of Vuejs codes displaying curly braces before another new page is load. i am entirely baffled and not sure if this is turbolink related as there is no error message found in browser console, or in the rails git logs.
this short glimpse of Vuejs displaying curly braces before another page is loaded, is really annoying, can anyone help on this?
v-cloak is used to do this.
official API:
[v-cloak] {
display: none;
}
<div v-cloak>
{{ message }}
</div>
tips: written [v-cloak] in #import loaded css file can't work for this problem.
another way: around target tags.
Apart from using [v-cloak] which is a generic way of completely hiding an element until Vue inits, two more usable "tools" are v-text and v-html directives, coupled with computed properties delivering the strings the above directives expect from more complex logic.
Not only do they hide the content until init time, but they can also serve as selectors for the unparsed template elements, as they get removed from the element once Vue parses it. So you could apply backgrounds, width, min-heightto those elements, without the need to spiff your layout with preload classes and remove them on mounted().
An important note here is that transitions won't work on those elements, because Vue purposefully rebuilds the entire DOM of the template once it mounts. If it didn't, enter animations wouldn't work as expected. So there can be no transition from h2[v-text] to h2, because the element is completely replaced. But you can take that into account and start your enter transition from how the [v-text] element was styled.
It's probably not the solution you're looking for (it's more designer's work than programmer's, really) and it's definitely not a magical one liner: it has to be solved on a page by page basis.
But this is how pre-loaders are done (the technique is the same in any modern FE framework, it's just that sometimes you need to spiff your markup with preload classes and remove them on mounted, ngAfterViewInit or componentDidMount).
To be able to style this at your own pace, simply disable JavaScript (or don't init Vue, if you prefer) so you set every detail right. But don't overdo it.
Here's a basic example showing you don't need a whole lot of detail to get a decent effect. It's a matter of roughly matching element heights and coding in some striped CSS backgrounds, really (throw in a blur filter, if you want to get really fancy):
Vue.config.productionTip = false;
Vue.config.devtools = false;
setTimeout(() => {
new Vue({
el: '#app',
data: () => ({
Message: 'Message',
Description: `<p>I'm baby tousled echo park pabst polaroid synth marfa. Migas small batch paleo pop-up street art, chia sriracha cronut ramps succulents portland. YOLO normcore taiyaki organic. Green juice helvetica single-origin coffee polaroid swag selvage schlitz. Artisan la croix unicorn cardigan meh everyday carry wolf thundercats.
<p>Iceland hoodie vice, chicharrones gentrify dreamcatcher ethical jianbing blog truffaut pinterest VHS flannel selfies bushwick. Flannel activated charcoal bespoke master cleanse, chambray tumblr four loko helvetica chicharrones ugh aesthetic irony godard. Beard farm-to-table mumblecore wolf typewriter try-hard shoreditch church-key scenester tousled letterpress yuccie bitters. Selfies +1 man bun, jianbing hell of tote bag crucifix flexitarian. Cronut mumblecore knausgaard meditation authentic lumbersexual listicle pok pok coloring book pitchfork gentrify. +1 offal cronut, flexitarian glossier shoreditch biodiesel stumptown tumeric seitan polaroid.
<p>Narwhal williamsburg adaptogen, four dollar toast retro chillwave occupy kombucha YOLO marfa franzen kogi biodiesel street art next level. Viral blog taxidermy twee echo park roof party. Hammock street art tumeric selvage sartorial. Paleo hashtag activated charcoal, heirloom quinoa cred blog ethical.`
})
})
}, 1000)
#app h2[v-text] {
width: 200px;
background-color: #f8f8f8;
height: 1em;
}
#app div[v-html] {
min-height: 250px;
background-image: repeating-linear-gradient(
180deg,
#fff,
#fff 10px,
#f5f5f5 10px,
#f5f5f5 20px);
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<div id="app">
<h2 v-text="Message"></h2>
<div v-html="Description"></div>
</div>
When applying this technique, do not use images, as they require loading as well. Work with CSS only and make sure that CSS is available in <header> (or at least before the app element). Last, but not least, keep in mind your preload has to match your app at all screen widths.
Jenkins 2 has a UI problem in job configuration page. The UI layout stretches horizontally in Job Configuration page.
If there are long lines in any text area, the whole page is stretched to the width of the longest text line. This makes the Job Configuration page very hard to use.
The problem has been reported in
Jenkins version 2.26, LTS 2.19.3 and above
This has been fixed.
Issue Report: https://issues.jenkins-ci.org/browse/JENKINS-27367
Github PR: https://github.com/jenkinsci/jenkins/pull/2575
Jenkins version below 2.26, LTS 2.19.3
For those who can not upgrade to the latest Jenkins version, here is another fix:
Install simple-theme-plugin.
Create a css file (theme.css) in <jenkins_home>/userContent/.
Add following to the css file.
td.setting-main .CodeMirror {
display: table;
table-layout: fixed;
width: 100%;
}
Point to your theme css (for example http://<yourjenkins>/userContent/theme.css) in jenkins system configuration page, section "Theme"
I want to change background images, logo ,headings and add some buttons.
I have the following UI related plugins installed
1) Simple Theme Plugin
A plugin for Jenkins that supports custom CSS & JavaScript. You can customize Jenkins's appearance (ex. his gentle face on the background).
version 0.3
2) UI Themes: Plugin
This plugin provides UI themes for Jenkins.
version 2.1.1
I have found some answer regarding the same but didn't find much help.
-->> Customising Jenkins' appearance to make it easier to tell instances apart
-->> http://isotope11.com/blog/styling-your-jenkins-continuous-integration-server
Please give steps or any links from which I can completely change the appearance of my Jenkins server.
If you are comfortable with CSS styling, you could create a theme, by making a CSS styling file and uploading it to a directly-serving server (Even the one your using for jenkins, in a new folder) or JavaScript styling (same diddy) could be added to the option at your jenkins {host}/configure under "Theme". However, in my experience the 1.609.1 version of jenkins does NOT support this plugin properly in OpenShift Cloud hosting.
You can see an example of full theme in progress in jenkinsci/dark-theme.
It is not yet ready, but can illustrate how the CSS is setup with a Jenkins 2.220+ (May 2020)
If you are comfortable in CSS, you can easily customize logo and titel in theme with .css file.
For example, I have added JENKINS_HOME/usercontent/mytheme.css file JENKINS_HOME/usercontent/logo.png as my logo and follow the css below:
#charset “utf-8”;
#header .logo {
height: 36px;
}
/* Custom style for my Jenkins Platform */
.logo {
background: url(/userContent/logo.png) no-repeat 10px center;
}
.logo img {
display: none;
}
.logo:after {
content: 'Jenkins my instance';
font-weight: bold;
white-space: nowrap;
} // Content after logo
Just check in Configure System --> Theme you must give CSS path of above mytheme.css file. & Refresh your Jenkins Page.
See the reference LINK here !
In my grails application I am using the spring-security-core:1.2.7.3 plugin with the famfamfam:1.0.1 plugin.
When I click on a link that takes me to the web application (and I previously selected the rememberme check box) it takes me to a secured page but no famfamfam images are displayed. In Firefox I can see the following error:
"NetworkError: 404 Not Found - http://localhost:8080/static/plugins/famfamfam-1.0.1/images/icons/user_suit.png;jsessionid=AB8FFF32A22F98573537A965694936AC"
Is there any way that I can prevent the 'jsessionid' from being appended to images?
Thanks!
See this link for a response from the plugin owner: https://github.com/xiaochong/zkui/issues/118.
The issue seems to relate to the resources plugin.
My workaround was to use a blank image in the zk item:
`<z:menuitem label="Home" height="80px;" top="40px;"
href="${createLink(uri: '/')}" image="/images/blank.png" class="menu_house"/>`
And then use a class to add the menu image:
.menu_house {
background-image: url("../images/house.png");
background-repeat: no-repeat;
background-position: left center;
}
I hope that helps to save someone time in the future.
I installed the Simple Theme plugin on my Jenkins instance, and I managed to do some (very) basic theme changes.
Does anyone have a better reference to the Jenkins theme?
The plugin page is very low on info...
If I want to override a style attribute, I have to dig into the generated html and do a lot of experimenting.
You can customize your known simple theme with .css file.
Make sure that you have .png logo image, I have added 'Jenkins_home/usercontent/mytheme.css' file 'Jenkins_home/usercontent/logo.png' as my logo.
and follow the css below:
#charset “utf-8”;
#header .logo {
height: 36px;
}
/* Custom style for my Jenkins Platform */
.logo {
background: url(/userContent/logo.png) no-repeat 10px center;
}
.logo img {
display: none;
}
.logo:after {
content: 'Jenkins my instance';
font-weight: bold;
white-space: nowrap;
} // Content after logo
Just check in Jenkins Configuration theme must be CSS URL and you must add path of above 'mytheme.css' file.
& Refresh your Jenkins Page.
Found a simple tutorial here for start:
http://www.techgaun.com/2013/06/customizing-jenkins-layout.html
Open Jenkins in Chrome or FireFox and press F12.
Right click on the UI element you want to change and select Inspect Element.
In the debug window the line in the html is highlighted.
Record the id and/or class of the UI element.
Open style.css and search for the id/class.
Copy the css-code and paste it in .css which you save in the css directory.
In the Theme section on the Configuration page enter css/.css as URL of theme CSS.
Now start altering .css to get the looks you desire.
Enable auto refesh to see the changes, Ctrl-F5 also helps