承接 aerni/font-awesome 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

aerni/font-awesome

Composer 安装命令:

composer require aerni/font-awesome

包简介

A Statamic addon to easily add Font Awesome icons.

README 文档

README

Statamic Packagist version Packagist Total Downloads

Font Awesome

This Statamic addon features an icon fieldtype to browse and select Font Awesome 6.x icons. It also comes with a Tag to output selected icons in your template.

Installation

Install the addon using Composer:

composer require aerni/font-awesome

After installation, publish the assets:

php artisan vendor:publish --tag=font-awesome --force

You may publish the config of the package:

php please vendor:publish --tag=font-awesome-config

Configuration

You may choose between using a Kit or hosting Font Awesome yourself.

Kit Driver

If you want to use a Kit, make sure you set the driver option in the config to kit:

'driver' => 'kit'

Next, add your API Token and Kit Token to your .env file:

FA_API_TOKEN=************************************
FA_KIT_TOKEN=************************************

Local Driver

If you would rather host Font Awesome yourself, you may use the local driver:

'driver' => 'local'

Next, download Font Awesome (For The Web) and place the metadata and css directories in the locations defined in the config:

'local' => [
    'metadata' => resource_path('fonts/fontawesome/metadata'),
    'css' => '/fonts/fontawesome/css/all.min.css',
],

Metadata

The files in the metadata directory are required to get the information about the icons. I recommend placing the metadata in the resources directory, as these files don't need to be publicly accessible.

CSS

The css config option defines the public path to the stylesheet that will be loaded in the Control Panel. The stylesheet must be placed in the public directory. The CSS will only be loaded in the Control Panel. You still need to add the stylesheet to your frontend layout yourself.

Usage

Fieldtype

Add the Font Awesome Fieldtype to a Blueprint or Fieldset. The Fieldtype provides a config option that allows you to make only certain icon styles available for selection.

Tag

If you're using the kit driver, add the following Tag to your layout's <head> to render the Font Awesome script.

{{ font_awesome:kit }}

Render an icon by using the handle of a Font Awesome field as the wildcard method.

{{ font_awesome:icon_field }}

You may also use the shorter tag alias instead.

{{ fa:kit }}

{{ fa:icon_field }}

Credits

Developed by Michael Aerni

aerni/font-awesome 适用场景与选型建议

aerni/font-awesome 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 36.53k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2021 年 11 月 18 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「font-awesome」 「statamic」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 aerni/font-awesome 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 aerni/font-awesome 我们能提供哪些服务?
定制开发 / 二次开发

基于 aerni/font-awesome 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 36.53k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 28
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-11-18