og/views/issue.eta
2023-08-02 19:40:36 -05:00

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">
<div class="contents">
<div class="info">
<p style="font-size: 36px; color: #9A8FA7;">@<%= it.issue.repository?.full_name || it.issue.base.repo.full_name %></p>
<p
style="font-weight: 800;
font-size: 4.5rem;
line-height: 1.2em;
display: flex;
column-gap: 0.25em;
flex-wrap: wrap;"
><span style="font-weight: 400; color: #9A8FA7">#<%= it.issue.number %></span><%~ include('spanwords', {text: title})
%></p>
<% if (it.issue.body) { %>
<p style="font-size: 42px; font-weight: 500; flex-wrap: wrap; color: #9A8FA7; display: flex; column-gap: 0.25em;"><%~ include('spanwords', {text: body})%></p>
<% } %>
</div>
<div class="graphics">
<img width="120" height="120" src="<%= it.issue.user.avatar_url %>"></img>
</div>
</div>
</div>