Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/log1x/blade-svg-sage
A simple package to add support for Blade SVG by Adam Wathan to Roots Sage.
https://github.com/log1x/blade-svg-sage
blade blade-directives roots-io sage sage9 svg wordpress
Last synced: 13 days ago
JSON representation
A simple package to add support for Blade SVG by Adam Wathan to Roots Sage.
- Host: GitHub
- URL: https://github.com/log1x/blade-svg-sage
- Owner: Log1x
- License: mit
- Created: 2017-04-09T05:51:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-27T13:52:34.000Z (8 months ago)
- Last Synced: 2024-10-23T13:34:51.902Z (21 days ago)
- Topics: blade, blade-directives, roots-io, sage, sage9, svg, wordpress
- Language: PHP
- Homepage:
- Size: 1.55 MB
- Stars: 73
- Watchers: 11
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Blade SVG for Sage
[![Latest Stable Version](https://poser.pugx.org/log1x/blade-svg-sage/v/stable)](https://packagist.org/packages/log1x/blade-svg-sage) [![Total Downloads](https://poser.pugx.org/log1x/blade-svg-sage/downloads)](https://packagist.org/packages/log1x/blade-svg-sage)
Blade SVG for Sage is a wrapper for [Blade SVG](https://github.com/adamwathan/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**](https://github.com/Log1x/sage-svg).
## Requirements
* [Sage](https://github.com/roots/sage) >= 9.0
* [PHP](https://secure.php.net/manual/en/install.php) >= 7.0
* [Composer](https://getcomposer.org/download/)## Installation
Install via Composer:
```bash
$ composer require log1x/blade-svg-sage
```## Configuration
Use the provided configuration filter below to modify the default configuration.
```php
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](https://github.com/adamwathan/blade-svg#basic-usage) for usage examples.
Note: When calling helper functions directly, you must use the `App` namespace.