phonebook: only render tilde name if it differs from previous line

This commit is contained in:
darcy (iris system) 2021-06-08 01:05:06 +12:00
parent 5ac8e08dd6
commit b31fde1d27
1 changed files with 3 additions and 1 deletions

View File

@ -45,12 +45,14 @@ title: phonebook
</tr>
</thead>
<tbody>
{% assign prevtilde = '' %}
{% for user in site.data.phonebook.community %}
<tr>
<td>{{ user.tilde }}</td>
<td>{% if prevtilde != user.tilde %}{{ user.tilde }}{% endif %}</td>
<td><code>{{ user.ext }}</code></td>
<td>{{ user.name }}</td>
</tr>
{% assign prevtilde = user.tilde %}
{% endfor %}
</tbody>
</table>