implement link formatting
This commit is contained in:
parent
e7a41a520a
commit
711a799482
3 changed files with 24 additions and 9 deletions
|
@ -7,13 +7,16 @@
|
|||
Context
|
||||
<% } %>
|
||||
</h1>
|
||||
<% for (let contentN of content) { %>
|
||||
<% if (contentN[0] == 'file' && contentN [1]) { %>
|
||||
<img class='art' src='<%= new URL(contentN[1], 'https://tbg.dervland.net/') %>'>
|
||||
<% } else { %>
|
||||
<div class='commentbox'><%= contentN[0] %></div>
|
||||
<% } %>
|
||||
<% } %>
|
||||
<div>
|
||||
<% for (let contentN of content) { %>
|
||||
<% if (contentN[0] == 'file') { %>
|
||||
<img class='art' src='<%= new URL(contentN[1], 'https://tbg.dervland.net/') %>'>
|
||||
<% } else if (contentN[0] == 'link') { %>
|
||||
<a class='link' href='<%= contentN[1] %>.'><%= contentN[1] %></a>
|
||||
<% } else if (contentN[0].replaceAll(' ','').length > 0) { %>
|
||||
<span class='commentbox'><%= contentN[0] %></span>
|
||||
<% } } %>
|
||||
</div>
|
||||
<% if (!isNaN(date * 1)) { %>
|
||||
<div class='sub'><b>Posted on</b> <%= new Date(date).toISOString() %> </div>
|
||||
<% } %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue