-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patho_user_profile.html
More file actions
85 lines (81 loc) · 3.06 KB
/
o_user_profile.html
File metadata and controls
85 lines (81 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{% extends "layout.html" %}
{% block optional_c %}
<link href="/static/styles/profiles.css" rel="stylesheet">
<script src="/static/scripts/ou_profiles.js"></script>
{% endblock %}
{% block title %}
{{ user["username"] }}'s Profile
{% endblock %}
{% block main %}
<div class="container-main o-profile">
<div class="profile-pic"><img src="{% if user['pfp_location'] %} /{{ user['pfp_location'] }} {% else %} /static/images/user_profile_pic.png {% endif %}"></div>
<div class="fullname">
<div class="p-header">{{ user["fullname"] }}</div>
</div>
<div class="username">
@{{ user["username"] }}
</div>
<div class="stats">
<div class="stat">
Friends
<div id="friends">
{{ user["friends"] }}
</div>
</div>
<div class="stat">
Carnivals
<br>
{{ user["carnival"] }}
</div>
<div class="stat">
Posts
<br>
{{ user["posts"] }}
</div>
</div>
<div class="p-buttons">
<button class="btn btn-primary btn-prof" type="button" id="manage_friend"></button>
<a href="/inbox/{{ user['id'] }}"><button class="btn btn-primary btn-prof" type="button" id="message">Message</button></a>
<button class="btn btn-primary btn-prof" type="button" id="share_account">Share Account</button>
</div>
<div id="status1" style="color: green;"></div>
<div id="status2"></div>
<div class="about-me">
<div class="p-header">About Me</div>
{% if user["about_me"] %}
<p style="white-space: pre-line">{{ user["about_me"] }}</p>
{% else %}
Hello there! It seems like I haven't shared much about myself yet.
<br>
Life is full of stories, and I look forward to sharing mine with you soon. Stay tuned!
{% endif %}
</div>
{% if interests %}
<p class="p-header">Interests</p>
<div class="interests">
{% for interest in interests %}
<span class="interest">#{{ interest["interest"] }}</span>
{% endfor %}
</div>
{% endif %}
</div>
<script>
let friend = document.getElementById('manage_friend');
let friend_status = {{ friends_status }};
let user_id = {{ user["id"] }};
document.addEventListener('DOMContentLoaded', function() {
refresh_status();
});
function refresh_status() {
if (friend_status == 0) {
friend.innerHTML = "Add Friend";
} else if (friend_status == 1) {
friend.innerHTML = "Remove Friend";
} else if (friend_status == 2) {
friend.innerHTML = "Cancel Request";
} else {
friend.innerHTML = "Accept Request";
}
}
</script>
{% endblock %}