Fixed related URL.
This commit is contained in:
parent
b534ab74de
commit
ff9663f376
2 changed files with 8 additions and 5 deletions
|
@ -10,11 +10,12 @@
|
||||||
<div id="profile-wrapper" class="d-flex flex-column">
|
<div id="profile-wrapper" class="d-flex flex-column">
|
||||||
<div id="avatar" class="d-flex justify-content-center">
|
<div id="avatar" class="d-flex justify-content-center">
|
||||||
<a href="{{ site.baseurl }}/" alt="avatar">
|
<a href="{{ site.baseurl }}/" alt="avatar">
|
||||||
{% assign avatar = site.avatar %}
|
{% assign avatar_url = site.avatar %}
|
||||||
{% if avatar | slice: 0 == '/' %}
|
{% capture start %}{{ site.avatar | slice: 0 }}{% endcapture %}
|
||||||
{% assign avatar = avatar | prepend: site.baseurl %}
|
{% if start == '/' %}
|
||||||
|
{% assign avatar_url = avatar_url | prepend: site.baseurl %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<img src="{{ avatar }}">
|
<img src="{{ avatar_url }}">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,9 @@ layout: default
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<!-- Add lozad class into image tags. see: <https://github.com/ApoorvSaxena/lozad.js#usage> -->
|
<!-- Add lozad class into image tags. see: <https://github.com/ApoorvSaxena/lozad.js#usage> -->
|
||||||
{% if content contains '<img src=' %}
|
{% if content contains '<img src=' %}
|
||||||
{{ content | replace: '<img src=', '<img class="lozad" src="/assets/img/commons/loading.png" data-src=' }}
|
{% capture loading %}{{ "/assets/img/commons/loading.png" | relative_url }}{% endcapture %}
|
||||||
|
{% assign replacement = '<img class="lozad" src=' | append: loading | append: ' data-src=' %}
|
||||||
|
{{ content | replace: '<img src=', replacement }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ content }}
|
{{ content }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue