35 lines
1.1 KiB
Text
35 lines
1.1 KiB
Text
<% layout('layout') %>
|
|
<%
|
|
let title = it.issue.title
|
|
const titleCharLimit = 50
|
|
if (title.length > titleCharLimit) {
|
|
title = title.slice(0, titleCharLimit) + '...'
|
|
}
|
|
let body = it.issue.body
|
|
const bodyCharLimit = 50
|
|
if (body.length > bodyCharLimit) {
|
|
body = body.slice(0, bodyCharLimit) + '...'
|
|
}
|
|
%>
|
|
<div class="main issue">
|
|
<div class="contents">
|
|
<div class="info">
|
|
<p class="repo-name">@<%= it.issue.repository?.full_name || it.issue.base.repo.full_name %></p>
|
|
<p class="title"><span class="number">#<%= it.issue.number %></span><%~ include('spanwords', {text: title})
|
|
%></p>
|
|
<% if (it.issue.body) { %>
|
|
<p class="description">
|
|
<%= body %>
|
|
</p>
|
|
<% } %>
|
|
</div>
|
|
<div class="graphics">
|
|
<img width="120" height="120" src="<%= it.issue.user.avatar_url %>?size=120"></img>
|
|
</div>
|
|
</div>
|
|
<div class="info-line"
|
|
><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
|
|
></div>
|
|
</div> |