Skip to content

Commit

Permalink
update def figure widths
Browse files Browse the repository at this point in the history
  • Loading branch information
treangen authored Sep 4, 2024
1 parent df70217 commit a2027a8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,11 @@ external_links:
imagemagick:
enabled: true # enables responsive images for your site (recommended, see https://github.com/alshedivat/al-folio/issues/537)
widths:
- 50
- 240
- 480
- 800
- 1400
input_directories:
- assets/img/
input_formats:
Expand Down
6 changes: 5 additions & 1 deletion _includes/figure.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
<source
class="responsive-img-srcset"
srcset="{% for i in site.imagemagick.widths %}{{ img_path | relative_url }}-{{ i }}.webp {{i}}w,{% endfor %}"
sizes="95vw"
{% if include.sizes %}
sizes="{{include.sizes}}"
{% else %}
sizes="95vw"
{% endif %}
type="image/webp"
>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion _includes/projects.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
include figure.liquid
loading="eager"
path=project.img
sizes = "150px"
sizes = "50px"
alt="project thumbnail"
class="card-img-top"
%}
Expand Down

0 comments on commit a2027a8

Please sign in to comment.