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
其他信息
- 授权协议: MIT
- 更新时间: 2024-01-19