New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

josh-taylor/sage-svg

WordPress package to enable a blade directive to use SVG images inline with Sage 9
46,556 18
Install
composer require josh-taylor/sage-svg
Latest Version:0.2.0
License:MIT
Last Updated:Aug 31, 2018
Links: GitHub  ·  Packagist
Maintainer: josh-taylor

Sage SVG

Easily use SVG images in your Sage 9 Blade templates.

This repository is a wrapper for Adam Wathan's 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 first!

<a href="https://github.com/josh-taylor/sage-svg/blob/HEAD/settings">
    @svg('cog', 'icon-lg') Settings
</a>

<!-- Renders -->
<a href="https://github.com/josh-taylor/sage-svg/blob/HEAD/settings">
    <svg class="icon icon-lg" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
        <!-- ... -->
    </svg>
</a>

For more advanced usage you can check out Adam's repository.

The only thing this libary does not support at the moment is non-inline SVG. But this is better 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.

Related Packages

lunar-build/sage-lib

Library files for Sage Starter Theme, forked by Lunar Build to support PHP8.1

25,571 0
snapwp/snap-core

Core files for Snap

6,123 4
jjgrainger/posttypes

Simple WordPress custom post types.

656,580 373
paulbunyannet/wordpress-artisan

Artisan commands to interact with Wordpress

21,496 0
voceconnect/voce-post-meta

Easily create post metaboxes and add fields

19,962 6

Version History

Version Released License
0.2.0 MIT
0.1.0 MIT