client: Reimplement post source functionality

This commit is contained in:
raku-cat
2018-12-27 03:22:36 -06:00
committed by Shyam Sunder
parent 2fdd8cb3ab
commit 3e6b98df92
6 changed files with 73 additions and 5 deletions

View File

@ -58,6 +58,16 @@
</section>
<% } %>
<% if (ctx.canEditPostSource) { %>
<section class='post-source'>
<%= ctx.makeTextInput({
text: 'Source',
name: 'source',
value: ctx.post.source,
}) %>
</section>
<% } %>
<% if (ctx.canEditPostTags) { %>
<section class='tags'>
<%= ctx.makeTextInput({}) %>

View File

@ -38,6 +38,14 @@
<a href class='fit-both'>both</a>
</section>
<% if (ctx.post.source) { %>
<section class='source'>
Source: <a href='<%- ctx.post.source %>' title='<%- ctx.post.source %>'>
<%- ctx.post.prettyPrintSource() %>
</a>
</section>
<% } %>
<section class='search'>
Search on
<a href='http://iqdb.org/?url=<%- encodeURIComponent(ctx.post.fullContentUrl) %>'>IQDB</a> &middot;