Skip to content

Instantly share code, notes, and snippets.

@Porter97
Created March 3, 2020 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Porter97/857d376f46682547af40dd3fb890c790 to your computer and use it in GitHub Desktop.
Save Porter97/857d376f46682547af40dd3fb890c790 to your computer and use it in GitHub Desktop.
#...
<p>Member since {{ moment(user.member_since).format('L') }}. Last seen {{ moment(user.last_seen).fromNow() }}.</p>
<p>
{% if current_user.can(Permission.FOLLOW) and user != current_user %}
{% if not current_user.is_following(user) %}
<a href="{{ url_for('.follow', username=user.username) }}" class="btn btn-primary">Follow</a>
{% else %}
<a href="{{ url_for('.unfollow', username=user.username) }}" class="btn btn-default">Unfollow</a>
{% endif %}
{% endif %}
{% if current_user.is_authenticated and user != current_user and user.is_following(current_user) %}
| <span class="label label-default">Follows you</span>
{% endif %}
</p>
#...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment