add issue status to template

This commit is contained in:
hazycora 2023-08-02 23:02:53 -05:00
parent 50aac84888
commit 87cc5939e4
No known key found for this signature in database
GPG key ID: 215AF1F81F86940E
3 changed files with 8 additions and 9 deletions

View file

@ -130,17 +130,14 @@ p {
border-radius: 100%;
}
.repo .info-line {
gap: 1em;
}
.repo-fact {
.fact {
display: flex;
margin-right: 0.5em;
font-size: 1.5rem;
flex-direction: column;
}
.repo-fact .fact-heading {
.fact-heading {
color: #8c91af;
font-size: 2rem;
font-weight: 500;

View file

@ -31,5 +31,7 @@
<img class="avatar" width="48" height="48" src="<%= it.issue.user.avatar_url %>?size=48"></img>
<p class="author"><%= it.issue.user.full_name || it.issue.user.login %></p>
<p>opened on <%= new Intl.DateTimeFormat('en-US', { dateStyle: 'long' }).format(new Date(it.issue.created_at)) %></p>
<p>·</p>
<p><%= it.issue.pull_request?.merged ? 'merged' : it.issue.state %></p>
</div>
</div>

View file

@ -20,15 +20,15 @@
</div>
<% if (it.repo.open_issues_count > 0 || it.repo.stars_count > 0 || it.repo.forks_count > 0) { %>
<div class="info-line">
<div class="repo-fact">
<div class="fact">
<p class="fact-heading"><%= prettyNumber(it.repo.open_issues_count) %></p>
<p class="fact-subtitle"><%= (it.repo.open_issues_count) != 1 ? 'Issues' : 'Issue' %></p>
</div>
<div class="repo-fact">
<div class="fact">
<p class="fact-heading"><%= prettyNumber(it.repo.stars_count) %></p>
<p class="fact-subtitle"><%= (it.repo.stars_count) != 1 ? 'Stars' : 'Star' %></p>
</div>
<div class="repo-fact">
<div class="fact">
<p class="fact-heading"><%= prettyNumber(it.repo.forks_count) %></p>
<p class="fact-subtitle"><%= (it.repo.forks_count) != 1 ? 'Forks' : 'Fork' %></p>
</div>