FontAwesome Free is already included in Jumpstart Pro!
To use FontAwesome Pro, you can easily add it to your Jumpstart Pro application:
app/views/layouts/application.html.erb
and paste in your Kit html into the head tag. You can remove the FontAwesome link for the free version. You won't need that anymore.Using Font Awesome icons is as simple as embedding the HTML for it:
<i class="far fa-thumbs-up"></i>
Or you can use our fa_icon
helper in ApplicationHelper:
<%= fa_icon "thumbs-up" %>
The icons shipping with Jumpstart are from the Zondicons library from Steve Schoger. Find them in app/images/icons
. We use a SVG
render function that hooks into the inline_svg gem. In doing so you can pass styles
. title
, and name
attributes which are all optional.
The helper is found in app/helpers/application_helper.rb
.
def render_svg(name, options = {})
options[:title] ||= name.underscore.humanize
options[:aria] = true
options[:nocomment] = true
options[:class] = options.fetch(:styles, "fill-current text-gray-500")
filename = "#{name}.svg"
inline_svg_tag(filename, options)
end
Pass in both fill-current
& a text color class from Tailwind CSS to alter the colors respectively. Use the helper like the following for SVG-based icons/images
<%= render_svg "icon-name", styles: "fill-current text-color-black icon-lg", title: "my icon" %>
Another option for icons is Hericons from Steve Schoger. You can copy paste the SVGs into your template as needed.