summaryrefslogtreecommitdiffstats
path: root/tpl/objects/icon.pug
blob: 80273b05dadac2d2ca7c2e6b8b665db5cf205854 (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="1.142857143em" height="1.142857143em" aria-hidden="true")
        use(href=href)