Do if-markdown stuff in templates
This commit is contained in:
parent
817dbc046b
commit
dafbd6bde4
@ -61,7 +61,6 @@ tests locally:
|
||||
|
||||
## TODOs
|
||||
|
||||
- Do the if-markdown-else-plaintext stuff in templates
|
||||
- Fix preview tests
|
||||
- Do I need `SUM` for `by_id()`?
|
||||
|
||||
|
@ -25,7 +25,11 @@
|
||||
</h4>
|
||||
<h5 class="post__author"><%= $remark->{'author'} %></h5>
|
||||
<div class="post__body">
|
||||
<% if ($remark->{'markdown'}) { =%>
|
||||
<%== markdown $remark->{'body'} =%>
|
||||
<% } else { =%>
|
||||
<span class="plain-text"><%= $remark->{'body'} %></span>
|
||||
<% } =%>
|
||||
</div>
|
||||
<nav class="post__nav">
|
||||
<%= link_to Thread => single_thread =>
|
||||
|
@ -80,7 +80,11 @@
|
||||
</h4>
|
||||
<h5 class="post__author"><%= $last_remark->{'author'} %></h5>
|
||||
<div class="post__body">
|
||||
<span class="plain-text"><%= $last_remark->{'body'} =%></span>
|
||||
<% if ($last_remark->{'markdown'}) { =%>
|
||||
<%== markdown $last_remark->{'body'} =%>
|
||||
<% } else { =%>
|
||||
<span class="plain-text"><%= $last_remark->{'body'} %></span>
|
||||
<% } =%>
|
||||
</div>
|
||||
<nav class="post__nav">
|
||||
<%= link_to Thread => single_thread =>
|
||||
@ -106,7 +110,11 @@
|
||||
<h4 class="post__date"><%= $thread->{'date'} %></h4>
|
||||
<h5 class="post__author"><%= $thread->{'author'} %></h5>
|
||||
<div class="post__body">
|
||||
<span class="plain-text"><%= $thread->{'body'} =%></span>
|
||||
<% if ($thread->{'markdown'}) { =%>
|
||||
<%== markdown $thread->{'body'} =%>
|
||||
<% } else { =%>
|
||||
<span class="plain-text"><%= $thread->{'body'} %></span>
|
||||
<% } =%>
|
||||
</div>
|
||||
<nav class="post__nav">
|
||||
<%= link_to post_remark => {thread_id => $thread->{'id'}},
|
||||
|
@ -24,7 +24,11 @@
|
||||
<h4 class="post__date"><%= $thread->{'date'} %></h4>
|
||||
<h5 class="post__author"><%= $thread->{'author'} %></h5>
|
||||
<div class="post__body">
|
||||
<% if ($thread->{'markdown'}) { =%>
|
||||
<%== markdown $thread->{'body'} =%>
|
||||
<% } else { =%>
|
||||
<span class="plain-text"><%= $thread->{'body'} %></span>
|
||||
<% } =%>
|
||||
</div>
|
||||
<nav class="post__nav">
|
||||
<%= link_to post_remark => {thread_id => $thread->{'id'}},
|
||||
@ -55,7 +59,11 @@
|
||||
</h4>
|
||||
<h5 class="post__author"><%= $remark->{'author'} %></h5>
|
||||
<div class="post__body">
|
||||
<% if ($remark->{'markdown'}) { =%>
|
||||
<%== markdown $remark->{'body'} =%>
|
||||
<% } else { =%>
|
||||
<span class="plain-text"><%= $remark->{'body'} %></span>
|
||||
<% } =%>
|
||||
</div>
|
||||
<nav class="post__nav">
|
||||
<%= link_to Remark => post_remark =>
|
||||
|
Loading…
x
Reference in New Issue
Block a user