gulp-iconify icon indicating copy to clipboard operation
gulp-iconify copied to clipboard

Overwrite template for output

Open ttomdewit opened this issue 8 years ago • 1 comments

Hi,

I'd like to overwrite the default template (using styleTemplate). What I'd really like it to have is one template for my PNG output, and one template for the SVG output.

I'm using Modernizr, which is adding the no-svg class to browsers that do not support SVG. If I overwrite the default template both PNG and SVG will use said template.

Ideal situation:

_icons.svg.scss

.icon {
    background-repeat: no-repeat;

    {{#items}}
    &.icon-{{slug}} {
        background-image: url('{{{datauri}}}');
    }

    {{/items}}
}

_icons.png.scss

.no-svg .icon {
    background-repeat: no-repeat;

    {{#items}}
    &.icon-{{slug}} {
        background-image: url('{{{datauri}}}');
    }

    {{/items}}
}

Please also notice the _ that prepends the filenames (see issue #16).

ttomdewit avatar Dec 25 '15 22:12 ttomdewit

Any news on this Issue?

ttomdewit avatar Jan 29 '16 13:01 ttomdewit