I need to make simple html page, something like stylesheet for icons.
Gulp task 'iconfont' generate glyph fonts out of svg icons with this code:
gulp.task('iconfont', function(){
return gulp.src(['assets/svg/*.svg'])
.pipe(iconfontCss({
fontName: 'my-icons',
cssClass: 'icon',
path: 'conf/icon-font.scss',
targetPath: '../../scss/layout/_icon-font.scss',
fontPath: '../fonts/'
}))
.pipe(iconfont({
fontName: 'my-icons',
prependUnicode: false,
formats: ['ttf', 'eot', 'woff'],
normalize: true,
centerHorizontally: true
}))
.on('glyphs', function(glyphs, options) {
// CSS templating, e.g.
console.log(glyphs, options);
})
.pipe(gulp.dest('assets/fonts/'));
});
And generates .icon-font scss file with classes:
.icon-calendar {
@include icon(calendar);
}
.icon-circle {
@include icon(circle);
}
.icon-sun {
@include icon(sun);
}
.icon-home {
@include icon(home);
}
Is it possible then to generate simple html page, containing elements with these class names:
<i class="icon-calendar">.icon-calendar</i>
<i class="icon-circle">.icon-circle</i>
<i class="icon-sun">.icon-sun</i>
<i class="icon-home">.icon-home</i>