mirror of
https://github.com/imfing/hextra.git
synced 2025-06-20 13:21:24 -04:00
feat: add support for icon in badge shortcode (#525)
* feat: add icon support to badge shortcodes - Introduced an optional icon parameter to both badge.html files. - Updated the badge rendering to include the icon alongside the content. - Enhanced the layout for better alignment of icon and text. * feat: add new feature shortcode * docs: update badge doc
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
{{- $type := .Get "type" | default "" -}}
|
||||
{{- $class := .Get "class" | default "" -}}
|
||||
{{- $link := .Get "link" | default "" -}}
|
||||
{{- $icon := .Get "icon" | default "" -}}
|
||||
|
||||
{{- if $link -}}
|
||||
<a href="{{ $link }}" title="{{ $content | plainify }}" target="_blank">
|
||||
@ -11,6 +12,7 @@
|
||||
"type" $type
|
||||
"class" $class
|
||||
"border" true
|
||||
"icon" $icon
|
||||
)
|
||||
-}}
|
||||
</a>
|
||||
@ -20,6 +22,7 @@
|
||||
"type" $type
|
||||
"class" $class
|
||||
"border" true
|
||||
"icon" $icon
|
||||
)
|
||||
-}}
|
||||
{{- end -}}
|
||||
|
Reference in New Issue
Block a user