-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathperson.html
52 lines (43 loc) · 1.36 KB
/
person.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{% assign person = include.person %}
{% comment %}
Usage:
{% for item in site.data.people %}
{% assign person = item[1] %}
{% if person.role == role.key %}
{% include person.html person=person image=true %}
{% endif %}
{% endfor %}
Use the image parameter to include or not include an image.
Note that pl-0 just removes the left padding from the name part that is put
there by default by Bootstrap columns.
{% endcomment %}
{% if person.webpage %}
{% capture name %}
<a href="{{ person.webpage | escape }}"> {{ person.display_name }} </a>
{% endcapture %}
{% else %}
{% assign name = person.display_name %}
{% endif %}
{% if include.image %}
<div class="person person-with-image row align-items-center">
<div class="col-auto">
{% include person-image.html person=person %}
</div>
<div class="col pl-0">
<h6 class="person-name"> {{ name }} </h6>
{% if person.bio %}
<div class="bio">{{person.bio}}</div>
{% endif %}
{% if person.email %}
<div class="email">Contact: {{person.email}}</div>
{% endif %}
</div>
</div>
{% else %}
<div class="person person-without-image">
{{ name }}
{% if person.bio %}
<span class="bio">{{person.bio}}</span>
{% endif %}
</div>
{% endif %}