jacerider/neo_icon
Composer 安装命令:
composer require jacerider/neo_icon
包简介
An IconMoon-based icon manager.
README 文档
README
- Introduction
- Requirements
- Installation
- Drush Commands
- Usage within PHP
- Usage within SCSS
- Icon Definitions
INTRODUCTION
Allow Icomoon icon packages to be utilized within Drupal.
REQUIREMENTS
This module requires no modules outside of Drupal core.
INSTALLATION
Install as you would normally install a contributed Drupal module. Visit https://www.drupal.org/node/1897420 for further information.
DRUSH COMMANDS
neo:icon:list [search] (alias neoi-list) — search the available icon names
for the icon() Twig function (and the IconTrait::icon() helper) so you don't
have to guess. An optional search term filters by substring; --limit caps the
number of results (default 50). Supports --format=json for machine parsing.
# List icons (capped at --limit). drush neo:icon:list # Find icon names containing "arrow". drush neo:icon:list arrow # Widen the result cap. drush neo:icon:list chevron --limit=100
USAGE WITHIN SCSS
A PHP trait has been provided that can be a dropin replacement for the Drupal core StringTranslationTrait.
use Drupal\neo_icon\IconTrait; // Dynamic icon using icon repository. $this->icon('Angel'); // Specific icon by name using weighted library match. $this->icon('Angel', 'drupal'); // Specific icon by name from specific library (if published). If library does // not exist or is not published, a weighted library match will be used. $this->icon('Angel', 'drupal', 'solid'); // Supplying a prefix will filter the dynamic icon repository lookup to only // those definitions that support that prefix. It allows, for example, an icon // to be scoped to only be available in the admin. $this->icon('Angel', NULL, NULL, ['admin']); // If you want to get an get a dynamic icon regardless of the prefix, you can // pass 'any' as the prefix. $this->icon('Angel', NULL, NULL, ['all']);
USAGE WITHIN TAILWIND
Global icon sets can utilitized within Neo Build.
<div class="before:icon-drupal after:icon-drupal">
ICON DEFINITIONS
Dynamic icons can be defined via a MODULE_NAME.neo.icon.yml file.
# A definition that will match any string starting with "drupal". drupal.start: start: icon icon: drupal # A definition that will match any string ending with "drupal". drupal.end: end: icon icon: drupal # A definition that will match any string containing the word "drupal". drupal.word: word: icon icon: drupal # A definition that will match the exact string "drupal". drupal.exact: exact: icon icon: drupal # A weight can be added to the definition to control their lookup order. drupal.weight: exact: icon icon: drupal weight: 10 # A definition with a prefix. Prefix can also be an array of strings. drupal.prefix: start: icon icon: drupal prefix: admin
jacerider/neo_icon 适用场景与选型建议
jacerider/neo_icon 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.96k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 08 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 jacerider/neo_icon 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jacerider/neo_icon 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.96k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2024-08-26