chore: cleanup + organize

This commit is contained in:
Cory Dransfeldt 2024-05-19 14:40:22 -07:00
parent ac9a617fcd
commit 1852951f24
No known key found for this signature in database
21 changed files with 38 additions and 75 deletions

View file

@ -1,30 +0,0 @@
{% if data.size > 0 %}
{% assign media = data | normalizeMedia %}
<div class="media-grid {% if shape == 'square' %}square{% else %}vertical{% endif %}">
{% for item in media limit: count %}
{% assign alt = item.alt | strip | escape %}
<a href="{{ item.url | stripUtm }}" title="{{ alt }}">
<div class="item-wrapper shadow">
<div class="meta-text">
{% if item.title %}
<div class="header">{{ item.title }}</div>
{% endif %}
{% if item.subtext %}
<div class="subheader">
{{ item.subtext }}
</div>
{% endif %}
</div>
{%- capture loadingStrategy -%}
{%- if loading -%}{{ loading }}{%- else -%}lazy{%- endif -%}
{%- endcapture -%}
{% if shape == 'square' %}
<img src="https://coryd.dev/.netlify/images/?url={{ item.image }}&fit=cover&w=240&h=240&fm=webp&q=80"{% if alt %} alt="{{ alt }}"{% endif %} loading="{{ loadingStrategy }}" decoding="async" width="240" height="240" />
{% else %}
<img src="https://coryd.dev/.netlify/images/?url={{ item.image }}&fit=cover&w=200&h=307&fm=webp&q=80"{% if alt %} alt="{{ alt }}"{% endif %} loading="{{ loadingStrategy }}" decoding="async" width="200" height="307" />
{% endif %}
</div>
</a>
{% endfor %}
</div>
{% endif %}