mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-11 03:12:56 +00:00
fix(biography): fix Resume section spacing and implement show_status option
- Use design.spacing.padding to remove top padding on biography section with banner image (previously caused a large 96px gap above the banner) - Add proper vertical spacing (mt-4) between bio text and Download Résumé button - Implement design.show_status option in both biography and biography-3 blocks (config was accepted but never checked — status emoji always rendered)
This commit is contained in:
1 parent
060a7e41fe
commit
73f56fc1aa
3 files changed
+27
-11
No files matched your search
@@ -164,11 +164,18 @@
|
||||
|
||||
{{/* Avatar */}}
|
||||
{{ $status_icon := "" }}
|
||||
{{ $status := $profile.status }}
|
||||
{{ if and $status (reflect.IsMap $status) }}
|
||||
{{ $status_icon_raw := index $status "icon" }}
|
||||
{{ if eq (printf "%T" $status_icon_raw) "string" }}
|
||||
{{ $status_icon = strings.TrimSpace $status_icon_raw }}
|
||||
{{ $show_status := true }}
|
||||
{{ $show_status_raw := index $design "show_status" }}
|
||||
{{ if eq (printf "%T" $show_status_raw) "bool" }}
|
||||
{{ $show_status = $show_status_raw }}
|
||||
{{ end }}
|
||||
{{ if $show_status }}
|
||||
{{ $status := $profile.status }}
|
||||
{{ if and $status (reflect.IsMap $status) }}
|
||||
{{ $status_icon_raw := index $status "icon" }}
|
||||
{{ if eq (printf "%T" $status_icon_raw) "string" }}
|
||||
{{ $status_icon = strings.TrimSpace $status_icon_raw }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
@@ -161,11 +161,18 @@
|
||||
{{ $profile_bio := "" }}
|
||||
{{ with $profile.bio }}{{ $profile_bio = strings.TrimSpace (printf "%v" .) }}{{ end }}
|
||||
{{ $status_icon := "" }}
|
||||
{{ with $profile.status }}
|
||||
{{ if reflect.IsMap . }}
|
||||
{{ $icon_raw := index . "icon" }}
|
||||
{{ if eq (printf "%T" $icon_raw) "string" }}
|
||||
{{ $status_icon = strings.TrimSpace $icon_raw }}
|
||||
{{ $show_status := true }}
|
||||
{{ $show_status_raw := index $design "show_status" }}
|
||||
{{ if eq (printf "%T" $show_status_raw) "bool" }}
|
||||
{{ $show_status = $show_status_raw }}
|
||||
{{ end }}
|
||||
{{ if $show_status }}
|
||||
{{ with $profile.status }}
|
||||
{{ if reflect.IsMap . }}
|
||||
{{ $icon_raw := index . "icon" }}
|
||||
{{ if eq (printf "%T" $icon_raw) "string" }}
|
||||
{{ $status_icon = strings.TrimSpace $icon_raw }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
@@ -344,7 +351,7 @@
|
||||
{{ else if in (slice "http" "https") $button_scheme }}
|
||||
{{ $button_target = "target=\"_blank\" rel=\"noopener\"" }}
|
||||
{{ end }}
|
||||
<a href="{{ $button_href | safeURL }}" {{ $button_target | safeHTMLAttr }} class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-900 bg-white border border-gray-200 rounded-lg transition-colors hover:bg-gray-100 hover:text-gray-900 focus:z-10 focus:ring-4 focus:outline-none focus:ring-gray-200 focus:text-gray-900 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 dark:focus:text-white dark:focus:ring-gray-700"><svg class="w-3.5 h-3.5 me-2.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
|
||||
<a href="{{ $button_href | safeURL }}" {{ $button_target | safeHTMLAttr }} class="mt-4 inline-flex items-center px-4 py-2 text-sm font-medium text-gray-900 bg-white border border-gray-200 rounded-lg transition-colors hover:bg-gray-100 hover:text-gray-900 focus:z-10 focus:ring-4 focus:outline-none focus:ring-gray-200 focus:text-gray-900 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 dark:focus:text-white dark:focus:ring-gray-700"><svg class="w-3.5 h-3.5 me-2.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path d="M14.707 7.793a1 1 0 0 0-1.414 0L11 10.086V1.5a1 1 0 0 0-2 0v8.586L6.707 7.793a1 1 0 1 0-1.414 1.414l4 4a1 1 0 0 0 1.416 0l4-4a1 1 0 0 0-.002-1.414Z"/>
|
||||
<path d="M18 12h-2.55l-2.975 2.975a3.5 3.5 0 0 1-4.95 0L4.55 12H2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2Zm-3 5a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"/>
|
||||
</svg> {{ $button_text }}</a>
|
||||
|
||||
Reference in new issue
Block a user