coriplus/app/templates/includes/infobox_profile.html

36 lines
1.6 KiB
HTML
Raw Normal View History

2019-10-17 14:34:55 +02:00
{% set profile = user.profile %}
<div class="infobox">
<h3>{{ profile.full_name }}</h3>
<p>{{ profile.biography|enrich }}</p>
{% if profile.location %}
2019-10-20 13:14:16 +02:00
<p><span class="weak">Location:</span> {{ profile.location|locationdata }}</p>
2019-10-17 14:34:55 +02:00
{% endif %}
{% if profile.year %}
<p><span class="weak">Year:</span> {{ profile.year }}</p>
{% endif %}
{% if profile.website %}
2019-10-20 13:14:16 +02:00
{% set website = profile.website %}
{% set website = website if website.startswith(('http://', 'https://')) else 'http://' + website %}
2019-10-17 14:34:55 +02:00
<p><span class="weak">Website:</span> {{ profile.website|urlize }}</p>
{% endif %}
{% if profile.instagram %}
<p><span class="weak">Instagram:</span> <a href="https://www.instagram.com/{{ profile.instagram }}">{{ profile.instagram }}</a></p>
{% endif %}
{% if profile.facebook %}
<p><span class="weak">Facebook:</span> <a href="https://facebook.com/{{ profile.facebook }}">{{ profile.facebook }}</a></p>
{% endif %}
2019-10-23 21:09:51 +02:00
{% if profile.telegram %}
<p><span class="weak">Telegram:</span> <a href="https://t.me/{{ profile.facebook }}">{{ profile.telegram }}</a></p>
{% endif %}
2019-10-17 14:34:55 +02:00
<p>
<strong>{{ user.messages|count }}</strong> messages
-
2019-10-23 21:09:51 +02:00
<a href="{{ url_for('website.user_followers', username=user.username) }}"><strong>{{ user.followers()|count }}</strong></a> followers
2019-10-17 14:34:55 +02:00
-
2019-10-23 21:09:51 +02:00
<a href="{{ url_for('website.user_following', username=user.username) }}"><strong>{{ user.following()|count }}</strong></a> following
2019-10-17 14:34:55 +02:00
</p>
{% if user == current_user %}
2021-10-17 10:20:47 +02:00
<p><a href="/edit_profile/">{{ inline_svg('edit', 18) }} Edit profile</a></p>
2019-10-17 14:34:55 +02:00
{% endif %}
</div>