feedless/app/views/profile.ejs

30 lines
715 B
Plaintext
Raw Normal View History

<%- include('_header') %>
2020-04-05 20:11:55 +02:00
<% if (profile.image) { %>
<img src="<%= profile.image %>" />
<% } %>
<h1><%= profile.name %>'s Profile</h1>
<form action="<%= profileUrl(profile.id, "/publish") %>" method="POST">
<textarea name="message"></textarea>
<input type="submit" value="Send" />
</form>
<% posts.map(entry => { %>
<div><%= entry.authorName %> (<%= entry.author.slice(0, 8) %>): <%= entry.content.text %></div>
<hr />
<% }) %>
<h2>Friends</h2>
<ul>
<% friends.map(friend => { %>
<li>
<a href="<%= profileUrl(friend.content.contact) %>">
<%= friend.content.contactName %> (<%= friend.content.contact.slice(0, 8) %>)
</a>
</li>
<% }) %>
</ul>
<%- include('_footer') %>