Just a small component I've made as an exercise and for fun which make available FontAwesome icons to Yii and don't collide with Bootstrap's Glyphicons.
Created and Tested with Yii 1.1.12.
Extract the zip contents to a folder. Example: ext.EFontAwesome
Add the following code to config/main.php
... 'preload' => array( ... 'efontawesome', ... ), ... // application components 'components' => array( 'efontawesome' => array( 'class' => 'ext.EFontAwesome.components.EFontAwesome', ), ), ...
How to use it:
Example taken from FontAwesome site:
Note:
The classes defined by FontAwesome are like: "icon-xxx". To use it, you must reference the icons as "icon-fa-xxx"
Total 14 comments
This is my code: I cannot make large icons work.
Thank you for your work!
first good work! second the light bulb doesn't appear. Are you using the third version? can you update it?
You have a small bug in EFontAwesome.php. You're using
This is immediate function exit, so in case of console application, your component won't call
parent::init();, which isn't the best idea, after all.You may use for example:
or anything similar.
Hello, don't work resize classes, and classes like .icon-fa-2x don't determined in css file. mb i do something wrong?
Im stupid haha icon-fa-large etc works just fine:)
Try icon-fa-large, ... Works for me.
Only the default size works for me, icon-fa-envelope for example but not icon-fa-envelope icon-large or icon-2x and so on. Would like those to.
Thank you very much. I'll update ASAP.
Thanks for this awesome extension.
I just updated the assets so i can use the newest version of Font Awesome. There is nice new stuff with it. Maybe you should update the assets too :D
Greetings
For being a supporter!
Hi Guys,
Its very simple:
Instead of using class="icon-xxx"
You must use class="icon-fa-xxx"
By: EFontAwesome
Working very well
Please let me know if it works Ok.
Finally, many icons in bootstrap
Leave a comment
Please login to leave your comment.