summaryrefslogtreecommitdiffstats
path: root/tpl/objects/icon.pug
blob: 1ed605255925c6359e792407c03dfe469d88315a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
mixin icon(id)
    -
        let href    = 'icons.svg#' + id
        let classes = {
            'o-icon':        true,
            'o-icon--block': attributes.block,
        }
        if (attributes.class) {
            classes[attributes.class] = true;
        }

    svg(class=classes width='1em' height='1em')
        use(href=href)