log1x/blade-svg-sage

Composer package to add support for Blade SVG by Adam Wathan to Roots Sage.

Fund package maintenance!
Log1x

Installs: 61 201

Dependents: 0

Suggesters: 0

Security: 0

Stars: 71

Watchers: 11

Forks: 12

Open Issues: 0

Type:package

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

This package is auto-updated.

Last update: 2024-03-01 00:06:29 UTC


README

Latest Stable Version Total Downloads

Blade SVG for Sage is a wrapper for Blade SVG by Adam Wathan allowing you to easily use SVG's in your Blade templates, either as an inline SVG or SVG sprite when using Sage 9.

Using Sage 10? Check out Sage SVG.

Requirements

Installation

Install via Composer:

$ composer require log1x/blade-svg-sage

Configuration

Use the provided configuration filter below to modify the default configuration.

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

Usage

Please refer to the original Blade SVG documentation for usage examples.

Note: When calling helper functions directly, you must use the App namespace.