Render avatar of current user using Vue.js
Requires Pillar 47474ac936ffb1d179161c8a3cac5d20e6005659
This commit is contained in:
@@ -10,10 +10,7 @@
|
|||||||
|
|
||||||
| {% block menu_avatar %}
|
| {% block menu_avatar %}
|
||||||
a.navbar-item.dropdown-toggle(href="{{ url_for('settings.profile') }}", data-toggle="dropdown")
|
a.navbar-item.dropdown-toggle(href="{{ url_for('settings.profile') }}", data-toggle="dropdown")
|
||||||
img.gravatar.rounded-circle(
|
current-user-avatar
|
||||||
src="{{ current_user.gravatar }}",
|
|
||||||
class="{{ subscription }}",
|
|
||||||
alt="Avatar")
|
|
||||||
.special(class="{{ subscription }}")
|
.special(class="{{ subscription }}")
|
||||||
| {% if subscription == 'subscriber' %}
|
| {% if subscription == 'subscriber' %}
|
||||||
i.pi-check
|
i.pi-check
|
||||||
@@ -22,6 +19,8 @@ a.navbar-item.dropdown-toggle(href="{{ url_for('settings.profile') }}", data-tog
|
|||||||
| {% else %}
|
| {% else %}
|
||||||
i.pi-attention
|
i.pi-attention
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
script.
|
||||||
|
new Vue({el: 'current-user-avatar'})
|
||||||
| {% endblock menu_avatar %}
|
| {% endblock menu_avatar %}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user