39 lines
1.3 KiB
Text
39 lines
1.3 KiB
Text
<% layout('layout') %>
|
|
<%
|
|
let title = it.commit.message.split('\n')[0]
|
|
let body = it.commit.message.split('\n').slice(1).join('\n').trim()
|
|
const titleCharLimit = 50
|
|
if (title.length > titleCharLimit) {
|
|
title = title.slice(0, titleCharLimit).trim() + '...'
|
|
}
|
|
%>
|
|
<div class="main commit">
|
|
<div class="contents">
|
|
<div class="info">
|
|
<p class="repo-name">@<%= it.commit.repository.full_name %></p>
|
|
<p class="title"><%= title %></p>
|
|
<% if (body) { %>
|
|
<p class="description">
|
|
<%= body %>
|
|
</p>
|
|
<% } %>
|
|
</div>
|
|
<div class="graphics">
|
|
<img width="120" height="120" src="<%= it.commit.committer.avatar_url %>?size=120"></img>
|
|
</div>
|
|
</div>
|
|
<%~ include('partials/commit-stats.eta', {stats: it.commit.stats}) %>
|
|
<div class="info-line">
|
|
<img class="avatar" width="48" height="48" src="<%= it.commit.committer.avatar_url %>?size=48"></img>
|
|
<p class="author"><%= it.commit.committer.full_name || it.commit.committer.name || it.commit.committer.login %></p>
|
|
<p>committed <%= new Intl.DateTimeFormat('en-US', { dateStyle: 'long' }).format(new Date(it.commit.created_at)) %></p>
|
|
<%~ include('icons/code-commit.eta') %>
|
|
<p><%= it.commit.sha.slice(0, 7) %></p>
|
|
</div>
|
|
</div>
|
|
<style>
|
|
.commit .repo-name {
|
|
font-size: 2.5rem;
|
|
color: #6d728f;
|
|
}
|
|
</style> |