Rounded avatar in profile widget (#401)
* Rounded avatar in profile widget * Make rounded avatar configurablepull/402/head
parent
c2a542c8bb
commit
5ca3c9ce52
|
@ -88,6 +88,11 @@ const ProfileSpec = {
|
|||
[doc]: 'Path or URL to the avatar to be shown in the profile widget',
|
||||
[defaultValue]: '/images/avatar.png'
|
||||
},
|
||||
avatar_rounded: {
|
||||
[type]: 'boolean',
|
||||
[doc]: 'Whether to show avatar image rounded or square',
|
||||
[defaultValue]: true
|
||||
},
|
||||
gravatar: {
|
||||
[type]: 'string',
|
||||
[doc]: 'Email address for the Gravatar to be shown in the profile widget',
|
||||
|
|
|
@ -14,7 +14,13 @@
|
|||
<nav class="level">
|
||||
<div class="level-item has-text-centered">
|
||||
<div>
|
||||
<img class="image is-128x128 has-mb-6" src="<%= avatar() %>" alt="<%= get_config_from_obj(widget, 'author') %>">
|
||||
<% if (get_config_from_obj(widget, 'avatar_rounded')) { %>
|
||||
<figure class="image container is-128x128 has-mb-6">
|
||||
<img class="is-rounded" src="<%= avatar() %>" alt="<%= get_config_from_obj(widget, 'author') %>">
|
||||
</figure>
|
||||
<% } else { %>
|
||||
<img class="image is-128x128 has-mb-6" src="<%= avatar() %>" alt="<%= get_config_from_obj(widget, 'author') %>">
|
||||
<% } %>
|
||||
<% if (get_config_from_obj(widget, 'author')) { %>
|
||||
<p class="is-size-4 is-block">
|
||||
<%= get_config_from_obj(widget, 'author') %>
|
||||
|
|
Loading…
Reference in New Issue