Skip to content
Snippets Groups Projects
people_chip.html 538 B
Newer Older
  • Learn to ignore specific revisions
  • Tom Wiesing's avatar
    Tom Wiesing committed
    {% comment %}
        This page creates a single 'chip' for linking to a person. 
        It expects the username of the person as the 'person' variable
    {% endcomment %}
    
    Tom Wiesing's avatar
    Tom Wiesing committed
    {% capture purl %}/people/{{person}}/{% endcapture %}
    {% assign pp = site.pages | where: "url", purl | first %}
    
    Tom Wiesing's avatar
    Tom Wiesing committed
    {% if pp %}
        <a href="{{ site.baseurl }}{{purl}}">
            <div class="chip">
                <img src="{{ site.baseurl }}/{{pp.pic}}">
                {{pp.fullname}}
            </div>
        </a>
    {% else %}
    
    Tom Wiesing's avatar
    Tom Wiesing committed
        <div class="chip">
            {{person}}
        </div>
    
    Tom Wiesing's avatar
    Tom Wiesing committed
    {% endif %}