akf-forum/views/threads.ejs

36 lines
1.1 KiB
Text
Raw Normal View History

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>
<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
<%- include("extra/navbar") %>
2022-03-26 23:28:10 +03:00
<div class="threads">
2022-03-26 23:28:10 +03:00
<% threads.forEach(thread=>{ %>
2022-08-26 16:27:29 +03:00
<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">
<% 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>
<% } %>
<%= thread.author.name %> <div class="avatar"><img src="<%=thread.author.avatar %>"> </div>
2022-08-26 16:27:29 +03:00
</div>
2022-03-26 23:28:10 +03:00
</div>
</a>
<br>
<% }); %>
</div>
</body>