---
layout: default
---

{% assign username = page.url | replace: '/people/', '' | replace: '/', '' %}

<div class="row">
    
    <div class="col s12 m5 right">
        <div class="card">
            <div class="card-image">
                <img src="/{{page.pic}}" width="300"/>
            </div>
            <div class="card-content">
                <span class="card-title">{{ page.fullname }}</span>
                
                <hr />
                
                {% assign role = site.roles | where: "id", page.role %}
                {% assign role = role[0] %}
                
                {{role.name}} 
                {% if page.start_date %}
                    <br />
                    KWARCie since
                    {% unless page.end_date %}
                        since
                    {% endunless %}
                    
                    {% include date.html date=page.start_date %}
                    
                    {% if page.end_date %}
                        &nbsp;-&nbsp;
                        {% include date.html date=page.end_date %}
                    {% endif %}
                {% endif %}
                
                {% if page.affiliation %}
                    <hr />
                    {{ page.affiliation }}
                {% endif %}

                
                <hr />
                <!-- Projects -->
                {% assign projects = site.pages | where: "layout", "project" | where: "active", true %}
                {% for project in projects %}
                    {% if project.people contains username %}
                        {% assign pid = project.url | replace: '/projects/', '' | replace: '/', '' %}
                        {% include project_chip.html project=pid %}
                    {% endif %}
                {% endfor %}

                <hr />

                <!-- Systems -->
                {% assign systems = site.pages | where: "layout", "system" %}
                {% for system in systems %}
                    {% unless system.end_date %}
                        {% if system.people contains username %}
                            {% assign sid = system.url | replace: '/systems/', '' | replace: '/', '' %}
                            {% include system_chip.html system=sid %}
                        {% endif %}
                    {% endunless %}
                {% endfor %}
            </div>
            <div class="card-action">
                {% if page.website %}
                <a target="_blank" href="{{page.website}}">Website</a>
                &nbsp;
                {% endif %}
                
                {% if page.publink == "auto" %}
                  <a href="http://kwarc.github.io/bibs/{{ username }}/">Publications</a>
                {% elsif page.publink %}
                  <a href="{{page.publink}}">Publications</a>
                {% endif %}
            </div>
        </div>
        
    </div>
    
    <div class="caption">
        {{content}}
    </div>
</div>