Fix `endDate` conditional

This commit is contained in:
Michael Rose 2017-03-17 11:56:20 -04:00
parent 4e8851782e
commit a55832abcf
6 changed files with 15 additions and 12 deletions

View File

@ -107,6 +107,7 @@ t:
page: "Page" page: "Page"
of: "of" of: "of"
min_read: "min read" min_read: "min read"
present: "Present"
``` ```
### Navigation ### Navigation

View File

@ -18,6 +18,7 @@ t:
page: "Page" page: "Page"
of: "of" of: "of"
min_read: "min read" min_read: "min read"
present: "Present"
# Google Fonts # Google Fonts
google_fonts: google_fonts:

View File

@ -13,10 +13,10 @@
{% if e.startDate %} {% if e.startDate %}
<span class="startDate">{{ e.startDate }}</span> <span class="startDate">{{ e.startDate }}</span>
{% endif %} {% endif %}
{% if e.endDate %} {% if e.endDate == '' %}
<span class="endDate">{{ e.endDate | prepend: ' &mdash; ' }}</span> <span class="endDate">{{ site.data.theme.t.present | default: 'Present' | prepend: ' &mdash; ' }}</span>
{% else %} {% else %}
<span class="endDate">{{ Present | prepend: ' &mdash; ' }}</span> <span class="endDate">{{ e.endDate | prepend: ' &mdash; ' }}</span>
{% endif %} {% endif %}
</div> </div>
{% if e.area %} {% if e.area %}

View File

@ -22,10 +22,10 @@
{% if v.startDate %} {% if v.startDate %}
<span class="startDate">{{ v.startDate }}</span> <span class="startDate">{{ v.startDate }}</span>
{% endif %} {% endif %}
{% if v.endDate %} {% if v.endDate == '' %}
<span class="endDate">{{ v.endDate | prepend: ' &mdash; ' }}</span> <span class="endDate">{{ site.data.theme.t.present | default: 'Present' | prepend: ' &mdash; ' }}</span>
{% else %} {% else %}
<span class="endDate">{{ Present | prepend: ' &mdash; ' }}</span> <span class="endDate">{{ v.endDate | prepend: ' &mdash; ' }}</span>
{% endif %} {% endif %}
</div> </div>
{% if v.summary %} {% if v.summary %}

View File

@ -22,10 +22,10 @@
{% if w.startDate %} {% if w.startDate %}
<span class="startDate">{{ w.startDate }}</span> <span class="startDate">{{ w.startDate }}</span>
{% endif %} {% endif %}
{% if w.endDate %} {% if w.endDate == '' %}
<span class="endDate">{{ w.endDate | prepend: ' &mdash; ' }}</span> <span class="endDate">{{ site.data.theme.t.present | default: 'Present' | prepend: ' &mdash; ' }}</span>
{% else %} {% else %}
<span class="endDate">{{ Present | ' &mdash; ' }}</span> <span class="endDate">{{ w.endDate | prepend: ' &mdash; ' }}</span>
{% endif %} {% endif %}
</div> </div>
{% if w.summary %} {% if w.summary %}

View File

@ -18,6 +18,7 @@ t:
page: "Page" page: "Page"
of: "of" of: "of"
min_read: "min read" min_read: "min read"
present: "Present"
# Google Fonts # Google Fonts
google_fonts: google_fonts: