Last active
March 28, 2018 19:26
-
-
Save su-narthur/f827561cf37217c8f8601494719e895e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.code-example { | |
overflow-y: scroll; | |
padding: 1rem; | |
background-color: #eee; | |
word-break: break-all; | |
word-wrap: break-word; | |
white-space: pre; | |
color: #666666; | |
border-left: 3px solid #7b7b7b; | |
tab-size: 4; | |
-moz-tab-size: 4; | |
} | |
</style> | |
{% verbatim %} | |
<pre class="code-example"> | |
<style> | |
.directory-entry { | |
margin: 15px 30px 15px 0; | |
width: 300px; | |
max-width: 100%; | |
display: inline-block; | |
vertical-align: top; | |
} | |
</style> | |
{% set lastCategory = "" %} | |
{% for staff in su.collection( "directory" ).sort( "category" ).sort( "name.last" ) %} | |
{% if staff.category != lastCategory %} | |
<h3>{{ staff.category }}</h3> | |
{% set lastCategory = staff.category %} | |
{% endif %} | |
<div class="directory-entry"> | |
<img src="{{ staff.image.fill( 269,180 ) }}" width="100%"/> | |
<h4>{{ staff.name.first }} {{ staff.name.last }}</h4> | |
<div>{{ staff.title }}</div> | |
<div><a href="tel:{{ staff.phone }}">{{ staff.phone }}</a></div> | |
<div><a href="mailto:{{ staff.email }}">{{ staff.email }}</a></div> | |
<div>{{ staff.description }}</div> | |
</div> | |
{% endfor %} | |
</pre> | |
{% endverbatim %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment