Skip to content

Commit cee5794

Browse files
Update about.liquid
1 parent 966bcd1 commit cee5794

1 file changed

Lines changed: 25 additions & 8 deletions

File tree

_layouts/about.liquid

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,35 @@ layout: default
1919
<div class="profile float-{% if page.profile.align == 'left' %}left{% else %}right{% endif %}">
2020
{% if page.profile.image %}
2121
{% assign profile_image_path = page.profile.image | prepend: 'assets/img/' %}
22+
{% assign profile_image_hover_path = page.profile.image_hover | prepend: 'assets/img/' %}
23+
2224
{% if page.profile.image_circular %}
2325
{% assign profile_image_class = 'img-fluid z-depth-1 rounded-circle' %}
2426
{% else %}
25-
{% assign profile_image_class = 'img-fluid z-depth-1
26-
rounded' %}
27+
{% assign profile_image_class = 'img-fluid z-depth-1 rounded' %}
28+
{% endif %}
29+
30+
{% capture sizes %}(min-width: {{ site.max_width }}) {{ site.max_width | minus: 30 | times: 0.3}}px, (min-width: 576px) 30vw, 95vw{% endcapture %}
31+
32+
{% if page.profile.image_hover %}
33+
<div class="profile-hover-swap">
34+
{%
35+
include figure.liquid loading="eager" path=profile_image_path class=profile_image_class sizes=sizes alt=page.profile.image
36+
cache_bust=true
37+
%}
38+
<div class="hover-img">
39+
{%
40+
include figure.liquid loading="eager" path=profile_image_hover_path class=profile_image_class sizes=sizes alt=page.profile.image_hover
41+
cache_bust=true
42+
%}
43+
</div>
44+
</div>
45+
{% else %}
46+
{%
47+
include figure.liquid loading="eager" path=profile_image_path class=profile_image_class sizes=sizes alt=page.profile.image
48+
cache_bust=true
49+
%}
2750
{% endif %}
28-
{% capture sizes %}(min-width: {{ site.max_width }}) {{ site.max_width | minus: 30 | times: 0.3}}px, (min-width: 576px)
29-
30vw, 95vw"{% endcapture %}
30-
{%
31-
include figure.liquid loading="eager" path=profile_image_path class=profile_image_class sizes=sizes alt=page.profile.image
32-
cache_bust=true
33-
%}
3451
{% endif %}
3552
{% if page.profile.more_info %}
3653
<div class="more-info">{{ page.profile.more_info }}</div>

0 commit comments

Comments
 (0)