Skip to content

Commit cbf32e3

Browse files
authored
Don't display badge if startDate is empty (alshedivat#1682)
1 parent 40af12b commit cbf32e3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

_includes/resume/education.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@
44
<li class="list-group-item">
55
<div class="row">
66
<div class="col-xs-2 cl-sm-2 col-md-2 text-center" style="width: 75px;">
7-
{% if content.startDate %}
7+
{% if content.startDate and content.startDate!="" %}
88
{% assign startDate = content.startDate | split: "-" | slice: 0,2 | join: "." %}
99
{% assign endDate = content.endDate | split: "-" | slice: 0,2 | join: "." | default: "Present" %}
1010
{% assign date = startDate | append: " - "%}
1111
{% assign date = date | append: endDate %}
1212
{% else %}
13-
{% assign date = "" %}
13+
{% assign date = null %}
1414
{% endif %}
1515
<table class="table-cv">
1616
<tbody>
1717
<tr>
1818
<td>
19-
<span class="badge font-weight-bold danger-color-dark text-uppercase align-middle" style="min-width: 75px;">{{date}}</span>
19+
{% if date %}
20+
<span class="badge font-weight-bold danger-color-dark text-uppercase align-middle" style="min-width: 75px;">
21+
{{date}}
22+
</span>
23+
{% endif %}
2024
</td>
2125
</tr>
2226
{% if content.location %}
@@ -44,4 +48,4 @@ <h6 class="ml-1 ml-md-4" style="font-size: 0.95rem; font-style: italic;">{{conte
4448
</div>
4549
</li>
4650
{% endfor %}
47-
</ul>
51+
</ul>

0 commit comments

Comments
 (0)