Add basic personnel profile pages
This commit is contained in:
@ -10,7 +10,18 @@
|
||||
|
||||
{% macro personnel() %}
|
||||
{% for person in section.pages %}
|
||||
{{ person.extra.name }}
|
||||
{{ person.extra.role }}
|
||||
{%- set_global image = "/static/img/placeholder.jpg" %}
|
||||
{%- for asset in person.assets %}
|
||||
{%- if asset is matching(person.slug~"[.](jpg|png)$") %}
|
||||
{%- set_global image = asset %}
|
||||
{%- break %}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
{%- set image = resize_image(path=image, width=300, height=300, op="fill") %}
|
||||
<div class="person">
|
||||
<img src="{{ image.url }}" alt={{ person.extra.name }}>
|
||||
<div class="name">{{ person.extra.name }}</div>
|
||||
<div class="role">{{ person.extra.role }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
||||
|
Reference in New Issue
Block a user