Update to font awesome 4.3.0
PermalinkOr is it enough to overwrite the fontawesome.css in the core?
In your theme folder you should have a file that is called page_theme.php
In there you should have a function call like this:
public function registerAssets() { ..... ..... $this->requireAsset('css', 'font-awesome'); ..... ..... }
If you change this to:
public function registerAssets() { ..... ..... $this->providesAsset('css', 'font-awesome'); ..... ..... }
And then simply load font-awesome directly in your theme.
/Michael
I ask me about the original awesome folder...:
In it, we have 4 folders (css, font, less, scss)
I done a css folder in my personnal theme, and put in this the 4 folders, but my source code of my page still show use of font-awesome 4.2...
Can somebody explain precisely the destination folder to do overwriting operationnal ?
Thanks.
I understood just now that call of css or js are needed in html template, with providesAsset() in page-theme.php...
Subject closed 4 me...
I remember what I done;
In my page_theme.php, I just put:
$this->providesAsset( 'css', 'font-awesome' );
So, only my /my_theme/element/header_top.php work:
<?php echo $html->css( $view->getStylesheet( 'font-awesome/css/font-awesome.css' ) ) ?>
I don't need to have the font-awesome 4.2 and the 4.3 in same time...
I see all is well and in my template (header or footer), i can use the new icons of version 4.3 (y) !
But, if I try to use them in a block, i will use block/feature...
And in this block, the system goes on and use only version 4.2...
Note that in the controller of this block, we can see:
$iconLessFile = DIR_BASE_CORE . '/css/build/vendor/font-awesome/variables.less';
So, I copy all blocks/feature of concrete/ in application/ to overwrite it...
In this block, in controller.php, methods registerViewAssets and edit, we can find:
$this->requireAsset( 'css', 'font-awesome' );
That can explain the c5.7 always use font-awesome he knows (version 4.2) and no my font-awesome I put in my: my_theme/css/
Then, I wanted to change requireAsset with providesAsset() for this font-awesome...
But the script explain he can't
Note that I wrote after ma new "namespace Application\Block\Feature;" and after the other uses:
use Application\Theme\my_theme;
How to do my overwited block feature to able to use my font-awesome of my theme/css ?
Thanks if someone could understand my explaination and solve this trouble...
and add your new font-awesome css in there and make sure it is named:
font-awesome.css
If it works you'll just be overriding the file in the /concrete/css directory. Like I said I haven't tried this but I have used the same method to override some of the core javascripts and it worked.