| {% if post %} |
| {% assign author = post.data.author %} |
| {% assign post_date = post.date %} |
| {% assign modified_date = post.modified_date %} |
| {% assign url = post.url %} |
| {% else %} |
| {% assign post_date = page.date %} |
| {% endif %} |
| |
| {% assign post_author = author %} |
| {% assign post_gravatar = '' %} |
| |
| {% for a in authors %} |
| {% if a.name == author %} |
| {% if a.twitter %} |
| {% capture post_author %}<a href="https://twitter.com/{{a.twitter}}">{{ author }}</a>{% endcapture %} |
| {% endif %} |
| {% if a.gravatar %} |
| {% capture post_gravatar %}https://gravatar.com/avatar/{{ a.gravatar }}{% endcapture %} |
| {% endif %} |
| {% endif %} |
| {% endfor %} |
| |
| {% if modified_date %} |
| {% capture modified_date %}<strong>Updated:</strong> {{ modified_date | date_to_long_string }}<br>{% endcapture %} |
| {% endif %} |
| |
| <div class="post"> |
| <div class="media"> |
| <a class="pull-left" href="#"> |
| <img class="media-object img-circle img-responsive" src='{{ post_gravatar }}' alt='{{ author }}'> |
| </a> |
| <div class="media-body"> |
| <p> |
| <strong>By:</strong> {{ post_author }}<br> |
| <strong>Published:</strong> {{ post_date | date_to_long_string }}<br> |
| {% if page.url == "/blog/" or page.url contains "/blog/page" or page.url == "/" %} |
| {% if post.page.excerpt %} |
| {{ post.page.excerpt | liquid | markdown | strip_html | truncatewords: 30, '' }} |
| {% else %} |
| {{ post.content | first_paragraph | strip_html | truncatewords: 30, '' }} |
| {% endif %}<a href='{{ site.baseurl }}{{ url }}'>[...]</a> |
| {% endif %} |
| </p> |
| </div> |
| </div> |
| </div> |