Skip to content

Commit 73f56fc

Browse files
committed
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)
1 parent 060a7e4 commit 73f56fc

3 files changed

Lines changed: 27 additions & 11 deletions

File tree

modules/blox/blox/resume-biography-3/block.html

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,18 @@
164164

165165
{{/* Avatar */}}
166166
{{ $status_icon := "" }}
167-
{{ $status := $profile.status }}
168-
{{ if and $status (reflect.IsMap $status) }}
169-
{{ $status_icon_raw := index $status "icon" }}
170-
{{ if eq (printf "%T" $status_icon_raw) "string" }}
171-
{{ $status_icon = strings.TrimSpace $status_icon_raw }}
167+
{{ $show_status := true }}
168+
{{ $show_status_raw := index $design "show_status" }}
169+
{{ if eq (printf "%T" $show_status_raw) "bool" }}
170+
{{ $show_status = $show_status_raw }}
171+
{{ end }}
172+
{{ if $show_status }}
173+
{{ $status := $profile.status }}
174+
{{ if and $status (reflect.IsMap $status) }}
175+
{{ $status_icon_raw := index $status "icon" }}
176+
{{ if eq (printf "%T" $status_icon_raw) "string" }}
177+
{{ $status_icon = strings.TrimSpace $status_icon_raw }}
178+
{{ end }}
172179
{{ end }}
173180
{{ end }}
174181

modules/blox/blox/resume-biography/block.html

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,18 @@
161161
{{ $profile_bio := "" }}
162162
{{ with $profile.bio }}{{ $profile_bio = strings.TrimSpace (printf "%v" .) }}{{ end }}
163163
{{ $status_icon := "" }}
164-
{{ with $profile.status }}
165-
{{ if reflect.IsMap . }}
166-
{{ $icon_raw := index . "icon" }}
167-
{{ if eq (printf "%T" $icon_raw) "string" }}
168-
{{ $status_icon = strings.TrimSpace $icon_raw }}
164+
{{ $show_status := true }}
165+
{{ $show_status_raw := index $design "show_status" }}
166+
{{ if eq (printf "%T" $show_status_raw) "bool" }}
167+
{{ $show_status = $show_status_raw }}
168+
{{ end }}
169+
{{ if $show_status }}
170+
{{ with $profile.status }}
171+
{{ if reflect.IsMap . }}
172+
{{ $icon_raw := index . "icon" }}
173+
{{ if eq (printf "%T" $icon_raw) "string" }}
174+
{{ $status_icon = strings.TrimSpace $icon_raw }}
175+
{{ end }}
169176
{{ end }}
170177
{{ end }}
171178
{{ end }}
@@ -344,7 +351,7 @@ <h1 class="text-3xl font-bold mb-2 mt-6">
344351
{{ else if in (slice "http" "https") $button_scheme }}
345352
{{ $button_target = "target=\"_blank\" rel=\"noopener\"" }}
346353
{{ end }}
347-
<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">
354+
<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">
348355
<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"/>
349356
<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"/>
350357
</svg> {{ $button_text }}</a>

templates/resume/content/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ sections:
2020
url: uploads/resume.pdf
2121
design:
2222
show_status: false
23+
spacing:
24+
padding: ['0', '0', '6rem', '0']
2325
banner:
2426
# Upload your cover image to the `assets/media/` folder and reference it here
2527
filename: kalen-emsley-Bkci_8qcdvQ-unsplash.jpg

0 commit comments

Comments
 (0)