Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Font Awesome #160

Closed
florianeckerstorfer opened this issue Dec 20, 2013 · 11 comments
Closed

Add support for Font Awesome #160

florianeckerstorfer opened this issue Dec 20, 2013 · 11 comments
Milestone

Comments

@florianeckerstorfer
Copy link
Member

No description provided.

@bigfoot90
Copy link
Contributor

+1

2 similar comments
@nifr
Copy link
Contributor

nifr commented Jan 23, 2014

👍

@sstok
Copy link

sstok commented Jan 24, 2014

👍

@leoetlino
Copy link

👍!
Even if Bootstrap does not officially support it right now, it's already used by loads of websites and in my opinion, it's better than the Glyphicons.

@sebabouche
Copy link

👍

@florianeckerstorfer
Copy link
Member Author

This should be a least possible through #220, but I would like to add better support.

@llwt
Copy link
Contributor

llwt commented Apr 29, 2014

@florianeckerstorfer I'd be happy to continue work on that aspect of it. Do you have a short list of things you would like to see?

@florianeckerstorfer
Copy link
Member Author

@llwt The main thing is to adapt the braincrafted:bootstrap:install command to copy the files from FontAwesome into the web/ directory.

@nonlux
Copy link
Contributor

nonlux commented Apr 29, 2014

@florianeckerstorfer Why you use assetic for install js, less, css, but install font with your command?

@llwt
Copy link
Contributor

llwt commented May 2, 2014

@florianeckerstorfer I ended up needed to add support for using FontAwesome and Glyphicon simultaneously in addition to a couple other minor things summarized below. I was wondering if you could skim over the commit adding those to my fork and see if they are things you would like to see in the main bundle.

If the changes are deemed needed I can clean everything up, update the docs, and make another pull request just let me know.

Summary of Changes:

  • Change rendering the icon HTML from sprintf to using the default rendering engine
  • Added Icon/span.html.twig and Icon/i.html.twig templates
  • Added shorthand twig functions, gi and fa, for rendering Glyphicon and FontAwesome icons
  • Added configuration options
    • icon_short_methods.enable
    • icon_short_methods.fontawesome_prefix
    • icon_short_methods.glyphicon_prefix
    • icon_template specifying the template used when rendering the icons
  • Added an additional parameter to the twig functions to support adding additional classes to the rendered icons

@florianeckerstorfer
Copy link
Member Author

@llwt This probably should be possible to add support for both to the main repository, but I think that your implementation is a little bit overcomplicated. What do you think about the following approach:

The default icons (set via braincrafted_bootstrap.icon_prefix) work as they do now. However, the icon Twig helper expects a second argument prefix which can be used to change the prefix. The second change would be to adapt the braincrafted:bootstrap:install command to copy both Glyphicons and Font Awesome into the web directory when they exist.

Would this work for you? And could you create a new issue for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants