diff options
Diffstat (limited to 'tpl/objects/icon.pug')
| -rw-r--r-- | tpl/objects/icon.pug | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tpl/objects/icon.pug b/tpl/objects/icon.pug index 0e444f9..494abf6 100644 --- a/tpl/objects/icon.pug +++ b/tpl/objects/icon.pug | |||
| @@ -1,7 +1,12 @@ | |||
| 1 | mixin icon(id) | 1 | mixin icon(id) |
| 2 | - | 2 | - |
| 3 | let href = 'icons.svg#' + id | 3 | let href = 'icons.svg#' + id |
| 4 | let classes = attributes.class ? attributes.class : '' | 4 | let classes = { |
| 5 | 'o-icon': true | ||
| 6 | } | ||
| 7 | if (attributes.class) { | ||
| 8 | classes[attributes.class] = true; | ||
| 9 | } | ||
| 5 | 10 | ||
| 6 | svg(class=['o-icon', classes] width='1em' height='1em') | 11 | svg(class=classes width='1em' height='1em') |
| 7 | use(href=href) | 12 | use(href=href) |
