UNPKG

entypo

Version:

SVG sprite for the Entypo+ icon collection.

14 lines (11 loc) 352 B
const entypo = require('./') const node = entypo.getNode() document.body.insertBefore(entypo.getNode(), document.body.firstChild) node.querySelectorAll('[id]').forEach(svg => { document.body.innerHTML += ` <div class="icon"> <svg><use xlink:href="#${svg.id}" /></svg> <span>${svg.id.replace('entypo-', '')}</span> </div> ` })