akf-forum/views/index.ejs

54 lines
1.2 KiB
Text
Raw Normal View History

2022-03-13 16:16:46 +03:00
<!DOCTYPE html>
<html lang="en">
2022-03-26 23:28:10 +03:00
<%- include("extra/header", {title: "Main page!" }) %>
2022-03-13 16:16:46 +03:00
<body>
2022-03-22 21:25:09 +03:00
2022-04-03 21:01:55 +03:00
<%- include("extra/navbar") %>
2022-03-26 23:28:10 +03:00
2022-04-03 21:01:55 +03:00
<% if (user) { %>
2022-03-13 16:16:46 +03:00
<h1>Welcome, <a href=<%=user.getLink() %>> <%= user.name %></a>
2022-08-11 15:36:28 +03:00
<img class="circle" src=<%=user.avatar %> alt=<%= user.name %>>
2022-03-22 21:25:09 +03:00
<br>
2022-04-06 22:49:16 +03:00
You can log out of the site here:
2022-08-11 15:36:28 +03:00
<a href="/login/"><button>LOGOUT</button> </a>
2022-03-13 16:16:46 +03:00
</h1>
<br>
2022-04-03 21:01:55 +03:00
<% } else { %>
2022-04-06 22:49:16 +03:00
<h1>Welcome, Guest!<br>You can press the button to register:
2022-08-11 15:36:28 +03:00
<a href="/register/"> <button class="big">REGISTER</button> </a>
2022-04-03 21:01:55 +03:00
</h1>
<% } %>
2022-03-13 16:16:46 +03:00
<h1>Statistics:</h1>
<ul>
<li>
2022-03-22 21:25:09 +03:00
<h3>Message count: <b>
<%= messages %>
</b></h3>
2022-03-13 16:16:46 +03:00
</li>
<li>
2022-03-22 21:25:09 +03:00
<h3>User count: <b>
<%= users %>
</b></h3>
2022-03-13 16:16:46 +03:00
</li>
<li>
2022-03-22 21:25:09 +03:00
<h3>Thread count: <b>
<%= threads %>
</b></h3>
2022-03-13 16:16:46 +03:00
</li>
<li>
2022-03-22 21:25:09 +03:00
<h3>Memory usage: <b>
<%= mem.toFixed(2); %> MB
</b></h3>
2022-03-13 16:16:46 +03:00
</li>
</ul>
2022-03-26 23:28:10 +03:00
<%- include("extra/footer") %>
2022-03-13 16:16:46 +03:00
</body>
2022-04-06 22:49:16 +03:00
</html>