jekyll-uj-powertools 1.7.8 → 1.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/jekyll-uj-powertools.gemspec +1 -1
- data/lib/tags/icon.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8946df06f9ff9ff4de4bbb7566928462e64736badf6a6900d817d2312cd39c85
|
|
4
|
+
data.tar.gz: 871c60f06351aad8001c10f93febe0aafb6f5a2b3d488e4a0befc966efe68f32
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: caa39030a002f773855dc36f8617188d42d429a7c31ff9bf7ad41a86c60a31b0dc2258581990a9c577aad9521028e7c511db639500554111997ffb7d23f530bf
|
|
7
|
+
data.tar.gz: '05308773511835643c641184e7960634e4e9858977161f8e574c8e835a2cccfc213884321c655acf4b66c189a37053fe554d99bd8377d0edccc112eb850cf0c9'
|
data/README.md
CHANGED
|
@@ -231,6 +231,7 @@ A custom Liquid tag that renders a Font Awesome icon with the specified style an
|
|
|
231
231
|
```liquid
|
|
232
232
|
{% uj_icon "rocket", "fa-lg me-2" %}
|
|
233
233
|
```
|
|
234
|
+
The rendered `<i>` element includes a `data-icon` attribute set to the resolved icon name (e.g. `<i class="fa fa-lg me-2" data-icon="rocket">...</i>`), making it easy to target specific icons in CSS or JS via `[data-icon="rocket"]`.
|
|
234
235
|
|
|
235
236
|
### `uj_logo` Tag
|
|
236
237
|
A custom Liquid tag that renders company logos from the Ultimate Jekyll Manager assets. It supports brandmarks and combomarks in various colors.
|
data/lib/tags/icon.rb
CHANGED
|
@@ -110,10 +110,11 @@ module Jekyll
|
|
|
110
110
|
# end
|
|
111
111
|
|
|
112
112
|
# Wrap in i tag with CSS classes (always include 'fa' class)
|
|
113
|
+
data_attr = " data-icon=\"#{icon_name}\"" if icon_name && !icon_name.empty?
|
|
113
114
|
if css_classes && !css_classes.empty?
|
|
114
|
-
"<i class=\"fa #{css_classes}\">#{processed_svg}</i>"
|
|
115
|
+
"<i class=\"fa #{css_classes}\"#{data_attr}>#{processed_svg}</i>"
|
|
115
116
|
else
|
|
116
|
-
"<i class=\"fa\">#{processed_svg}</i>"
|
|
117
|
+
"<i class=\"fa\"#{data_attr}>#{processed_svg}</i>"
|
|
117
118
|
end
|
|
118
119
|
end
|
|
119
120
|
|