tomkr4l / font_awesome5_rails

font_awesome_5_rails is font awesome 5 gem bundled for rails asset pipeline
https://fontawesome.com/
MIT License
158 stars 25 forks source link

Pro icons not working #35

Closed MakarovCode closed 5 years ago

MakarovCode commented 5 years ago

I've been trying to use the pro icons but can't make it work. I download de SVG files, save them in app/assets/svg folder.

Add this line to config/initializers/assets.rb Rails.application.config.assets.precompile += %w( svg/* )

Try using icons with both the HTML and GEM Helpers: <%= fa_icon('analytics', type: :fas) %> <i class="fas fa-analytics"></i>

Restarted my server, not working!. What am I missing?

parterburn commented 5 years ago

@MakarovCode FA just released Kits a few days ago which makes using Pro icons with this gem much easier. See the updated Readme in the PR I just made: https://github.com/tomkra/font_awesome5_rails/pull/37

tomkr4l commented 5 years ago

@MakarovCode Sorry for slow response. I'm not using Pro icons so I didn't try this. Did you find the solution or steps proposed by @parterburn worked for you?

MakarovCode commented 5 years ago

Yes, it did work, I remove the next lines from application.scss and application.js

@import "font_awesome5";
//= require font_awesome5

And load the CDN (Kit) in my application.html.erb <script src="https://kit.fontawesome.com/xxxxxxxxx.js"></script>

Very important is to check Pro in the Font Awesome Kit configuration.

tomkr4l commented 5 years ago

@MakarovCode Super, thank you for response. Closing for now. Feel free to reopen if you have any problem.

chmich commented 5 years ago

Hi, Like MakarovCode, it works for me. But, is there a way to have all svgs inside the public-folder and the gem would drag the svgs from there?

https://github.com/tomkra/font_awesome5_rails/issues/41