The big shortcode cleanup
This commit is contained in:
@ -1,35 +1,38 @@
|
||||
{%- set image_classes = [] -%}
|
||||
{%- if full -%}
|
||||
{%- set image_classes = image_classes | concat(with="full") -%}
|
||||
{%- endif -%}
|
||||
{%- if full_bleed -%}
|
||||
{%- set image_classes = image_classes | concat(with="full-bleed") -%}
|
||||
{%- endif -%}
|
||||
{%- if start -%}
|
||||
{%- set image_classes = image_classes | concat(with="start") -%}
|
||||
{%- endif -%}
|
||||
{%- if end -%}
|
||||
{%- set image_classes = image_classes | concat(with="end") -%}
|
||||
{%- endif -%}
|
||||
{%- if pixels -%}
|
||||
{%- set image_classes = image_classes | concat(with="pixels") -%}
|
||||
{%- endif -%}
|
||||
{%- if transparent -%}
|
||||
{%- set image_classes = image_classes | concat(with="transparent") -%}
|
||||
{%- endif -%}
|
||||
{%- if no_hover -%}
|
||||
{%- set image_classes = image_classes | concat(with="no-hover") -%}
|
||||
{%- endif -%}
|
||||
{%- if spoiler -%}
|
||||
{%- set image_classes = image_classes | concat(with="spoiler") -%}
|
||||
{%- endif -%}
|
||||
{%- if spoiler and solid -%}
|
||||
{%- set image_classes = image_classes | concat(with="solid") -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- set image_classes = image_classes | join(sep=" ") -%}
|
||||
|
||||
{%- if url_min -%}
|
||||
<a href="{{ url }}">
|
||||
<img class="
|
||||
{% if full %}full{% endif %}
|
||||
{% if full_bleed %}full-bleed{% endif %}
|
||||
{% if start %}start{% endif %}
|
||||
{% if end %}end{% endif %}
|
||||
{% if pixels %}pixels{% endif %}
|
||||
{% if transparent %}transparent{% endif %}
|
||||
{% if no_hover %}no-hover{% endif %}
|
||||
{% if spoiler %}spoiler{% endif %}
|
||||
{% if spoiler and solid %}solid{% endif %}
|
||||
"
|
||||
{%- if alt -%}alt="{{ alt }}"{%- endif -%}
|
||||
src="{{ url_min }}"
|
||||
{%- if config.markdown.lazy_async_image -%}decoding="async" loading="lazy"{%- endif -%}
|
||||
/>
|
||||
<img class="{{ image_classes }}" {%- if alt -%}alt="{{ alt }}"{%- endif -%} src="{{ url_min }}" {%- if config.markdown.lazy_async_image -%}decoding="async" loading="lazy"{%- endif -%} />
|
||||
</a>
|
||||
{%- else -%}
|
||||
<img class="
|
||||
{% if full %}full{% endif %}
|
||||
{% if full_bleed %}full-bleed{% endif %}
|
||||
{% if start %}start{% endif %}
|
||||
{% if end %}end{% endif %}
|
||||
{% if pixels %}pixels{% endif %}
|
||||
{% if transparent %}transparent{% endif %}
|
||||
{% if no_hover %}no-hover{% endif %}
|
||||
{% if spoiler %}spoiler{% endif %}
|
||||
{% if spoiler and solid %}solid{% endif %}
|
||||
"
|
||||
{%- if alt -%}alt="{{ alt }}"{%- endif -%}
|
||||
src="{{ url }}"
|
||||
{%- if config.markdown.lazy_async_image -%}decoding="async" loading="lazy"{%- endif -%}
|
||||
/>
|
||||
<img class="{{ image_classes }}" {%- if alt -%}alt="{{ alt }}"{%- endif -%} src="{{ url }}" {%- if config.markdown.lazy_async_image -%}decoding="async" loading="lazy"{%- endif -%} />
|
||||
{%- endif -%}
|
||||
|
Reference in New Issue
Block a user