Skip to content
Snippets Groups Projects
people_list.html 1.32 KiB
{% comment %}
    Generates a list of people. 
    Expects 'people' as an argument, representing the list of people to show. 
{% endcomment %}

{% for role in site.roles %}
    {% assign rollers = people | where: "role", role.id %}
    
    {% if rollers.size > 0 %}
        <ul class="collection with-header">
          <li class="collection-header">
	  <h5>{{role.name}}(s)</h5></li>
            {% for person in rollers %}
                <li class="collection-item avatar">
                    <img src="/{{person.pic}}" alt="" class="circle"/>
                    <a href="{{person.url}}" class="title">{{person.fullname}}</a>
                    <p>
                      {% if person.start_date %}
                        {% unless person.end_date %}
                        since
                        {% endunless %}
                        {% assign date = person.start_date %}
                        {% include date.html %}
                        
                        {% if person.end_date %}
                            &nbsp;-&nbsp;
                            {% assign date = person.end_date %}
                            {% include date.html %}
                        {% endif %}
                      {% endif %}
                    </p>
                </li>
            {% endfor %}
        </ul>
    {% endif %}
{% endfor %}