fix(widget): round profile avatar not centered

pull/529/head
ppoffice 2019-09-02 11:58:21 -04:00
parent 7326878b41
commit abe1b82d44
2 changed files with 6 additions and 7 deletions

View File

@ -14,13 +14,10 @@
<nav class="level"> <nav class="level">
<div class="level-item has-text-centered" style="flex-shrink: 1"> <div class="level-item has-text-centered" style="flex-shrink: 1">
<div> <div>
<% if (get_config_from_obj(widget, 'avatar_rounded')) { %> <% const is_rounded = get_config_from_obj(widget, 'avatar_rounded', false); %>
<figure class="image is-128x128 has-mb-6"> <figure class="image is-128x128 has-mb-6">
<img class="is-rounded" src="<%= avatar() %>" alt="<%= get_config_from_obj(widget, 'author') %>"> <img <%= is_rounded ? 'class="is-rounded"' : '' %> src="<%= avatar() %>" alt="<%= get_config_from_obj(widget, 'author') %>">
</figure> </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')) { %> <% if (get_config_from_obj(widget, 'author')) { %>
<p class="is-size-4 is-block"> <p class="is-size-4 is-block">
<%= get_config_from_obj(widget, 'author') %> <%= get_config_from_obj(widget, 'author') %>

View File

@ -127,6 +127,8 @@ img.thumbnail
margin-right: 0 margin-right: 0
.menu-list a.level .menu-list a.level
display: flex display: flex
.has-text-centered figure.image
margin: auto
.pagination .pagination
.pagination-link:not(.is-current), .pagination-previous, .pagination-next .pagination-link:not(.is-current), .pagination-previous, .pagination-next