{% extends "repo_master.html" %}

{% block title %}Stargazers of {{ repo.fullname }}{% endblock %}

{% block repo %}
  <div class="container">
    <div class="d-flex align-items-center mb-3">
      <h4 class="font-weight-bold mb-0">Stargazers of {{ repo.fullname }}</h4>
      <span class="btn btn-outline-secondary disabled opacity-100 border-0 ml-auto font-weight-bold">{{ users | length }} stars</span>
    </div>
    {% if users | length > 0 %}
    <div class="list-group">
      {% for user in users%}
        <div class="list-group-item">
            <div class="media">
              <img class="align-self-center text-center mr-3"
                  src="{{ user.default_email | avatar_url(40) | safe }}"
                  width=40 height=40 />
              <div class="media-body align-self-center">
                <a class="font-weight-bold" href="{{ url_for('ui_ns.view_user',username=user.user)}}">{{ user.user }}</a>

                <div class="line-height-1">
                  <small>
                      {{ user.fullname }}
                  </small>
                </div>
              </div>
            </div>
          </div>
      {% endfor %}
      </div>
    {% else %}
    <div class="alert alert-secondary text-center">
        <p>No stars</p>
      </div>
    {% endif %}
  </div>
{% endblock %}
