Original images are no longer deployed

This commit is contained in:
Melissa LeBlanc-Williams 2022-10-06 11:33:29 -07:00
parent 37f851b3b1
commit d02d59257d
3 changed files with 3 additions and 22 deletions

View file

@ -62,3 +62,4 @@ exclude:
- template.md
- Rakefile
- .idea
- assets/images/boards/original

View file

@ -1,15 +1,5 @@
{% for static_file in site.static_files %}
{% assign small_image = "/assets/images/boards/small/" | append: include.board_image %}
{% if static_file.path == small_image %}
{% assign has_responsive_images = true %}
{% endif %}
{% endfor %}
{% if has_responsive_images %}
<img srcset="{{ small_image | relative_url }} 300w,
{{ "/assets/images/boards/large/" | append: include.board_image | relative_url }} 700w"
sizes="(max-width: 1024px) 700px,
300px"
src="{{ "/assets/images/boards/original/" | append: include.board_image | relative_url }}" alt="Image of Board" loading="lazy">
{% else %}
<img src="{{ "/assets/images/boards/original/" | append: include.board_image | relative_url }}" alt="Image of Board" loading="lazy">
{% endif %}
src="{{ "/assets/images/boards/large/" | append: include.board_image | relative_url }}" alt="Image of Board" loading="lazy">

View file

@ -8,17 +8,7 @@ layout: default
<div class="download-section">
<div class="details">
<div class="section">
{% for static_file in site.static_files %}
{% assign large_image = "/assets/images/boards/large/" | append: page.board_image %}
{% if static_file.path == large_image %}
{% assign has_responsive_images = true %}
{% endif %}
{% endfor %}
{% if has_responsive_images %}
<img src="{{ large_image | relative_url }}" alt="Image of Board">
{% else %}
<img src="{{ "/assets/images/boards/original/" | append: page.board_image | relative_url }}" alt="Image of Board">
{% endif %}
<p>
{{ content }}
</p>