@@ -1,2 +1,8 @@
|
||||
{% set meta = get_image_metadata(path=src, allow_missing=true) %}
|
||||
{% if full_width | default(value=false) %}
|
||||
<div class="full-width">
|
||||
{% endif %}
|
||||
<img class="dimmable-image" src="{{ get_url(path=src) }}" {% if alt %}alt="{{ alt }}" {% endif %} {% if meta.width %}width="{{ meta.width }}" {% endif %} {% if meta.height %}height="{{ meta.height }}" {% endif %}/>
|
||||
{% if full_width | default(value=false) %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@@ -1,4 +1,10 @@
|
||||
{% set light_meta = get_image_metadata(path=light_src, allow_missing=true) %}
|
||||
{% set dark_meta = get_image_metadata(path=dark_src, allow_missing=true) %}
|
||||
{% if full_width | default(value=false) %}
|
||||
<div class="full-width">
|
||||
{% endif %}
|
||||
<img src="{{ get_url(path=light_src) }}" {% if alt %}alt="{{ alt }}" {% endif %} {% if light_meta.width %}width="{{ light_meta.width }}" {% endif %} {% if light_meta.height %}height="{{ light_meta.height }}" {% endif %} class="img-light">
|
||||
<img src="{{ get_url(path=dark_src) }}" {% if alt %}alt="{{ alt }}" {% endif %} {% if dark_meta.width %}width="{{ dark_meta.width }}" {% endif %} {% if dark_meta.height %}height="{{ dark_meta.height }}" {% endif %} class="img-dark">
|
||||
{% if full_width | default(value=false) %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
4
templates/shortcodes/full_width_image.html
Normal file
4
templates/shortcodes/full_width_image.html
Normal file
@@ -0,0 +1,4 @@
|
||||
{% set meta = get_image_metadata(path=src, allow_missing=true) %}
|
||||
<div class="full-width">
|
||||
<img {% if src %}src="{{ get_url(path=src) }}" {% endif %} {% if alt %}alt="{{ alt }}" {% endif %} {% if meta.width %}width="{{ meta.width }}" {% endif %} {% if meta.height %}height="{{ meta.height }}" {% endif %}/>
|
||||
</div>
|
@@ -1,2 +1,8 @@
|
||||
{% set meta = get_image_metadata(path=src, allow_missing=true) %}
|
||||
{% if full_width | default(value=false) %}
|
||||
<div class="full-width">
|
||||
{% endif %}
|
||||
<img class="invertible-image" {% if src %}src="{{ get_url(path=src) }}" {% endif %} {% if alt %}alt="{{ alt }}" {% endif %} {% if meta.width %}width="{{ meta.width }}" {% endif %} {% if meta.height %}height="{{ meta.height }}" {% endif %}/>
|
||||
{% if full_width | default(value=false) %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user