feat(plugins/notable): display empty message when contribution empty (#516) [skip ci]

This commit is contained in:
Simon Lecoq
2021-09-04 09:45:43 +02:00
committed by GitHub
parent a38f11828f
commit 649feab3df

View File

@@ -14,14 +14,26 @@
</section>
</div>
<% } else { %>
<div class="row organization contributions">
<% for (const {name, avatar} of plugins.notable.contributions) { %>
<div class="organization contribution">
<img class="organization avatar" src="<%= avatar %>" width="16" height="16" />
<span class="organization name">@<%= name %></span>
</div>
<% } %>
</div>
<% if (plugins.notable.contributions.length) { %>
<div class="row organization contributions">
<% for (const {name, avatar} of plugins.notable.contributions) { %>
<div class="organization contribution">
<img class="organization avatar" src="<%= avatar %>" width="16" height="16" />
<span class="organization name">@<%= name %></span>
</div>
<% } %>
</div>
<% } else { %>
<div class="row fill-width largeable-width-half">
<section>
<div class="field">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm6.5-.25A.75.75 0 017.25 7h1a.75.75 0 01.75.75v2.75h.25a.75.75 0 010 1.5h-2a.75.75 0 010-1.5h.25v-2h-.25a.75.75 0 01-.75-.75zM8 6a1 1 0 100-2 1 1 0 000 2z"></path></svg>
No recent contributions in organization repositories found
</div>
</section>
</div>
<% } %>
<% } %>
</section>
<% } %>