akf-forum/views/index.ejs
2022-08-26 20:22:46 +03:00

53 lines
1.3 KiB
Text

<!DOCTYPE html>
<html lang="en">
<%- include("extra/meta", {title: "Welcome to the Akf-forum!" }) %>
<body style="text-align: center;">
<%- include("extra/navbar") %>
<% if (user) { %>
<h1 style="color: #4d18e6;">Welcome, <div class="box-username"><%= user.name %>
<div class="avatar"><img src="<%=user.avatar %>"></div>
</div>
<br>
You can log out of the site here:
<a href="/login" class="btn-outline-primary">LOGOUT</a>
</h1>
<br>
<% } else { %>
<h1 style="color: #4d18e6;">Welcome, Guest!<br>You can press the button to register:
<a href="/register" class="btn-outline-primary">REGISTER</a>
</h1>
<% } %>
<h1 style="color: #606060;">Statistics:</h1>
<ul>
<li>
<h3>Message count: <b>
<%= messages %>
</b></h3>
</li>
<li>
<h3>User count: <b>
<%= users %>
</b></h3>
</li>
<li>
<h3>Thread count: <b>
<%= threads %>
</b></h3>
</li>
<li>
<h3>Memory usage: <b>
<%= mem.toFixed(2); %> MB
</b></h3>
</li>
</ul>
</body>
</html>