简体   繁体   中英

Custom background icon for dashing widget

I am making Dashing widget to show statistics from Jenkins CI server. I want to set Jenkins logo icon as a widget background icon. For the moment Jenkins logo icon is not included into official Font Awesome( https://github.com/FortAwesome/Font-Awesome/issues/3714 , https://github.com/FortAwesome/Font-Awesome/issues/1529 ).

Dashing framework is flexible and I assume there must be a solution to set a custom icon as a widget background. But for now I cannot solve the issue on my own.

Has anyone come across this?

The following code from the Bamboo widget will likely do the trick. This is only needed in the scss file, there shouldn't be anything else special needed (other than having the file in the correct location for the scss to find it!)

.widget-bamboo-build {

  background: url("/assets/bamboo-logo.png") no-repeat center;

This line is right at the top of the widget section in the scss file. I've included the .widget-bamboo-build line to indicate that.

So this line looks in the Dashing applications home directory for a folder called 'assets' and then tries to find 'bamboo-logo.png' in that folder.

Hope this helps :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM