Skip to content

Commit bd52356

Browse files
Refactor profile section and adjust GIF placement for improved layout
1 parent c1aac4a commit bd52356

File tree

2 files changed

+41
-45
lines changed

2 files changed

+41
-45
lines changed

_layouts/about.liquid

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -15,48 +15,46 @@ layout: default
1515
</header>
1616

1717
<article>
18-
<div
19-
class="profile-container"
20-
style="{% if page.profile.align == 'right' %}float: right; margin-left: 20px;{% else %}float: left; margin-right: 20px;{% endif %} max-width: 30%;"
21-
>
22-
{% if page.profile %}
23-
<div class="profile">
24-
{% if page.profile.image %}
25-
{% assign profile_image_path = page.profile.image | prepend: 'assets/img/' %}
26-
{% if page.profile.image_circular %}
27-
{% assign profile_image_class = 'img-fluid z-depth-1 rounded-circle' %}
28-
{% else %}
29-
{% assign profile_image_class = 'img-fluid z-depth-1 rounded' %}
30-
{% endif %}
31-
{% capture sizes %}(min-width: {{site.max_width}}) {{ site.max_width | minus: 30 | times: 0.3}}px, (min-width: 576px) 30vw, 95vw"{% endcapture %}
32-
{%
33-
include figure.liquid loading="eager" path=profile_image_path class=profile_image_class sizes=sizes alt=page.profile.image
34-
cache_bust=true
35-
%}
36-
{% endif %}
37-
{% if page.profile.more_info %}
38-
<div class="more-info">{{ page.profile.more_info }}</div>
18+
{% if page.profile %}
19+
<div class="profile float-{% if page.profile.align == 'left' %}left{% else %}right{% endif %}">
20+
{% if page.profile.image %}
21+
{% assign profile_image_path = page.profile.image | prepend: 'assets/img/' %}
22+
{% if page.profile.image_circular %}
23+
{% assign profile_image_class = 'img-fluid z-depth-1 rounded-circle' %}
24+
{% else %}
25+
{% assign profile_image_class = 'img-fluid z-depth-1 rounded' %}
3926
{% endif %}
40-
</div>
41-
{% endif %}
27+
{% capture sizes %}(min-width: {{ site.max_width }}) {{ site.max_width | minus: 30 | times: 0.3}}px, (min-width: 576px) 30vw, 95vw"{% endcapture %}
28+
{%
29+
include figure.liquid loading="eager" path=profile_image_path class=profile_image_class sizes=sizes alt=page.profile.image
30+
cache_bust=true
31+
%}
32+
{% endif %}
33+
{% if page.profile.more_info %}
34+
<div class="more-info">{{ page.profile.more_info }}</div>
35+
{% endif %}
4236

43-
<!-- GIF placed below profile picture, aligned to the same side -->
44-
{% if page.header_gif and page.header_gif.enable %}
45-
<div class="gif-container" style="margin-top: 20px; margin-bottom: 20px; width: 100%;">
46-
<img
47-
src="{{ page.header_gif.file | prepend: '/assets/img/' | relative_url }}"
48-
alt="{{ page.header_gif.alt }}"
49-
class="img-fluid z-depth-1"
50-
style="width: 100%;"
51-
>
52-
{% if page.header_gif.caption %}
53-
<div class="caption" style="text-align: center; margin-top: 10px; font-style: italic; color: #6c757d; font-size: 0.9em;">
54-
{{ page.header_gif.caption }}
55-
</div>
56-
{% endif %}
57-
</div>
58-
{% endif %}
59-
</div>
37+
<!-- Move GIF inside profile div to place it below profile picture -->
38+
{% if page.header_gif and page.header_gif.enable %}
39+
<div class="gif-container" style="margin-left: 50px; margin-top: 20px; margin-bottom: 20px; width: 100%;">
40+
<img
41+
src="{{ page.header_gif.file | prepend: '/assets/img/' | relative_url }}"
42+
alt="{{ page.header_gif.alt }}"
43+
class="img-fluid z-depth-1"
44+
style="width: 60%;"
45+
>
46+
{% if page.header_gif.caption %}
47+
<div
48+
class="caption"
49+
style="margin-left: -120px;text-align: center; margin-top: 10px; font-style: italic; color: #6c757d; font-size: 0.9em;"
50+
>
51+
{{ page.header_gif.caption }}
52+
</div>
53+
{% endif %}
54+
</div>
55+
{% endif %}
56+
</div>
57+
{% endif %}
6058

6159
<div class="clearfix">{{ content }}</div>
6260

_pages/about.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ profile:
1111
header_gif:
1212
enable: true
1313
file: mybrain.gif
14-
alt: "Description of your GIF"
15-
caption: "Visualizing of the my brain model"
16-
width: "100px"
17-
news: true
18-
selected_papers: true
14+
caption: "my brain "
15+
news: false
16+
selected_papers: false
1917
social: true
2018
---
2119

0 commit comments

Comments
 (0)