Skip to content

Commit dbebccc

Browse files
committed
Simplify jekyll code
1 parent c93ae70 commit dbebccc

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

_pages/team.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ permalink: /team/
1313
{% assign active_contrib = site.data.contributors | where: "active", "1" %}
1414
{% assign past_contrib = site.data.contributors | where_exp: "item", "item.active == nil" %}
1515

16-
{% assign number_printed = 0 %}
1716
{% for member in active_contrib %}
18-
{% assign even_odd = number_printed | modulo: 2 %}
17+
{% assign even_odd = forloop.index0 | modulo: 2 %}
1918

2019
{% if even_odd == 0 %}
2120
<div class="row">
@@ -60,8 +59,6 @@ permalink: /team/
6059
{% endfor %}
6160
</div>
6261

63-
{% assign number_printed = number_printed | plus: 1 %}
64-
6562
{% if even_odd == 1 %}
6663
</div>
6764
{% endif %}
@@ -76,9 +73,8 @@ permalink: /team/
7673
<div class="clearfix">
7774

7875

79-
{% assign number_printed = 0 %}
8076
{% for member in past_contrib %}
81-
{% assign even_odd = number_printed | modulo: 2 %}
77+
{% assign even_odd = forloop.index0 | modulo: 2 %}
8278

8379
{% if even_odd == 0 %}
8480
<div class="row">
@@ -101,8 +97,6 @@ permalink: /team/
10197
{% endif %}
10298
</div>
10399

104-
{% assign number_printed = number_printed | plus: 1 %}
105-
106100
{% if even_odd == 1 %}
107101
</div>
108102

0 commit comments

Comments
 (0)