<% if (plugins.contributors) { %>
  <section>
    <h2 class="field">
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.565 20.565 0 008 13.393a20.561 20.561 0 003.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.75.75 0 01-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5zM8 14.25l-.345.666-.002-.001-.006-.003-.018-.01a7.643 7.643 0 01-.31-.17 22.075 22.075 0 01-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.08 22.08 0 01-3.744 2.584l-.018.01-.006.003h-.002L8 14.25zm0 0l.345.666a.752.752 0 01-.69 0L8 14.25z"></path></svg>
      Contributors
      <% if (plugins.contributors.base || plugins.contributors.ref?.base?.abbreviatedOid) { %>
        from <%= plugins.contributors.base || plugins.contributors.ref?.base?.abbreviatedOid %> to <%= plugins.contributors.head || plugins.contributors.ref?.head?.abbreviatedOid %>
      <% } else if (plugins.contributors.head || plugins.contributors.ref?.head?.abbreviatedOid) { %>
        of <%= plugins.contributors.head || plugins.contributors.ref?.head?.abbreviatedOid %>
      <% } %>
    </h2>
    <% if (plugins.contributors.error) { %>
      <section>
        <div class="contributors fill-width">
          <div class="field error">
            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M2.343 13.657A8 8 0 1113.657 2.343 8 8 0 012.343 13.657zM6.03 4.97a.75.75 0 00-1.06 1.06L6.94 8 4.97 9.97a.75.75 0 101.06 1.06L8 9.06l1.97 1.97a.75.75 0 101.06-1.06L9.06 8l1.97-1.97a.75.75 0 10-1.06-1.06L8 6.94 6.03 4.97z"></path></svg>
            <%= plugins.contributors.error.message %>
          </div>
        </div>
      </section>
    <% } else { %>
      <% if (plugins.contributors.sections?.includes("contributors")) { %>
        <section>
          <div class="contributors fill-width">
            <% for (const [login, {avatar, contributions}] of Object.entries(plugins.contributors.list)) { %>
              <div class="label">
                <img class="avatar" src="<%= avatar %>" width="22" height="22" alt="" />
                <%= login %>
                <% if (plugins.contributors.contributions) { %>
                  <div class="contributions"><%= contributions %> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M10.5 7.75a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm1.43.75a4.002 4.002 0 01-7.86 0H.75a.75.75 0 110-1.5h3.32a4.001 4.001 0 017.86 0h3.32a.75.75 0 110 1.5h-3.32z"></path></svg></div>
                <% } %>
              </div>
            <% } %>
          </div>
        </section>
      <% } %>
      <% if (plugins.contributors.sections?.includes("categories")) { %>
        <section>
          <% for (const [category, contributors] of Object.entries(plugins.contributors.categories)) { %>
            <% if (!contributors.size) continue %>
            <h3 class="field contributors-category"><%= category %></h3>
            <div class="contributors contributors-categories fill-width">
              <% for (const contributor of contributors) { %>
                <img class="avatar" src="<%= plugins.contributors.list[contributor].avatar %>" width="22" height="22" alt="" />
              <% } %>
            </div>
          <% } %>
        </section>
      <% } %>
    <% } %>
  </section>
<% } %>
