diff --git a/_layouts/post.html b/_layouts/post.html index 23640ac7..92482fe5 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -6,10 +6,37 @@

{{page.title}}

{% assign author = "" | split: ',' %} + {% assign has_avatar = "false" %} {% for a in page.author %} {% assign author = author | push: site.data.authors[a].name %} + {% if site.data.authors[a].avatar != nil %} + {% assign has_avatar = "true" %} + {% endif %} {% endfor %} -

By {{ author | join: ', ' }} | {{ page.date | date: '%B %d, %Y' }}

+ +

+ {% if has_avatar == "true" %} + {% for a in page.author %} + {% assign author_data = site.data.authors[a] %} +

+ {% if author_data.avatar != %} + + {% else %} + + {% endif %} + + {% if a == page.author.first or page.author.first == nil %}By {% endif %}{{author_data.name}} + {% if a != page.author[-1] and page.author.first != nil %} + , + {% else %} + | {{ page.date | date: '%B %d, %Y' }} + {% endif %} +

+ {% endfor %} + {% else %} +

By {{ author | join: ', ' }} | {{ page.date | date: '%B %d, %Y' }}

+ {% endif %} +

{{ content }} diff --git a/_sass/global.scss b/_sass/global.scss index 60906344..4ce83b6d 100644 --- a/_sass/global.scss +++ b/_sass/global.scss @@ -111,6 +111,11 @@ p.byline { line-height: 1.8rem; } +img.avatar { + vertical-align:middle; + border-radius: 50%; +} + a { line-height: 1.5rem; font-weight: 400;