Skip to content

Commit 7385143

Browse files
authored
index page: fix empty bios; fix empty locations (#304)
1 parent a6d81eb commit 7385143

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/index.njk

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,23 @@ layout: false
2525
<h2 class="text-2xl font-bold group-hover:text-accent transition-colors">{{ person.data.name }}</h2>
2626
<p class="text-accent font-semibold text-sm uppercase tracking-wider">{{ person.data.role }}</p>
2727
</div>
28+
{% set location = person.data.location %}
29+
{% if location %}
2830
<span class="shrink-0 text-[10px] bg-[var(--bg-footer)] text-[var(--text-muted)] px-2 py-1 rounded font-bold uppercase border border-[var(--border-color)]">
29-
{{ person.data.location }}
31+
{{ location }}
3032
</span>
33+
{% endif %}
3134
</div>
3235

3336
<div class="mt-6 flex flex-wrap gap-2">
3437
{% set skills = person.data.languages.split(' ') %}
3538
{% include "skills-list.njk" %}
3639
</div>
3740

38-
<p class="mt-4 text-[var(--text-muted)] text-sm italic line-clamp-3">"{{ person.data.bio | truncate(120) }}"</p>
41+
{% set bio = person.data.bio %}
42+
{% if bio %}
43+
<p class="mt-4 text-[var(--text-muted)] text-sm italic line-clamp-3">"{{ bio | truncate(120) }}"</p>
44+
{% endif %}
3945
</div>
4046

4147
<div class="mt-auto p-4 flex justify-between items-center px-6 bg-black/5 dark:bg-white/5 border-t border-[var(--border-color)]">

0 commit comments

Comments
 (0)