2022-03-13 16:16:46 +03:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<link rel="stylesheet" href="/css/styles.css" />
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
<title>
|
|
|
|
<%= thread.title %>
|
|
|
|
</title>
|
2022-03-20 21:37:47 +03:00
|
|
|
<meta name="description" content="Thread page of Akf-forum!">
|
2022-03-13 16:16:46 +03:00
|
|
|
<meta name="author" content="Akif9748">
|
|
|
|
<link rel="icon" type="image/x-icon" href="/images/favicon.jpg">
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
|
<body>
|
2022-03-22 21:25:09 +03:00
|
|
|
<script src="/js/scripts.js"></script>
|
|
|
|
<div id="admin"></div>
|
|
|
|
<script> if (<%= user.admin %>) admin(); </script>
|
|
|
|
|
|
|
|
<!-- Navbar: -->
|
|
|
|
<a href="/"><img class="logo" src="/images/logo.jpg" alt="AKF-FORUM"></a>
|
|
|
|
<div class="navbar" id="navbar">
|
|
|
|
|
|
|
|
<a href="/threads">THREADS</a>
|
|
|
|
<a href="/users">USERS</a>
|
|
|
|
<a href="/search">SEARCH</a>
|
|
|
|
<a href="/threads/open/">OPEN THREAD</a>
|
|
|
|
|
|
|
|
<div style="float: right;" class="user" id="user">
|
|
|
|
<a href = <%= user.getLink() %> > <h1> <%= user.name %><img class="yuvarlak" src=<%=user.avatar %> alt=<%= user.name %>> </h1> </a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<!-- Navbar end -->
|
2022-03-13 16:16:46 +03:00
|
|
|
|
|
|
|
<h1 style="font-size: 35px;">
|
|
|
|
<%= thread.title %>
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<br>
|
|
|
|
<% messages.forEach(message=>{ %>
|
|
|
|
|
2022-03-22 21:25:09 +03:00
|
|
|
<div id= <%= "message-" + message.id %> style="border: 2px solid #444444; padding: 5px;">
|
2022-03-13 16:16:46 +03:00
|
|
|
<h2>
|
|
|
|
<img class="yuvarlak" src=<%=message.author.avatar %> alt=<%= message.author.name %>>
|
|
|
|
<a style=" color: #bcbcbc; " href=<%="/users/" + message.author.id %>> <%= message.author.name %></a>:
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
<h2>
|
|
|
|
<%= message.content %>
|
|
|
|
</h2>
|
2022-03-21 23:53:22 +03:00
|
|
|
<form style="text-align:right;display:inline;" action="/message/delete/<%= message.id %>" method="post">
|
2022-03-13 16:16:46 +03:00
|
|
|
<button style="display:inline;" class="button" type="submit">DELETE</button>
|
|
|
|
</form>
|
|
|
|
|
2022-03-21 23:53:22 +03:00
|
|
|
|
|
|
|
<form style="display:inline;" action="/message/<%= message.id %>" method="delete">
|
|
|
|
</form>
|
|
|
|
<form style="text-align:right;" action="/message/react/<%= message.id %>" method="POST">
|
2022-03-13 16:16:46 +03:00
|
|
|
|
|
|
|
<h3 style="display:inline;">
|
|
|
|
<%= Object.values(message.react).filter(Boolean).length - Object.values(message.react).filter(x=>!x).length %>
|
|
|
|
</h3>
|
|
|
|
|
|
|
|
|
|
|
|
<button style="display:inline;" class="button" name="like" type="submit">+🔼</button>
|
|
|
|
<button style="display:inline;" class="button" name="dislike" type="submit">-🔽</button>
|
|
|
|
<h3 style="display:inline;">
|
|
|
|
<%=new Date(message.time).toLocaleString() %>
|
|
|
|
</h3>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<br>
|
|
|
|
<% }); %>
|
|
|
|
|
|
|
|
<hr>
|
|
|
|
|
|
|
|
|
2022-03-21 23:53:22 +03:00
|
|
|
<form action="/message" method="POST">
|
2022-03-13 16:16:46 +03:00
|
|
|
<textarea rows="4" cols="50" name="content"></textarea>
|
2022-03-21 23:53:22 +03:00
|
|
|
<input name="threadID" type="hidden" value="<%= thread.id %>"></input>
|
|
|
|
|
2022-03-13 16:16:46 +03:00
|
|
|
<br>
|
|
|
|
|
|
|
|
<button class="button" type="submit">Send!</button>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
2022-03-21 23:53:22 +03:00
|
|
|
<!-- This website is powered by AKF-Forum -->
|
2022-03-13 16:16:46 +03:00
|
|
|
</body>
|
|
|
|
|
2022-02-26 21:12:54 +03:00
|
|
|
</html>
|