定制 mundgold/svg-tag-unique-id 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

mundgold/svg-tag-unique-id

最新稳定版本:v1.0.6

Composer 安装命令:

composer require mundgold/svg-tag-unique-id

包简介

This Statamic 4+ addon extends the functionality of the original SVG tag by introducing a new attribute, replace_ids. When this attribute is added to the SVG tag, the addon automatically prefixes all IDs within the SVG with a unique identifier, preventing conflicts with duplicate IDs from multiple e

README 文档

README

This Statamic addon extends the functionality of the original SVG tag by introducing a new attribute, replace_ids="true". When this attribute is added to the SVG tag, the addon automatically prefixes all IDs within the SVG with a unique identifier, preventing conflicts with duplicate IDs from multiple embedded SVGs on a single page.

Why Use This Addon?

Avoid ID conflicts when embedding multiple SVGs on a single page. This addon provides a convenient solution to ensure unique IDs within SVG elements, enhancing compatibility and preventing unintended styling or scripting issues.

How to Install

You can run the following command from your project root:

composer require mundgold/svg-tag-unique-id

How to Use

Simply include the replace_ids="true" attribute in your Statamic SVG tag:

{{ svg replace_ids="true" path="path/to/your/svg/file.svg" }}

License

This addon is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 35
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-19