mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-16 17:05:05 +03:00
69 lines
No EOL
2.2 KiB
Text
69 lines
No EOL
2.2 KiB
Text
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<%- include("extra/old_header", { title: thread.title }) %>
|
|
|
|
<body>
|
|
|
|
<%- include("extra/old_navbar", {user}) %>
|
|
|
|
|
|
<h1 style="font-size: 35px;">
|
|
<%= thread.title %>
|
|
</h1>
|
|
|
|
<h2 style="display:inline;">By <a href=<%="/users/" + thread.author.id %>> <%= thread.author.name %></a>
|
|
<img class="circle" src=<%=thread.author.avatar %> alt=<%= thread.author.name %>>
|
|
</h2>
|
|
|
|
<% if (user && !thread.deleted){ %>
|
|
|
|
<button id="delete_thread" value="<%= thread.id %>" style="display:inline;" type="submit">DELETE</button>
|
|
<button id="edit_thread" style="display:inline;" type="submit">EDIT</button>
|
|
<% } else if (thread.deleted) { %>
|
|
<h3 style="display:inline;">This thread has been deleted</h3>
|
|
<% }; %>
|
|
|
|
<hr>
|
|
|
|
|
|
<div id="messages" value="<%= thread.id %>">
|
|
<% if (!user){ %>
|
|
<h1>Guests cant view messages!</h1>
|
|
<% }%>
|
|
</div>
|
|
|
|
<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>
|
|
<%} else {%>
|
|
<button disabled>Login for send</button>
|
|
<% }%>
|
|
|
|
</form>
|
|
|
|
<% if (user){ %>
|
|
<script type="module" src="/js/thread.js"></script>
|
|
<% }%>
|
|
<script>
|
|
document.getElementById("message-<%= scroll %>").scrollIntoView();
|
|
</script>
|
|
|
|
<!-- <div style="float: right;">
|
|
<h3 id="page_count" style="display:inline;">1</h3>
|
|
<button id="left_page" style=" display:inline;float: right;" type="submit">PREV</button>
|
|
|
|
<button id="right_page" style="display:inline;float: right;" type="submit">NEXT</button>
|
|
</div>-->
|
|
|
|
<%- include("extra/old_footer") %>
|
|
</body>
|
|
|
|
</html> |