font_awesome5_rails icon indicating copy to clipboard operation
font_awesome5_rails copied to clipboard

Using Pro

Open chmich opened this issue 6 years ago • 4 comments

Dear Tomkra,

would this be an idea?:

FontAwesome5.configure do |config|
  config.source_config_folder = true
end

and then your gem would drag the sources from config/fontawesome/ instead from the gem-folder? Then i would be able to put my downloaded pro-icons there. necessary would be a little tutorial about the directory-structure

reasons:

  • i'm not happy with the kit because i want to have no dependencies to outside (yearly licences, ..).
  • I dont want to blow up my asset-pipeline with thousands of icons.
  • the developer would not be misled to put the licenced icons into the public-folder

Thanks, Christian

chmich avatar Jun 30 '19 07:06 chmich

Hello @chmich,

sounds interesting to me. So you want to use your own paths to icons, css and js files and be able to config It through initalizer or so? Maybe It would be nice to be able to directly specify path to your FA files. Something you suggested but like this:

FontAwesome5.configure do |config|
  config.source_config_folder = 'path/to/folder'
end

Do I understand your problem correctly? I will look at it in near future :).

tomkr4l avatar Jul 17 '19 07:07 tomkr4l

Thanks Thomas,

yes, thats what i meant.

except one thing: i also had the idea of a configuration for a individual 'path/to/folder'. that would be rails-like.

but, what not is rails-like: Licences. For that, i had the idea, that the gem should not allow the licenced pro-fonts inside the public-folder. That was the only reason for a fixed alternate-path (IF you want to care about this point).

chmich avatar Jul 17 '19 08:07 chmich

Hi guys i've boosted this gem to the pro version.

https://github.com/krtschmr/font_awesome_pro5_rails

@tomkra thanks for your great work!

krtschmr avatar Oct 02 '19 02:10 krtschmr

Just looking at this, the inline icon helper currently only grabs icons in the app/assets/images/fa5 directory that is in the gem itself.

Of course, to allow Pro, we need to allow someone to download the pro pack and put it somewhere.

The issue with keeping the icons outside of the asset pipeline is that the image_tag approach to using the icons wouldn't work. I'm not sure if that's 100% desirable.

Perhaps we could configure a paths config option that if Rails is present appends the app/assets and vendor/assets options to, but can be appended to with an initializer much like the Rails.application.config.assets.paths option does?

That way you can put them wherever you like (in lib or config or elsewhere) without any issue, the inline parser can find the file, and it's down to you as the developer to choose to not use the image_tag approach.

simmerz avatar Jan 12 '23 16:01 simmerz