romulinux/favicon-generator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: mit
  • 更新时间: 2018-12-10