2022-03-13 16:16:46 +03:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
|
2022-08-26 22:09:02 +03:00
|
|
|
<%- include("extra/meta", {title: "Thread list!" }) %>
|
2022-03-26 23:28:10 +03:00
|
|
|
|
2022-08-11 17:55:48 +03:00
|
|
|
|
2022-08-26 22:09:02 +03:00
|
|
|
<body style="text-align: center;">
|
|
|
|
<%- include("extra/navbar") %>
|
2022-08-11 02:43:15 +03:00
|
|
|
|
2022-08-26 22:09:02 +03:00
|
|
|
<link rel="stylesheet" href="/css/thread.css" />
|
2022-08-27 14:08:28 +03:00
|
|
|
<% if (user){ %>
|
|
|
|
<script type="module" src="/js/thread.js"></script>
|
|
|
|
<% }%>
|
2022-03-13 16:16:46 +03:00
|
|
|
|
|
|
|
|
2022-08-27 14:08:28 +03:00
|
|
|
<h1 style="font-size: 35px;color: #4d18e6;" ><%= thread.title %></h1>
|
2022-08-28 15:23:19 +03:00
|
|
|
<h3 >View count: <%= thread.views %></h1>
|
2022-03-13 16:16:46 +03:00
|
|
|
|
2022-08-27 14:08:28 +03:00
|
|
|
<h2 style="display:inline;">By <a href="<%='/users/' + thread.author.id %>"> <%= thread.author.name %></a>
|
2022-08-27 10:31:16 +03:00
|
|
|
<img class="circle" src="<%=thread.author.avatar %>">
|
2022-08-26 22:09:02 +03:00
|
|
|
</h2>
|
2022-08-11 17:55:48 +03:00
|
|
|
|
2022-08-26 22:09:02 +03:00
|
|
|
<% if (user && !thread.deleted){ %>
|
2022-03-13 16:16:46 +03:00
|
|
|
|
2022-08-27 14:08:28 +03:00
|
|
|
<a onclick="delete_thread('<%= thread.id %>' )" value=style="display:inline;" >DELETE</a>
|
|
|
|
<a onclick="edit_thread('<%= thread.id %>')" style="display:inline;" >EDIT</a>
|
|
|
|
<% } else if (thread.deleted) { %>
|
|
|
|
<h3 style="display:inline;">This thread has been deleted</h3>
|
|
|
|
<a onclick="undelete_thread('<%= thread.id %>')" style="display:inline;" >UNDELETE</a>
|
2022-04-06 21:14:46 +03:00
|
|
|
|
2022-08-27 14:08:28 +03:00
|
|
|
<% }; %>
|
2022-03-13 16:16:46 +03:00
|
|
|
|
2022-08-11 02:43:15 +03:00
|
|
|
|
2022-08-26 22:09:02 +03:00
|
|
|
<hr>
|
2022-03-21 23:53:22 +03:00
|
|
|
|
2022-03-13 16:16:46 +03:00
|
|
|
|
2022-08-26 22:09:02 +03:00
|
|
|
<div id="messages" value="<%= thread.id %>">
|
|
|
|
<% if (!user){ %>
|
|
|
|
<h1>Guests cant view messages!</h1>
|
|
|
|
<% }%>
|
2022-04-03 21:01:55 +03:00
|
|
|
|
2022-08-26 22:09:02 +03:00
|
|
|
<!--EXAMPLE MESSAGE-->
|
|
|
|
<div class="message" id="message-3">
|
|
|
|
|
|
|
|
<h3 style="float:right;">26.08.2022 15:37:42</h3>
|
|
|
|
|
|
|
|
<h2>
|
2022-08-27 14:08:28 +03:00
|
|
|
<img class="circle" src="https://cdn.discordapp.com/avatars/539506680140922890/abd74d10aac094fc8a5ad5c86f29fdb9.png?size=1024">
|
2022-08-26 22:09:02 +03:00
|
|
|
<a href="/users/0"> Akif9748</a>:
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
<p>Example message for development</p><br>
|
|
|
|
<div id="message-delete-3">
|
2022-08-27 14:08:28 +03:00
|
|
|
<a onclick="delete_message('3');">DELETE</a>
|
|
|
|
<a onclick="edit_message('3');">EDIT</a>
|
|
|
|
|
2022-08-26 22:09:02 +03:00
|
|
|
</div>
|
|
|
|
<div style="float: right;">
|
|
|
|
<h3 id="count3" style="display:inline;">0</h3>
|
2022-08-27 14:08:28 +03:00
|
|
|
<a onclick="react('3', 'like');">+🔼</a>
|
|
|
|
<a onclick="react('3', 'dislike');">-🔽</a>
|
2022-08-26 22:09:02 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!--EXAMPLE MESSAGE END-->
|
2022-04-03 21:01:55 +03:00
|
|
|
|
2022-08-26 22:09:02 +03:00
|
|
|
</div>
|
2022-08-24 23:00:33 +03:00
|
|
|
|
2022-08-26 22:09:02 +03:00
|
|
|
<hr>
|
|
|
|
|
|
|
|
|
|
|
|
<form id="send">
|
|
|
|
<textarea rows="4" cols="133" name="content"></textarea>
|
|
|
|
<input name="threadID" type="hidden" value="<%= thread.id %>"></input>
|
|
|
|
|
|
|
|
<br>
|
|
|
|
<% if (user){ %>
|
|
|
|
<button type="submit">Send!</button>
|
2022-08-27 14:08:28 +03:00
|
|
|
<%} else {%>
|
|
|
|
<button disabled>Login for send</button>
|
|
|
|
<% }%>
|
2022-08-26 22:09:02 +03:00
|
|
|
|
|
|
|
</form>
|
|
|
|
|
2022-08-27 14:08:28 +03:00
|
|
|
|
2022-08-26 22:09:02 +03:00
|
|
|
<script>
|
|
|
|
document.getElementById("message-<%= scroll %>").scrollIntoView();
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<!-- BURAYA Bİ İLERİ BİR GERİ SAYFA BUTONU GELMEZ Mİ BE-->
|
|
|
|
</body>
|
2022-03-13 16:16:46 +03:00
|
|
|
|
2022-08-11 17:55:48 +03:00
|
|
|
</html>
|