技术大师 / font-awesome
为PHP应用程序提供免费Font Awesome字体
v1.0.2
2020-11-14 15:58 UTC
Requires
- php: >=7.0.0
- fortawesome/font-awesome: *
Requires (Dev)
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2024-09-29 05:48:59 UTC
README
为PHP应用程序提供免费Font Awesome图标。
许可证
本项目采用GNU LGPL 3.0许可证。
安装
通过Composer
composer install technicalguru/font-awesome
通过包下载
您可以从GitHub发布页面下载源代码包。
如何使用
获取提供的版本号
$version = \TgFontAwesome\FontAwesome::getVersion();
获取字体库的URI
以下方法将为您提供用于进一步检查的URI
use TgFontAwesome\FontAwesome;
// Get URI to all icons library, as minified CSS
$uri = FontAwesome::getUri();
// Get URI to all icons library, as uncompressed CSS
$uri = FontAwesome::getUri('all');
// Get URI to all icons library, as minified Javascript
$uri = FontAwesome::getUri('all.min', FontAwesome::JS);
您可以用相同的方式获取要包含在HTML输出中的正确HTML脚本标签
use TgFontAwesome\FontAwesome;
// Get <link> stylesheet tag to all icons library, as minified CSS
$tag = FontAwesome::getLink();
// Get <link> stylesheet tag to all icons library, as uncompressed CSS
$tag = FontAwesome::getLink('all');
// Get <script> tag to all icons library, as minified Javascript
$tag = FontAwesome::getLink('all.min', FontAwesome::JS);
当您请求一个不存在的库时,所有方法都会抛出FontAwesomeException
异常。
贡献
在GitHub问题跟踪器中报告错误、请求增强或发送pull请求。