Prevent the site test from failing when the avatar is not assigned (close #418)
Some rookies like to do this :(
This commit is contained in:
parent
945e8d1953
commit
a887f1d57d
1 changed files with 12 additions and 10 deletions
|
@ -6,6 +6,7 @@
|
|||
<div class="profile-wrapper text-center">
|
||||
<div id="avatar">
|
||||
<a href="{{ '/' | relative_url }}" alt="avatar" class="mx-auto">
|
||||
{% if site.avatar != '' and site.avatar %}
|
||||
{% capture avatar_url %}
|
||||
{%- if site.avatar contains '://' -%}
|
||||
{{ site.avatar }}
|
||||
|
@ -16,6 +17,7 @@
|
|||
{%- endif -%}
|
||||
{% endcapture %}
|
||||
<img src="{{ avatar_url }}" alt="avatar" onerror="this.style.display='none'">
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue