summaryrefslogtreecommitdiffstats
path: root/tpl/objects/icon.pug
blob: 67bcf37f80e0c6993af9a5f1fea3cd5cff7ddbab (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,
            'u-d-block': attributes.block,
        }
        if (attributes.class) {
            classes[attributes.class] = true;
        }

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