Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josh-taylor/sage-svg
WordPress package to enable a blade directive to use SVG images inline with Sage 9
https://github.com/josh-taylor/sage-svg
composer-package sage svg svg-icons wordpress wordpress-packagist
Last synced: 2 months ago
JSON representation
WordPress package to enable a blade directive to use SVG images inline with Sage 9
- Host: GitHub
- URL: https://github.com/josh-taylor/sage-svg
- Owner: josh-taylor
- License: mit
- Created: 2017-06-27T15:07:06.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-31T10:06:20.000Z (over 6 years ago)
- Last Synced: 2024-09-28T12:03:43.482Z (3 months ago)
- Topics: composer-package, sage, svg, svg-icons, wordpress, wordpress-packagist
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 18
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sage SVG
Easily use SVG images in your [Sage 9](https://roots.io/sage) Blade templates.
This repository is a wrapper for Adam Wathan's [Blade SVG](https://github.com/adamwathan/blade-svg) for Laravel, so a
lot of the concepts from that repository are the same.## Installation
You can install this package via Composer by running this command in the root of your Sage 9 installation.
```
composer require josh-taylor/sage-svg
```## Getting Started
The package will automatically register a blade directive to inline your SVGs.
Place all your SVGs inside `resources/assets/icons` in your Sage 9 installation and you are good to go. **Recommend to run all your SVGs through [SVGO](https://jakearchibald.github.io/svgomg/) first!**
```html
@svg('cog', 'icon-lg') SettingsFor more advanced usage you can check out [Adam's](https://github.com/adamwathan/blade-svg) repository.
The only thing this libary does not support at the moment is non-inline SVG. But this is
[better](https://css-tricks.com/pretty-good-svg-icon-system/) anyway right?## Credits
Most of the work of this repository is down to Adam Wathan. This is just a wrapper to get it work with Sage 9 blade
templates.