2022-03-13 16:16:46 +03:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
2022-08-26 20:22:46 +03:00
|
|
|
<%- include("extra/meta", {title: "Thread list!" }) %>
|
2022-03-13 16:16:46 +03:00
|
|
|
|
2022-08-26 16:27:29 +03:00
|
|
|
<body>
|
2022-08-31 16:04:37 +03:00
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css" integrity="sha512-xh6O/CkQoPOWDdYTDqeRdPCVd1SpvCA9XXcUnZS2FmJNp1coAFzvtCN9BmamE+4aHK8yyUHUSCcJHgXloTyT2A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
|
|
|
2022-08-26 16:27:29 +03:00
|
|
|
<link rel="stylesheet" href="/css/threads.css" />
|
2022-03-26 23:28:10 +03:00
|
|
|
|
2022-08-26 16:27:29 +03:00
|
|
|
<%- include("extra/navbar") %>
|
2022-03-26 23:28:10 +03:00
|
|
|
|
2022-08-26 16:27:29 +03:00
|
|
|
<div class="threads">
|
2022-03-26 23:28:10 +03:00
|
|
|
|
2022-08-26 16:27:29 +03:00
|
|
|
<% threads.forEach(thread=>{ %>
|
|
|
|
<a href="<%= thread.getLink() %>" class="">
|
|
|
|
<div class="threads-box">
|
|
|
|
<div class="thread-box-title">
|
|
|
|
<% if (thread.deleted) { %> <span>[DELETED]</span><% } %>
|
|
|
|
<%= thread.title %>
|
|
|
|
</div>
|
|
|
|
<div class="box-username">
|
2022-08-31 16:25:35 +03:00
|
|
|
<% if (user && !thread.deleted){ %>
|
|
|
|
<a class="btn-danger" onclick="fetch('/api/threads/<%= thread.id %>/',{method:'DELETE'})"><i class="fa-solid fa-trash-can"></i></a>
|
|
|
|
<% } %>
|
2022-08-26 18:02:42 +03:00
|
|
|
<%= thread.author.name %> <div class="avatar"><img src="<%=thread.author.avatar %>"> </div>
|
2022-08-31 16:25:35 +03:00
|
|
|
|
2022-08-26 16:27:29 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
<br>
|
|
|
|
<% }); %>
|
|
|
|
|
|
|
|
</div>
|
2022-03-26 23:28:10 +03:00
|
|
|
|
2022-08-26 16:27:29 +03:00
|
|
|
</body>
|