rmrevin / yii2-fontawesome Goto Github PK
View Code? Open in Web Editor NEWAsset Bundle for Yii2 with Font Awesome http://fortawesome.github.io/Font-Awesome/
License: MIT License
Asset Bundle for Yii2 with Font Awesome http://fortawesome.github.io/Font-Awesome/
License: MIT License
https://github.com/rmrevin/yii2-fontawesome/blob/master/composer.json#L29
Some extensions are used in font-awesome. as follows:
"font-awesome": ">=4.1.0"
Finally installed a font-awesome and fontawesome
It is recommended that the name agree with this
https://github.com/FortAwesome/Font-Awesome/blob/master/bower.json
I'm facing a challenge whereby I would like in case a user is going for a leave for a certain period of time they can delegate their roles to another user in the active directory or database. Kindly if you can direct me on this I would appreciate or even share your sources. I'm using yii2.
Invalid Parameter – yii\base\InvalidParamException
The file or directory to be published does not exist: \vendor\bower/fontawesome
change in \vendor\rmrevin\yii2-fontawesome\AssetBundle.php row 20
from
public $sourcePath = '@bower/fontawesome';
on
public $sourcePath = '@bower/bower-asset/fontawesome';
There is fa-xs, fa-sm, fa-7x, fa-10x but size() method throw error:
FontAwesome::size() - invalid value. Use one of the constants: FontAwesome::SIZE_LARGE, FontAwesome::SIZE_2X, FontAwesome::SIZE_3X, FontAwesome::SIZE_4X, FontAwesome::SIZE_5X.
Wait for the upgrade to FontAwesome 5?
[RuntimeException]
Could not load package rmrevin/yii2-fontawesome in http://packagist.org: [UnexpectedValueException] Could
not parse version constraint v4.1.: Invalid version string "v4.1."
[UnexpectedValueException]
Could not parse version constraint v4.1.: Invalid version string "v4.1."
The latest FA releases have a changed directory structure making the asset bundles invalid.
Provide next html:
with proper :before elements, but doesn't render anything: http://puu.sh/BG3Vi/879c8feccd.png
Phone \ envelope icons renders fine.
extension version: 3.2.0 - 2018-09-17
php 7.2.0 yii2 2.0.15, chrome 69
I think it is better to use bower instead of clone the source. It's cleaner and lighter. When using bower, as the source of the assets, users don't need to download unnecessary assets (ex: src).
"require": {
"bower-asset/fontawesome": ">=4.3.0"
},
and
public $sourcePath = '@bower/fontawesome';
In windows, we use "". It seems the pregmatch function in init() function should copy whether use "/" or "".
The problem is in the AssetBundle function init()
.
https://github.com/rmrevin/yii2-fontawesome/blob/master/composer.json#L26
Do you need php 5.5 for this project? Since its merely an asset wouldnt 5.4 suffice (yii2 is compatible with it as well).
new version font awesome is 4.6.3. Update your asset pls
In trying to re-create the cameras banned example at Font Awesome Examples I've found that yii2-fontawesome doesn't offer a way to change the order of the items in an icon stack.
This image shows my results...
The code from the examples page is...
<span class="fa-stack fa-lg">
<i class="fa fa-camera fa-stack-1x"></i>
<i class="fa fa-ban fa-stack-2x text-danger"></i>
</span>
& gives the first icon in the image.
If I assemble my own stack with...
<span class="fa-stack fa-lg">
<?= FA::i('camera')->addCssClass('fa-stack-1x') ?>
<?= FA::i('ban')->addCssClass('fa-stack-2x')->addCssClass('text-danger') ?>
</span>
I get the 2nd icon in the image.
Using...
<?php
$camera = 'camera';
$ban = FA::i('ban')->addCssClass('text-danger');
$options = ['class' => 'fa-lg'];
echo FA::stack($options)->on($ban)->icon($camera);
?>
or...
<?php
$camera = 'camera';
$ban = FA::i('ban')->addCssClass('text-danger');
$options = ['class' => 'fa-lg'];
echo FA::stack($options)->icon($camera)->on($ban);
?>
gives HTML...
<span class="fa-lg fa-stack">
<i class="fa fa-ban text-danger fa-stack-2x"></i>
<i class="fa fa-camera fa-stack-1x"></i>
</span>
& the 3rd icon in the image.
The difference is only the order of the 2 icons. In the Font Awesome example, 'camera' with class 'fa-stack-1x' is the first icon, & 'ban' with class 'fa-stack-2x' is the 2nd (top, & also larger) icon.
In https://github.com/rmrevin/yii2-fontawesome/releases the latest release is marked as 2.15.0 but there are several newer releases since then. In composer if you require something like ~2.9 it gets 2.15 instead of 2.17.1. Why is 2.15.0 marked as the latest release instead of 2.17.1?
It would be nice to have the ability to stack icon and text, as described here.
FAS::stack()
->on(FAS::icon(FAS::_CIRCLE)->size(FAS::SIZE_3X))
->icon(FAB::icon(FAB::_TWITTER)->inverse()->size(FAS::SIZE_3X))
The circle does not get bigger. AFAIK the Stack::__toString() method does not allow such changed. Stacks work only with a single size. How can I enlarge the stack the right way?
I would suggest the feature to set the size of a stack as well: e.g. with
FAS::stack()->size(FAS::SIZE_3X))
->on(FAS::icon(FAS::_CIRCLE))
->icon(FAB::icon(FAB::_TWITTER)->inverse())
The icon should be one size smaller than the circle automatically.
Also inverting the icon could be done automatically.
Доброго времени суток.
В шаблоне "yii2-app-advanced" при подключении через
class AppAsset extends AssetBundle
{
// ...
public $depends = [
// ...
'\rmrevin\yii\fontawesome\AssetBundle'
];
}
php 5.4.43, выдает ошибку
An Error occurred while handling another error: exception 'yii\base\InvalidConfigException' with message 'A circular dependency is detected for bundle 'frontend\assets\AppAsset'.' in /var/www/.../vendor/yiisoft/yii2/web/View.php:293
Я так подозреваю, что лечится переименованием класса AssetBundle
в (например) FontAwesomeBundle
что бы не было Циклических зависимостей в пространстве имен
Пользуюсь CDNAssetBundle
...
Зачем грузить библиотеку дважды?
тут
и тут
или это переходной релиз?
how to use local css file in version 3.2?
HI,
just curious...
If I buy a license for the Pro Version of the font, what would be the workflow then?
Would this be supported somehow?
Thanks.
The change log says "Font Awesome updated to version 5.7.1" but if we look at this file (from tag 3.3.0), then this is actually version 5.3.1.
Please fix this so that I can use some of the new icons added in this release.
Also version 3.3.0 is not marked as the latest version.
Please, update "bower-asset/font-awesome" version to at least "~5.1"
Ul список формируется, как
<ul class="fa-ul">
<li><i class="fa-li fa fa-check-square"></i>List icons</li>
<li><i class="fa-li fa fa-check-square"></i>List icons</li>
</ul>
или
<ul class="fa-ul">
<li><?= FA::icon('check-square')->li() ?> List icons</li>
<li><?= FA::icon('check-square')->li() ?> List icons</li>
</ul>
как видно, для ul нужен только один класс, без иконки. Вместе с тем метод ul() требует иконки.
https://github.com/rmrevin/yii2-fontawesome/blob/master/component/Icon.php#L89
да и воспользоваться им в таком виде не предоставляется возможным, т.к. внутри ul есть еще список из li
может привести список к виду
FA::ul()->open();
FA::li(FA::icon('check-square')->li() . 'List icons');
FA::li(FA::icon('check-square')->li() . 'List icons');
................
FA::ul()->close();
Доброго времени суток.
CDNAssetBundle
подключает версию 4.3.0 - сейчас уже версия 4.4.0 с новыми иконками...
AssetBundle only adds css to result page. Fonts are not loaded, so icons doesn't work.
one way to avoid this problem - is to copy fonts to web dir, and make own css with fonts description.
Yii2 doesn't allow publish any files except css and js via assets mechanism, so, it's necessary to find a way to publish this files.
I was installing yii-starter-kit/yii2-file-kit and this package was installed as a dependency.
It is giving me this error
Failed to instantiate component or class "rmrevin\yii\fontawesome\NpmFreeAssetBundle".
↵
Caused by: ReflectionException
Class rmrevin\yii\fontawesome\NpmFreeAssetBundle does not exist
If manually download the missing file then I get a different error.
Invalid Argument – yii\base\InvalidArgumentException
The file or directory to be published does not exist: /var/www/site/vendor/fortawesome/font-awesome
Hi,
just intstalled this exentsion.
But I get an error:
"Class FAR not found".
can it be that this is wrong (coming from your exmaples):
use rmrevin\yii\fontawesome\FA;
Should this be:
use rmrevin\yii\fontawesome\FAR; ?
This would not throw the error anymore, but does not show an icon but a broken character.
thanks,
gb5256
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.