romulinux/favicon-generator
最新稳定版本:1.0.8
Composer 安装命令:
composer require romulinux/favicon-generator
包简介
Image and html generator for favicon and app icon on your site.
README 文档
README
Image and html generator for favicon and app icon on your site.
requirements:
php 7.2 and php7.2-gd
usage:
Local php server:
php -S localhost:8888 # access this link on your browser
In your project, include this code in your composer.json:
"minimum-stability": "dev", "prefer-stable": true, "require": { "romulinux/favicon-generator": ">=1.0.0" }
Calling in your php project:
<?php use Favicon\FaviconImageGenerator as FaviconImageGenerator; use Favicon\FaviconHtmlGenerator as FaviconHtmlGenerator; $applicationName = 'Teste'; $faviconDir = 'assets/icons/'; $msapplicationTileColor = '#FFF'; $themeColor = '#FFF'; $titleBarColor = '#FFF'; echo '<head>'; $faviconHtmlGenerator = new FaviconHtmlGenerator($applicationName, $faviconDir, $msapplicationTileColor, $themeColor, $titleBarColor); echo $faviconHtmlGenerator->generate(); echo '</head>'; ?>
And for generate the favicon and app images in dir 'assets/icons' write this:
<?php $faviconImageGenerator = new FaviconImageGenerator($faviconDir, 'assets/img/favicon.png', 'assets/img/favicon.png'); $faviconImageGenerator->generate(); ?>
This code will generate the images using the 'assets/img/favicon.png' image and put the output in dir 'assets/icons/'
统计信息
- 总下载量: 23.21k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: mit
- 更新时间: 2018-12-10