60 lines
1.7 KiB
Plaintext
60 lines
1.7 KiB
Plaintext
<%- include('_header') %>
|
|
|
|
<div class="columns">
|
|
<div class="about">
|
|
<img class="profile-pic" src="<%= profileImageUrl(profile) %>" />
|
|
<h1><%= profile.name %></h1>
|
|
|
|
<%= profile.description %>
|
|
|
|
<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>
|
|
|
|
<h2>Friends</h2>
|
|
|
|
<ul>
|
|
<% friends.friends.map(friend => { %>
|
|
<li>
|
|
<a href="<%= profileUrl(friend.id) %>">
|
|
<%= friend.name %> (<%= friend.id.slice(0, 8) %>)
|
|
</a>
|
|
</li>
|
|
<% }) %>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="wall">
|
|
<h1><%= profile.name %>'s Wall</h1>
|
|
|
|
<h2>Leave <%= profile.name %> a message</h2>
|
|
<form action="<%= profileUrl(profile.id, "/publish") %>" method="POST">
|
|
<div>
|
|
<label>
|
|
<input type="radio" name="visibility" value="public" checked=checked>
|
|
Public
|
|
</label>
|
|
<label>
|
|
<input type="radio" name="visibility" value="vanishing">
|
|
Vanishing
|
|
</label>
|
|
</div>
|
|
<textarea name="message"></textarea>
|
|
<input type="submit" value="Send" />
|
|
</form>
|
|
|
|
<% posts.map(post => { %>
|
|
<%- include('_post', { post }) %>
|
|
<% }) %>
|
|
</div>
|
|
</div>
|
|
|
|
<%- include('_footer') %> |