feat(plugins/stargazers): add plugin_stargazers_days and migrate to d3

This commit is contained in:
Simon Lecoq
2023-03-15 19:16:22 -04:00
parent b2d9cdc245
commit a9e442c3da
8 changed files with 39 additions and 59 deletions

View File

@@ -2,7 +2,7 @@
<section class="stargazers">
<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="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z"></path></svg>
Stargazers over the last two weeks
Stargazers
</h2>
<% if (plugins.stargazers.error) { %>
<div class="field error">
@@ -11,7 +11,7 @@
</div>
<% } else { %>
<div class="row margin-bottom">
<section class="column chart chartist">
<section class="column chart">
<h3>Total stargazers</h3>
<% if (plugins.stargazers.charts) { %>
<%- plugins.stargazers.charts[0] %>
@@ -30,7 +30,7 @@
</div>
<% } %>
</section>
<section class="column chart chartist">
<section class="column chart">
<h3>New stargazers per day</h3>
<% if (plugins.stargazers.charts) { %>
<%- plugins.stargazers.charts[1] %>