add character limit to titles
This commit is contained in:
parent
7cc6357a5f
commit
81e08a08e3
1 changed files with 15 additions and 2 deletions
|
@ -1,5 +1,10 @@
|
||||||
<% layout('layout') %>
|
<% layout('layout') %>
|
||||||
<%
|
<%
|
||||||
|
let title = it.issue.title
|
||||||
|
const titleCharLimit = 50
|
||||||
|
if (title.length > titleCharLimit) {
|
||||||
|
title = title.slice(0, titleCharLimit) + '...'
|
||||||
|
}
|
||||||
let body = it.issue.body
|
let body = it.issue.body
|
||||||
const bodyCharLimit = 50
|
const bodyCharLimit = 50
|
||||||
if (body.length > bodyCharLimit) {
|
if (body.length > bodyCharLimit) {
|
||||||
|
@ -10,7 +15,15 @@
|
||||||
<div class="contents">
|
<div class="contents">
|
||||||
<div class="info">
|
<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-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: it.issue.title}) %></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) { %>
|
<% 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>
|
<p style="font-size: 42px; font-weight: 500; flex-wrap: wrap; color: #9A8FA7; display: flex; column-gap: 0.25em;"><%~ include('spanwords', {text: body})%></p>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
Loading…
Reference in a new issue