Fis sorting issues 4/2
This commit is contained in:
parent
373bb13aa3
commit
aa95a9c6c9
1 changed files with 4 additions and 7 deletions
|
@ -69,7 +69,6 @@
|
|||
<a style="position: absolute; bottom: 10px; right: 10px;" href="/"><button type="button">Home</button></a>
|
||||
<div class="posts">
|
||||
<%- (function(){
|
||||
let ret = ''
|
||||
let mainPost = post
|
||||
let id = postid == -1 ? -2 : 0
|
||||
function recurse(post) {
|
||||
|
@ -104,15 +103,13 @@
|
|||
}
|
||||
else
|
||||
r += `<a href="/post/${id}">[Open]</a></div>`
|
||||
ret = r + ret
|
||||
for(const comment of post.comments) {
|
||||
recurse(comment)
|
||||
r = recurse(comment) + r
|
||||
}
|
||||
ret = '</post>' + ret
|
||||
|
||||
r += '</post>'
|
||||
return r
|
||||
}
|
||||
recurse(post)
|
||||
return ret
|
||||
return recurse(post)
|
||||
})() %>
|
||||
</div>
|
||||
<body>
|
||||
|
|
Loading…
Add table
Reference in a new issue