users-list-headers.html 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. <div class="card">
  2. <div class="card-header">
  3. <h3 class="card-title">{{ include.title | default: 'People' }}</h3>
  4. </div>
  5. <div class="list-group list-group-flush overflow-auto" style="max-height: 35rem">
  6. {% assign prev-letter = '' %}
  7. {% assign people = site.data.people | sort: 'last_name' %}
  8. {% for person in people %}
  9. {% assign first-letter = person.last_name | slice: 0 %}
  10. {% if prev-letter != first-letter %}
  11. {% assign prev-letter = first-letter %}
  12. <div class="list-group-header sticky-top">{{ prev-letter }}</div>
  13. {% endif %}
  14. <div class="list-group-item">
  15. <div class="row">
  16. <div class="col-auto">
  17. <a href="#">
  18. {% include ui/avatar.html person=person %}
  19. </a>
  20. </div>
  21. <div class="col text-truncate">
  22. <a href="#" class="text-body d-block">{{ person.full_name }}</a>
  23. {% assign i = forloop.index | plus: offset %}
  24. <div class="text-secondary text-truncate mt-n1">{{ site.data.commits[i].description }}</div>
  25. </div>
  26. </div>
  27. </div>
  28. {% endfor %}
  29. </div>
  30. </div>