Skip to content

Commit

Permalink
Merge pull request #105 from jenkinsci/style
Browse files Browse the repository at this point in the history
Add option to specify the style prefix for the FontAwesome icons
  • Loading branch information
uhafner authored Aug 27, 2021
2 parents 1108700 + f76ea4e commit 19c1212
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/resources/font-awesome/svg-icon.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,20 @@
<st:attribute name="class" use="optional" type="String">
Additional classes to be applied to the svg tag.
</st:attribute>
<st:attribute name="prefix" use="optional" type="String">
FontAwesome Icon style prefix to be used. Allowed style prefix values are "solid", "regular", or "brands".
If no style prefix is defined then the default prefix style "solid" will be used.
</st:attribute>
<st:attribute name="tooltip" use="optional" type="String">
Optional tooltip for the icon.
</st:attribute>

</st:documentation>

<svg class="fa-svg-icon ${class}">
<use href="${resURL}/plugin/font-awesome-api/sprites/solid.svg#${name}"/>
<title>${tooltip}</title>

<use href="${resURL}/plugin/font-awesome-api/sprites/${prefix != null ? prefix : 'solid'}.svg#${name}"/>
</svg>

</j:jelly>

0 comments on commit 19c1212

Please sign in to comment.