client/posts: allow for multiple source URLs to be entered and viewed

This commit is contained in:
Shyam Sunder
2020-01-26 17:49:04 -05:00
parent 0ff9f9d5a2
commit af6eff9ff8
5 changed files with 8 additions and 10 deletions

View File

@ -60,9 +60,8 @@
<% if (ctx.canEditPostSource) { %>
<section class='post-source'>
<%= ctx.makeTextInput({
<%= ctx.makeTextarea({
text: 'Source',
name: 'source',
value: ctx.post.source,
}) %>
</section>

View File

@ -42,9 +42,10 @@
<% if (ctx.post.source) { %>
<section class='source'>
Source: <a href='<%- ctx.post.source %>' title='<%- ctx.post.source %>'>
<%- ctx.post.prettyPrintSource() %>
</a>
Source: <% for (let i = 0; i < ctx.post.sourceSplit.length; i++) { %>
<% if (i != 0) { %>&middot;<% } %>
<a href='<%- ctx.post.sourceSplit[i] %>' title='<%- ctx.post.sourceSplit[i] %>'><%- ctx.extractRootDomain(ctx.post.sourceSplit[i]) %></a>
<% } %>
</section>
<% } %>