users-list-2.html 1009 B

1234567891011121314151617181920212223242526
  1. {% assign limit = include.limit | default: 10 %}
  2. {% assign offset = include.offset | default: 0 %}
  3. <div class="card{% if include.class %} {{ include.class }}{% endif %}">
  4. <div class="card-header">
  5. <h3 class="card-title">{{ include.title | default: 'Top users' }}</h3>
  6. </div>
  7. <div class="card-body">
  8. <div class="row g-3">
  9. {% assign colors = 'green,red,yellow,x,x' | split: ',' %}
  10. {% for person in site.data.people limit: limit offset: offset %}
  11. {% assign color = forloop.index | plus: 5 | random_item: colors %}
  12. <div class="col-6">
  13. <div class="row g-3 align-items-center">
  14. <a href="#" class="col-auto">
  15. {% include ui/avatar.html person=person status=color %}
  16. </a>
  17. <div class="col text-truncate">
  18. <a href="#" class="text-reset d-block text-truncate">{{ person.full_name }}</a>
  19. <div class="text-secondary text-truncate mt-n1">{{ forloop.index | random_date_ago: 6 | timeago }}</div>
  20. </div>
  21. </div>
  22. </div>
  23. {% endfor %}
  24. </div>
  25. </div>
  26. </div>