47 lines
1,022 B
Plaintext
47 lines
1,022 B
Plaintext
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<%- include('../partials/head'); %>
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<%- include('../partials/header') -%>
|
||
|
<div id="content">
|
||
|
<%- include('../partials/top'); %>
|
||
|
<main>
|
||
|
|
||
|
<%
|
||
|
if(locals.login){
|
||
|
%>
|
||
|
<div style="background-color: green;">You are logged in</div>
|
||
|
<% } else {; %>
|
||
|
<div style="background-color:red">You are not logged in</div>
|
||
|
<% } %>
|
||
|
<% messages.forEach((m) => { %>
|
||
|
|
||
|
<strong><%= m.username %></strong>:
|
||
|
<%= m.text %>
|
||
|
<br>
|
||
|
<% }); %>
|
||
|
</ul>
|
||
|
<%
|
||
|
if(locals.login){
|
||
|
%>
|
||
|
<form id="submitForm" action="/message" method="post">
|
||
|
<label for="subjectText">Subject:</label>
|
||
|
<input type="text" name="subjectText" id="">
|
||
|
<label for="messageText">message:</label>
|
||
|
<textarea name="messageText" id="" cols="30" rows="10"></textarea>
|
||
|
<button type="submit">send</button>
|
||
|
</form>
|
||
|
<% }; %>
|
||
|
|
||
|
</main>
|
||
|
</div>
|
||
|
<footer>
|
||
|
<%- include('../partials/footer'); %>
|
||
|
</footer>
|
||
|
|
||
|
</body>
|
||
|
</html>
|