✨ feat(shortcodes): add inline option to image shortcodes (#315)
This commit is contained in:
@@ -16,11 +16,17 @@
|
||||
{%- endif -%}
|
||||
|
||||
{%- set lazy_loading = lazy_loading | default(value=true) -%}
|
||||
{%- set inline = inline | default(value=false) -%}
|
||||
|
||||
{%- set class_list = "invertible-image" -%}
|
||||
{%- if inline -%}
|
||||
{%- set class_list = class_list ~ " inline" -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if full_width -%}
|
||||
<div class="full-width">
|
||||
{%- endif -%}
|
||||
<img class="invertible-image" src="{{ image_url }}"{% if lazy_loading %} loading="lazy"{% endif %}{% if alt %} alt="{{ alt }}"{% endif %}{% if meta.width %} width="{{ meta.width }}"{% endif %}{% if meta.height %} height="{{ meta.height }}" {% endif %}/>
|
||||
<img class="{{ class_list }}" src="{{ image_url }}"{% if lazy_loading %} loading="lazy"{% endif %}{% if alt %} alt="{{ alt }}"{% endif %}{% if meta.width %} width="{{ meta.width }}"{% endif %}{% if meta.height %} height="{{ meta.height }}" {% endif %}/>
|
||||
{%- if full_width -%}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
Reference in New Issue
Block a user