feat: rename custom icon pack from svg to custom

# To use custom SVG icons.
# Place custom SVG icon in `assets/images/icon-pack/`, creating folders if necessary.
[[feature]]
  icon = "beach-sunset"
  icon_pack = "custom"
  name = "Surfing"
  description = "90%"

See #1692
This commit is contained in:
George Cushen committed 2020-05-14 23:46:31 +01:00
1 parent a357b09682
commit 3cb96be5c6
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -43,7 +43,7 @@ subtitle = ""
# Place custom SVG icon in `assets/images/icon-pack/`, creating folders if necessary. # Place custom SVG icon in `assets/images/icon-pack/`, creating folders if necessary.
# [[feature]] # [[feature]]
# icon = "beach-sunset" # icon = "beach-sunset"
# icon_pack = "svg" # icon_pack = "custom"
# name = "Surfing" # name = "Surfing"
# description = "90%" # description = "90%"
+1 -1
View File
@@ -26,7 +26,7 @@
<div class="featurette-icon"> <div class="featurette-icon">
{{- if eq $pack "emoji" -}} {{- if eq $pack "emoji" -}}
{{- . | emojify -}} {{- . | emojify -}}
{{- else if eq $pack "svg" -}} {{- else if eq $pack "custom" -}}
{{- $svg_icon := resources.Get (printf "images/icon-pack/%s.svg" .) -}} {{- $svg_icon := resources.Get (printf "images/icon-pack/%s.svg" .) -}}
{{- if $svg_icon -}}<img src="{{ $svg_icon.RelPermalink }}" alt="{{.}}" class="svg-icon svg-baseline">{{- end -}} {{- if $svg_icon -}}<img src="{{ $svg_icon.RelPermalink }}" alt="{{.}}" class="svg-icon svg-baseline">{{- end -}}
{{- else -}} {{- else -}}