log1x/blade-svg-sage

Composer 包,用于为 Roots Sage 添加 Adam Wathan 的 Blade SVG 支持。

资助包维护!
Log1x

安装次数: 66 104

依赖项: 0

建议者: 0

安全: 0

星标: 71

关注者: 11

分支: 13

开放问题: 1

类型:package

v3.0.0 2023-10-01 05:31 UTC

This package is auto-updated.

Last update: 2024-08-30 01:05:59 UTC


README

Latest Stable Version Total Downloads

Blade SVG for Sage 是 Adam Wathan 的 Blade SVG 的包装器,允许您在 Sage 9 中轻松使用 SVG,无论是内联 SVG 还是 SVG 精灵。

使用 Sage 10 吗? 查看以下内容 Sage SVG

要求

安装

通过 Composer 安装

$ composer require log1x/blade-svg-sage

配置

使用以下提供的配置过滤器修改默认配置。

add_filter('bladesvg', function () {
    return [
        'svg_path' => 'resources/svg',
        'spritesheet_path' => 'resources/svg/spritesheet.svg',
        'spritesheet_url' => '',
        'sprite_prefix' => '',
        'inline' => true,
        'class' => ''
    ];
});

用法

请参阅原始的 Blade SVG 文档 以获取用法示例。

注意:在直接调用辅助函数时,您必须使用 App 命名空间。