2020-04-05 18:38:49 +02:00
|
|
|
<%- include('_header') %>
|
|
|
|
|
2020-04-06 10:16:50 +02:00
|
|
|
<div class="columns">
|
|
|
|
<div class="about">
|
2020-04-06 20:41:13 +02:00
|
|
|
<img class="profile-pic" src="<%= profileImageUrl(profile) %>" />
|
|
|
|
<h1><%= profile.name %></h1>
|
|
|
|
|
|
|
|
<%= profile.description %>
|
2020-04-05 18:38:49 +02:00
|
|
|
|
2020-04-11 18:03:58 +02:00
|
|
|
<form action="<%= profileUrl(profile.id, "/add_friend") %>" method="POST" style="margin-top: 20px" >
|
|
|
|
<% if (friendshipStatus == "no_relation") { %>
|
|
|
|
<input type="submit" value="Add as friend" />
|
|
|
|
<% } else if (friendshipStatus == "friends") { %>
|
|
|
|
✅ Friends
|
|
|
|
<% } else if (friendshipStatus == "request_sent") { %>
|
|
|
|
<button disabled>Request sent</button>
|
|
|
|
<% } else if (friendshipStatus == "request_received") { %>
|
|
|
|
<input type="submit" value="Accept friendship" />
|
|
|
|
<% } %>
|
|
|
|
</form>
|
|
|
|
|
2020-04-06 10:16:50 +02:00
|
|
|
<h2>Friends</h2>
|
2020-04-05 18:38:49 +02:00
|
|
|
|
2020-04-06 10:16:50 +02:00
|
|
|
<ul>
|
2020-04-11 23:57:47 +02:00
|
|
|
<% friends.friends.map(friend => { %>
|
2020-04-06 10:16:50 +02:00
|
|
|
<li>
|
2020-04-11 23:57:47 +02:00
|
|
|
<a href="<%= profileUrl(friend.id) %>">
|
|
|
|
<%= friend.name %> (<%= friend.id.slice(0, 8) %>)
|
2020-04-06 10:16:50 +02:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% }) %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2020-04-05 18:38:49 +02:00
|
|
|
|
2020-04-06 10:16:50 +02:00
|
|
|
<div class="wall">
|
|
|
|
<h1><%= profile.name %>'s Wall</h1>
|
2020-04-08 08:44:23 +02:00
|
|
|
|
2020-04-06 10:16:50 +02:00
|
|
|
<h2>Leave <%= profile.name %> a message</h2>
|
|
|
|
<form action="<%= profileUrl(profile.id, "/publish") %>" method="POST">
|
2020-04-08 08:44:23 +02:00
|
|
|
<div>
|
|
|
|
<label>
|
2020-04-08 20:04:11 +02:00
|
|
|
<input type="radio" name="visibility" value="public" checked=checked>
|
2020-04-08 08:44:23 +02:00
|
|
|
Public
|
|
|
|
</label>
|
|
|
|
<label>
|
|
|
|
<input type="radio" name="visibility" value="vanishing">
|
|
|
|
Vanishing
|
|
|
|
</label>
|
|
|
|
</div>
|
2020-04-06 10:16:50 +02:00
|
|
|
<textarea name="message"></textarea>
|
2020-04-11 18:03:58 +02:00
|
|
|
<input type="submit" value="Send" />
|
2020-04-08 08:44:23 +02:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<% posts.map(post => { %>
|
|
|
|
<%- include('_post', { post }) %>
|
2020-04-06 10:16:50 +02:00
|
|
|
<% }) %>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-04-05 18:38:49 +02:00
|
|
|
|
|
|
|
<%- include('_footer') %>
|