Render avatar of current user using Vue.js

Requires Pillar 47474ac936ffb1d179161c8a3cac5d20e6005659
This commit is contained in:
Sybren A. Stüvel 2019-05-31 12:28:04 +02:00
parent d49f69ecbd
commit 76825fda39

View File

@ -10,10 +10,7 @@
| {% block menu_avatar %}
a.navbar-item.dropdown-toggle(href="{{ url_for('settings.profile') }}", data-toggle="dropdown")
img.gravatar.rounded-circle(
src="{{ current_user.gravatar }}",
class="{{ subscription }}",
alt="Avatar")
current-user-avatar
.special(class="{{ subscription }}")
| {% if subscription == 'subscriber' %}
i.pi-check
@ -22,6 +19,8 @@ a.navbar-item.dropdown-toggle(href="{{ url_for('settings.profile') }}", data-tog
| {% else %}
i.pi-attention
| {% endif %}
script.
new Vue({el: 'current-user-avatar'})
| {% endblock menu_avatar %}