mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-22 12:00:41 +03:00
Update thread.ejs
This commit is contained in:
parent
68e4a92b8a
commit
c43011d83d
1 changed files with 52 additions and 70 deletions
122
views/thread.ejs
122
views/thread.ejs
|
@ -4,88 +4,70 @@
|
|||
<%- include("extra/meta", {title: "Thread list!" }) %>
|
||||
|
||||
|
||||
<body style="text-align: center;">
|
||||
<body>
|
||||
<%- include("extra/navbar") %>
|
||||
|
||||
<link href='https://unpkg.com/boxicons@2.1.2/css/boxicons.min.css' rel='stylesheet'>
|
||||
|
||||
<link rel="stylesheet" href="/css/thread.css" />
|
||||
<% if (user){ %>
|
||||
<script type="module" src="/js/thread.js"></script>
|
||||
<% }%>
|
||||
|
||||
<div style="text-align:center;padding:8px">
|
||||
<div class="title">İlk Forum</div>
|
||||
<div class="date">
|
||||
20/04/2000
|
||||
</div>
|
||||
</div>
|
||||
<div class="thread">
|
||||
<div class="left">
|
||||
<img src="https://renk.gen.tr/images/acik-mavi-renk.jpg"/>
|
||||
<div class="username">Tokmak</div>
|
||||
</div>
|
||||
|
||||
<h1 style="font-size: 35px;color: #4d18e6;" ><%= thread.title %></h1>
|
||||
<h3 >View count: <%= thread.views %></h1>
|
||||
<div class="content">
|
||||
Merhaba ! Bu benim ilk yazım Merhaba ! Bu benim ilk yazım
|
||||
Merhaba ! Bu benim ilk yazım
|
||||
Merhaba ! Bu benim ilk yazım
|
||||
Merhaba ! Bu benim ilk yazım
|
||||
Merhaba ! Bu benim ilk yazım
|
||||
Merhaba ! Bu benim ilk yazım
|
||||
Merhaba ! Bu benim ilk yazım
|
||||
|
||||
<h2 style="display:inline;">By <a href="<%='/users/' + thread.author.id %>"> <%= thread.author.name %></a>
|
||||
<img class="circle" src="<%=thread.author.avatar %>">
|
||||
</h2>
|
||||
</div>
|
||||
<div class="likes">
|
||||
<div>
|
||||
<i class='bx bx-like'></i> 5
|
||||
</div>
|
||||
<div>
|
||||
<i class='bx bx-dislike'></i> 30
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if (user && !thread.deleted){ %>
|
||||
<div class="pagination">
|
||||
<div class="back">
|
||||
<i class='bx bxs-chevron-left'></i>
|
||||
</div>
|
||||
<div class="numbers">
|
||||
<a class="number" href="/deneme">1</a>
|
||||
<a class="number" href="/deneme">2</a>
|
||||
<a class="number" href="/deneme">3</a>
|
||||
<a class="number" href="/deneme">4</a>
|
||||
<a class="number" href="/deneme">5</a>
|
||||
<a class="number" href="/deneme">6</a>
|
||||
|
||||
<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>
|
||||
|
||||
<% }; %>
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
<div id="messages" value="<%= thread.id %>">
|
||||
|
||||
<% messages.filter(Boolean).forEach(message=>{ %>
|
||||
|
||||
<div class="message" id="message-<%= message.id %>">
|
||||
|
||||
<h3 style="float:right;"><%= new Date(message.time).toLocaleString() %> </h3>
|
||||
|
||||
<h2>
|
||||
<img class="circle" src="<%= message.author.avatar %>">
|
||||
<a href="/users/<%=message.author.id %>"><%=message.author.name %></a>:
|
||||
</h2>
|
||||
|
||||
<p><%= message.content%></p><br>
|
||||
<div id="message-delete-<%=message.id %>">
|
||||
|
||||
<% if (!message.deleted){ %>
|
||||
|
||||
<a onclick="delete_message('<%=message.id %>');">DELETE</a>
|
||||
<a onclick="edit_message('<%=message.id %>');">EDIT</a>
|
||||
<% }else{ %>
|
||||
<h3 style="display:inline;">This message has been deleted</h3>
|
||||
<a onclick="undelete_message('<%=message.id %>');">UNDELETE</a>
|
||||
<% } %>
|
||||
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<h3 id="count<%=message.id %>" style="display:inline;"><%=message.reactCount %></h3>
|
||||
<a onclick="react('<%=message.id %>', 'like');">+🔼</a>
|
||||
<a onclick="react('<%=message.id %>', 'dislike');">-🔽</a>
|
||||
</div>
|
||||
</div>
|
||||
<% }); %>
|
||||
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
</div>
|
||||
<div class="after">
|
||||
<i class='bx bxs-chevron-right'></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
document.getElementById("message-<%= scroll %>").scrollIntoView();
|
||||
|
@ -94,4 +76,4 @@
|
|||
<!-- BURAYA Bİ İLERİ BİR GERİ SAYFA BUTONU GELMEZ Mİ BE-->
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue