express-message-board/views/user.ejs
ak f36b48f4ce progress update
image uploading works
hosted at deta space
2023-09-20 18:00:32 -07:00

57 lines
1.7 KiB
Text

<!DOCTYPE html>
<html>
<head>
<title>b0ard - <%= user.username %></title>
<link rel="stylesheet" href="/styles/css/bootstrap.min.css" />
<link rel="stylesheet" href="/stylesheets/index.css" />
</head>
<body class="bg-dark text-light">
<header
class="d-flex w-100 align-items-center justify-content-between border-bottom mb-2 border-light py-2 px-4 w-100"
>
<a href="/" class="logotext p-0 m-0 fs-1">b0ard</a>
<a
href="/user/<%= user._id %>"
type="button"
class="btn btn-outline-light px-4 py-2"
>
<div class="d-flex align-items-center gap-3">
<img
src="data:image/image/png;base64,
<%=user.avatar.toString('base64')%>"
width="24px"
/>
<%= currentUser.username %>
</div>
</a>
</header>
<div class="d-flex flex-column py-4 px-4 align-items-center">
<div class="d-flex align-items-center gap-5 mb-5">
<img
src="data:image/image/png;base64,
<%=user.avatar.toString('base64')%>"
width="120rem"
class="border-light border p-2 rounded"
/>
<h1 class="text-decoration-underline"><%= user.username %></h1>
</div>
<% if (user.username === currentUser.username) { %>
<a
href="/user/<%= user._id %>/edit"
type="button"
class="btn btn-outline-light px-4 py-2"
>
Edit User
</a>
<div class="pb-4"></div>
<a
href="/user/<%= user._id %>/logout"
type="button"
class="btn btn-danger px-4 py-2"
>
Log Out
</a>
<% } %>
</div>
</body>
</html>