mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 20:15:25 +00:00
fix(biography): make status.icon optional in resume-biography block
Add explicit type checking and proper trimming for status icon extraction to match the more robust pattern used in resume-biography-3. Fixes issue where users couldn't omit the emoji status badge.
This commit is contained in:
1 parent
a17fc859f9
commit
58f7dcdaf9
2 files changed
+5
-2
No files matched your search
@@ -166,7 +166,7 @@
|
||||
{{ if and $status (reflect.IsMap $status) }}
|
||||
{{ $status_icon_raw := index $status "icon" }}
|
||||
{{ if eq (printf "%T" $status_icon_raw) "string" }}
|
||||
{{ $status_icon = $status_icon_raw }}
|
||||
{{ $status_icon = strings.TrimSpace $status_icon_raw }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
@@ -163,7 +163,10 @@
|
||||
{{ $status_icon := "" }}
|
||||
{{ with $profile.status }}
|
||||
{{ if reflect.IsMap . }}
|
||||
{{ with index . "icon" }}{{ $status_icon = strings.TrimSpace (printf "%v" .) }}{{ end }}
|
||||
{{ $icon_raw := index . "icon" }}
|
||||
{{ if eq (printf "%T" $icon_raw) "string" }}
|
||||
{{ $status_icon = strings.TrimSpace $icon_raw }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
Reference in new issue
Block a user