2022-11-29 15:46:33 +00:00
|
|
|
{% extends "base.html.j2" %}
|
|
|
|
{% import "materialize/wtf.html.j2" as wtf %}
|
|
|
|
|
|
|
|
{% block page_content %}
|
2022-12-13 14:01:04 +00:00
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col s12">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-content">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col s1"></div>
|
|
|
|
<div class="col s3">
|
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
{% if user.avatar %}
|
2022-12-23 08:55:46 +00:00
|
|
|
<img src="{{ url_for('.profile_avatar', user_id=user_id) }}" alt="user-image" class="circle responsive-img">
|
2022-12-13 14:01:04 +00:00
|
|
|
{% else %}
|
|
|
|
<img src="{{ url_for('static', filename='images/user_avatar.png') }}" alt="user-image" class="circle responsive-img">
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="col s1"></div>
|
|
|
|
<div class="col s7">
|
2022-11-29 15:46:33 +00:00
|
|
|
<div class="row">
|
2022-12-13 14:01:04 +00:00
|
|
|
<div class="col s12">
|
2022-12-21 13:38:17 +00:00
|
|
|
<h3 style="float:left">{{ user.username }}<span class="new badge green" id="public-information-badge" data-badge-caption="" style="margin-top:20px;"></span></h3>
|
2022-11-29 15:46:33 +00:00
|
|
|
</div>
|
2022-12-13 14:01:04 +00:00
|
|
|
<div class="col 12">
|
2022-12-19 14:35:06 +00:00
|
|
|
{% if user.show_last_seen %}
|
2023-03-01 13:09:15 +00:00
|
|
|
<div class="chip">Last seen: {{ last_seen }}</div>
|
2022-12-13 14:01:04 +00:00
|
|
|
{% endif %}
|
2022-12-05 08:40:02 +00:00
|
|
|
{% if user.location %}
|
|
|
|
<p><span class="material-icons" style="margin-right:20px; margin-top:20px;">location_on</span><i>{{ user.location }}</i></p>
|
2022-11-30 13:36:42 +00:00
|
|
|
{% endif %}
|
2022-11-29 15:46:33 +00:00
|
|
|
<p></p>
|
|
|
|
<br>
|
2022-12-19 14:35:06 +00:00
|
|
|
{% if user.about_me %}
|
2022-12-13 14:01:04 +00:00
|
|
|
<div style="border-left: solid 3px #E91E63; padding-left: 15px;">
|
|
|
|
<h5>About me</h5>
|
|
|
|
<p>{{ user.about_me }}</p>
|
2022-11-30 13:36:42 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2022-11-29 15:46:33 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-12-13 14:01:04 +00:00
|
|
|
<p></p>
|
|
|
|
<br>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col s1"></div>
|
|
|
|
<div class="col s8">
|
|
|
|
<table>
|
|
|
|
{% if user.full_name %}
|
|
|
|
<tr>
|
|
|
|
<td><span class="material-icons">person</span></td>
|
|
|
|
<td>{{ user.full_name }} </td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
2022-12-19 14:35:06 +00:00
|
|
|
{% if user.show_email %}
|
2022-12-13 14:01:04 +00:00
|
|
|
<tr>
|
|
|
|
<td><span class="material-icons">email</span></td>
|
|
|
|
<td>{{ user.email }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
|
|
|
{% if user.website %}
|
|
|
|
<tr>
|
|
|
|
<td><span class="material-icons">laptop</span></td>
|
|
|
|
<td><a href="{{ user.website }}">{{ user.website }}</a></td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
|
|
|
{% if user.organization %}
|
|
|
|
<tr>
|
|
|
|
<td><span class="material-icons">business</span></td>
|
|
|
|
<td>{{ user.organization }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
|
|
|
</table>
|
|
|
|
<br>
|
2022-12-19 14:35:06 +00:00
|
|
|
{% if user.show_member_since %}
|
2023-03-01 13:09:15 +00:00
|
|
|
<p><i>Member since: {{ member_since }}</i></p>
|
2022-12-13 14:01:04 +00:00
|
|
|
{% endif %}
|
|
|
|
<p></p>
|
|
|
|
<br>
|
2022-12-21 13:38:17 +00:00
|
|
|
{% if current_user.is_authenticated and current_user.hashid == user.id %}
|
|
|
|
<a class="waves-effect waves-light btn-small" href="{{ url_for('.edit_profile', user_id=current_user.id) }}">Edit profile</a>
|
2022-12-13 14:01:04 +00:00
|
|
|
{% endif %}
|
2022-12-05 15:25:54 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-12-13 14:01:04 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-31 07:59:42 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col s6">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-content">
|
2023-03-01 13:09:15 +00:00
|
|
|
<h4>Followed corpora</h4>
|
|
|
|
<div class="followed-corpus-list no-autoinit"></div>
|
2023-01-31 07:59:42 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col s6">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-content">
|
|
|
|
<h4>Public corpora</h4>
|
2023-03-01 13:09:15 +00:00
|
|
|
<div class="public-corpus-list no-autoinit"></div>
|
2023-01-31 07:59:42 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-12-13 14:01:04 +00:00
|
|
|
</div>
|
2022-11-29 15:46:33 +00:00
|
|
|
{% endblock page_content %}
|
2022-12-13 14:01:04 +00:00
|
|
|
|
|
|
|
{% block scripts %}
|
|
|
|
{{ super() }}
|
|
|
|
<script>
|
|
|
|
let publicInformationBadge = document.querySelector('#public-information-badge');
|
2022-12-21 13:38:17 +00:00
|
|
|
if ("{{ user.id }}" == "{{ current_user.hashid }}") {
|
2022-12-13 14:01:04 +00:00
|
|
|
if ("{{ user.is_public }}" == "True") {
|
|
|
|
publicInformationBadge.dataset.badgeCaption = 'Your profile is public';
|
|
|
|
publicInformationBadge.classList.add('green');
|
|
|
|
publicInformationBadge.classList.remove('red');
|
|
|
|
} else {
|
|
|
|
publicInformationBadge.dataset.badgeCaption = 'Your profile is private';
|
|
|
|
publicInformationBadge.classList.add('red');
|
|
|
|
publicInformationBadge.classList.remove('green');
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
publicInformationBadge.remove();
|
|
|
|
}
|
2023-03-01 13:09:15 +00:00
|
|
|
|
|
|
|
let followedCorpusList = new FollowedCorpusList(document.querySelector('.followed-corpus-list'));
|
|
|
|
followedCorpusList.add({{ followed_corpora|tojson }});
|
|
|
|
let publicCorpusList = new PublicCorpusList(document.querySelector('.public-corpus-list'));
|
|
|
|
publicCorpusList.add({{ own_public_corpora|tojson }});
|
2022-12-13 14:01:04 +00:00
|
|
|
</script>
|
|
|
|
{% endblock scripts %}
|
|
|
|
|