68 lines
2.7 KiB
Plaintext
68 lines
2.7 KiB
Plaintext
<%- include('_header') %>
|
|
|
|
<div class="columns">
|
|
<div class="about">
|
|
<img class="profile-pic" src="<%= profileImageUrl(profile) %>" />
|
|
<h1><%= profile.name %></h1>
|
|
|
|
<%= profile.description %>
|
|
|
|
<div style="margin-top: 20px">
|
|
<% if (friendshipStatus == "no_relation") { %>
|
|
<form action="<%= profileUrl(profile.id, "/add_friend") %>" method="POST">
|
|
<input type="submit" value="Add as friend" />
|
|
</form>
|
|
<% } else if (friendshipStatus == "friends") { %>
|
|
✅ Friends
|
|
<form action="<%= profileUrl(profile.id, "/reject_friend") %>" style="display:inline; margin-left: 15px" method="POST">
|
|
<input type="submit" class="button-secondary" value="unfriend" />
|
|
</form>
|
|
<% } else if (friendshipStatus == "request_sent") { %>
|
|
<button disabled>Request sent</button>
|
|
<% } else if (friendshipStatus == "request_received") { %>
|
|
<p><%= profile.name %> sent you a friendship request</p>
|
|
<form action="<%= profileUrl(profile.id, "/add_friend") %>" style="display:inline" method="POST">
|
|
<input type="submit" value="Accept" />
|
|
</form>
|
|
<form action="<%= profileUrl(profile.id, "/reject_friend") %>" style="display:inline" method="POST">
|
|
<input type="submit" class="button-secondary" value="Reject" />
|
|
</form>
|
|
<% } else if (friendshipStatus == "request_rejected") { %>
|
|
<p>You rejected <%= profile.name %> friendship request</p>
|
|
<form action="<%= profileUrl(profile.id, "/add_friend") %>" method="POST">
|
|
<input type="submit" value="Add as friend" />
|
|
</form>
|
|
<% } %>
|
|
</div>
|
|
|
|
<%- include('_friends', { friends }) %>
|
|
</div>
|
|
|
|
<div class="wall">
|
|
<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" class="js-public-option">
|
|
Public
|
|
</label>
|
|
<label>
|
|
<input type="radio" name="visibility" value="vanishing" class="js-vanishing-option">
|
|
Vanishing
|
|
</label>
|
|
</div>
|
|
<div style="display: none; padding-top: 20px; font-size: 13px; color: #666" class="js-vanishing-message">
|
|
Vanishing messages are private and disapear right after being read
|
|
</div>
|
|
<textarea name="message" class="compose-post"></textarea>
|
|
<div class="reverse-columns" style="margin-top: 10px">
|
|
<input type="submit" value="Publish" />
|
|
</div>
|
|
</form>
|
|
|
|
<h2 style="margin: 0"><%= profile.name %>'s Wall</h2>
|
|
<%- include('_posts', { posts }) %>
|
|
</div>
|
|
</div>
|
|
|
|
<%- include('_footer') %> |