File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 < div id ="profile-wrapper " class ="d-flex flex-column ">
1111 < div id ="avatar " class ="d-flex justify-content-center ">
1212 < a href ="{{ site.baseurl }}/ " alt ="avatar ">
13- {% assign avatar = site.avatar %}
14- {% if avatar | slice: 0 == '/' %}
15- {% assign avatar = avatar | prepend: site.baseurl %}
13+ {% assign avatar_url = site.avatar %}
14+ {% capture start %}{{ site.avatar | slice: 0 }}{% endcapture %}
15+ {% if start == '/' %}
16+ {% assign avatar_url = avatar_url | prepend: site.baseurl %}
1617 {% endif %}
17- < img src ="{{ avatar }} ">
18+ < img src ="{{ avatar_url }} ">
1819 </ a >
1920 </ div >
2021
Original file line number Diff line number Diff line change @@ -53,7 +53,9 @@ <h1 data-toc-skip>{{ page.title }}</h1>
5353 {% endif %}
5454 <!-- Add lozad class into image tags. see: <https://github.com/ApoorvSaxena/lozad.js#usage> -->
5555 {% if content contains '< img src =' %}
56- {{ content | replace: '< img src =', '< img class ="lozad " src ="/assets/img/commons/loading.png " data-src =' }}
56+ {% capture loading %}{{ "/assets/img/commons/loading.png" | relative_url }}{% endcapture %}
57+ {% assign replacement = '< img class ="lozad " src =' | append: loading | append: ' data-src =' %}
58+ {{ content | replace: '< img src =', replacement }}
5759 {% else %}
5860 {{ content }}
5961 {% endif %}
You can’t perform that action at this time.
0 commit comments