Skip to content

Commit 0fd9157

Browse files
authored
Refactored to "icon" shortcode instead of "fe" (#309)
* Icon: Refactored to icon shortcode instead of fe + updated old icon code * Icon: Fixed lucide partial * Icon: Removed feather references
1 parent 115c078 commit 0fd9157

File tree

13 files changed

+15
-45
lines changed

13 files changed

+15
-45
lines changed

exampleSite/content/test-product/feather/_index.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

exampleSite/content/test-product/feather/permitted.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

exampleSite/content/test-product/lucide/permitted.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,16 @@ weight: 100
66

77
[Lucide Icons](https://lucide.dev/) is a free icon library with a permissive license (MIT). We use it for our minimal icon needs in place of FontAwesome in Oldframe.
88

9-
{{<fe "book-headphones">}}
9+
{{<icon "book-headphones">}}
1010

11-
[Lucide link{{<fe "circle">}}](#)
11+
[Lucide link{{<icon "circle">}}](#)
1212

13-
{{<fe "circle">}} in text.
13+
{{<icon "circle">}} in text.
14+
15+
{{<icon-bug>}}
16+
{{<icon-feature>}}
17+
{{<icon-info>}}
18+
{{<icon-resolved>}}
1419

1520
Here are some icons that are using font-awesome but should be backwards compatible:
1621
<i class="fa-solid fa-check" style="color:green"></i>
@@ -54,5 +59,5 @@ Here are some icons that are using font-awesome but should be backwards compatib
5459
<i class="fa fa-chevron-down"></i>
5560
<i class="fas fa-flask fa-lg beta-icon"></i>
5661
{{<warning>}}
57-
This is a Warning callout. There was previously a bug with **bold text** that we should be aware of and continue to check for. This callout was invoked with the `<warning>` shortcode. It has no custom title. {{<fe "octagon-alert">}}
62+
This is a Warning callout. There was previously a bug with **bold text** that we should be aware of and continue to check for. This callout was invoked with the `<warning>` shortcode. It has no custom title. {{<icon "octagon-alert">}}
5863
{{</warning>}}

layouts/partials/callout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<blockquote class="{{ $class }}" data-grid="{{ $dataGrid }}">
3737
<div>
3838
<div class="call-out-type">
39-
{{ partial "feather" (dict "context" . "icon" $icon) .}}
39+
{{ partial "lucide" (dict "context" . "icon" $icon) .}}
4040
{{ $title }}
4141
</div>
4242
<div class="callout-content">

layouts/partials/feather.html

Lines changed: 0 additions & 5 deletions
This file was deleted.

layouts/partials/lucide.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
{{- /* Usage: */ -}}
22
{{- /* (dict "context" . "icon" "circle") */ -}}
3-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-hidden="true" class="lucide"
4-
style="{{ .style | safeCSS }}">
5-
<use href="/images/lucide-sprite.svg#{{ .icon }}"></use>
6-
</svg>
3+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" aria-hidden="true" class="lucide" style="{{ .style | safeCSS }}"><use href="/images/lucide-sprite.svg#{{ .icon }}"></use></svg>

layouts/shortcodes/fa.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

layouts/shortcodes/icon-bug.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<i class="fa-solid fa-bug" style="color:#E4002B"></i>
1+
{{ partial "lucide" (dict "context" . "icon" "bug" "style" "color:#E4002B") }}

layouts/shortcodes/icon-feature.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<i class="fa-solid fa-file-circle-plus" style="color:#009639"></i>
1+
{{ partial "lucide" (dict "context" . "icon" "file-plus" "style" "color:#009639") }}

layouts/shortcodes/icon-info.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<i class="fa-solid fa-circle-info" style="color:#1d9cd3;"></i>
1+
{{ partial "lucide" (dict "context" . "icon" "info" "style" "color:#1d9cd3") }}

0 commit comments

Comments
 (0)