Skip to content

Commit

Permalink
fix teaching "Published in" bug
Browse files Browse the repository at this point in the history
  • Loading branch information
staeiou committed Jul 21, 2017
1 parent de3dc3c commit 3298fd2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 8 additions & 6 deletions _includes/archive-single.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ <h2 class="archive__item-title" itemprop="headline">
{% if post.read_time %}
<p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> {% include read-time.html %}</p>
{% endif %}

{% if post.venue and post.date %}
<p>Published in <i>{{ post.venue }}</i>, {{ post.date | default: "1900-01-01" | date: "%Y" }} </p>
{% elsif post.date %}
<p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Published:" }}</strong> <time datetime="{{ post.date | default: "1900-01-01" | date_to_xmlschema }}">{{ post.date | default: "1900-01-01" | date: "%B %d, %Y" }}</time></p>
{% endif %}

{% if page.collection == 'teaching' %}
<p> {{ page.type }}, <i>{{ page.venue }}</i>, {{ page.date | default: "1900-01-01" | date: "%Y" }} </p>
{% elsif page.venue and page.date %}
<p>Published in <i>{{ page.venue }}</i>, {{ page.date | default: "1900-01-01" | date: "%Y" }} </p>
{% elsif page.date %}
<p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Published:" }}</strong> <time datetime="{{ post.date | default: "1900-01-01" | date_to_xmlschema }}">{{ post.date | default: "1900-01-01" | date: "%B %d, %Y" }}</time></p>
{% endif %}

{% if post.excerpt %}
<p class="archive__item-excerpt" itemprop="description">{{ post.excerpt | markdownify }}</p>
Expand Down
4 changes: 3 additions & 1 deletion _layouts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
<p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Published:" }}</strong> <time datetime="{{ page.modified | date: "%Y-%m-%d" }}">{{ page.modified | date: "%B %d, %Y" }}</time></p>
{% endif %}

{% if page.venue and page.date %}
{% if page.collection == 'teaching' %}
<p> {{ page.type }}, <i>{{ page.venue }}</i>, {{ page.date | default: "1900-01-01" | date: "%Y" }} </p>
{% elsif page.venue and page.date %}
<p>Published in <i>{{ page.venue }}</i>, {{ page.date | default: "1900-01-01" | date: "%Y" }} </p>
{% elsif page.date %}
<p class="page__date"><strong><i class="fa fa-fw fa-calendar" aria-hidden="true"></i> {{ site.data.ui-text[site.locale].date_label | default: "Published:" }}</strong> <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | default: "1900-01-01" | date: "%B %d, %Y" }}</time></p>
Expand Down

0 comments on commit 3298fd2

Please sign in to comment.