-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvartheme_bs5.icons.yml
More file actions
77 lines (76 loc) · 2.18 KB
/
Copy pathvartheme_bs5.icons.yml
File metadata and controls
77 lines (76 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
bootstrap_icons:
enabled: true
label: "Bootstrap icons"
description: "General Bootstrap Icons available within the Vartheme BS5 theme."
links:
- https://icons.getbootstrap.com/#usage
version: 1.13.1
license:
name: MIT
url: https://github.com/twbs/icons/tree/main?tab=MIT-1-ov-file
gpl-compatible: true
extractor: svg
config:
sources:
- images/icons/*.svg
# settings:
# size:
# title: "Size"
# type: "integer"
# default: 32
# color:
# title: "Color"
# type: "string"
# format: "color"
# class:
# title: "Class"
# type: "string"
template: >-
{# Accessible SVG wrapper for extracted icons. #}
{% set svg_attributes = attributes
.setAttribute('viewBox', attributes.viewBox|default('0 0 16 16'))
.setAttribute('width', size|default('32'))
.setAttribute('height', size|default('32'))
.setAttribute('role', 'img')
%}
{% if alt|default('')|trim %}
{% set svg_attributes = svg_attributes
.setAttribute('aria-label', alt|trim)
.setAttribute('aria-hidden', 'false')
%}
{% else %}
{% set svg_attributes = svg_attributes.setAttribute('aria-hidden', 'true') %}
{% endif %}
<svg{{ svg_attributes }}>
{{ content }}
</svg>
vartheme_social:
enabled: true
label: "Vartheme social"
description: "Brand-coloured social platform icons that ship with Vartheme BS5."
version: 1.0.0
license:
name: GPL-2.0-or-later
gpl-compatible: true
extractor: svg
config:
sources:
- images/icons/social/*.svg
template: >-
{% set svg_attributes = attributes
.setAttribute('viewBox', attributes.viewBox|default('0 0 16 16'))
.setAttribute('width', size|default('20'))
.setAttribute('height', size|default('20'))
.setAttribute('role', 'img')
%}
{% if alt|default('')|trim %}
{% set svg_attributes = svg_attributes
.setAttribute('aria-label', alt|trim)
.setAttribute('aria-hidden', 'false')
%}
{% else %}
{% set svg_attributes = svg_attributes.setAttribute('aria-hidden', 'true') %}
{% endif %}
<svg{{ svg_attributes }}>
{{ content }}
</svg>