✨ feat: add option to invert images in project cards (#600)
This commit is contained in:
@@ -18,15 +18,16 @@
|
|||||||
{% if page.taxonomies %}
|
{% if page.taxonomies %}
|
||||||
data-tags="{% for tax_name, terms in page.taxonomies %}{% for term in terms | unique %}{{ term | lower }}{% if not loop.last %},{% endif %}{% endfor %}{% endfor %}"
|
data-tags="{% for tax_name, terms in page.taxonomies %}{% for term in terms | unique %}{{ term | lower }}{% if not loop.last %},{% endif %}{% endfor %}{% endfor %}"
|
||||||
{% endif %}>
|
{% endif %}>
|
||||||
|
{% if page.extra.invertible_image %}{% set card_image_class = "card-image invertible-image" %}{% else %}{% set card_image_class = "card-image" %}{% endif %}
|
||||||
{% if page.extra.local_image %}
|
{% if page.extra.local_image %}
|
||||||
{% set meta = get_image_metadata(path=page.extra.local_image, allow_missing=true) %}
|
{% set meta = get_image_metadata(path=page.extra.local_image, allow_missing=true) %}
|
||||||
<img class="card-image"
|
<img class="{{ card_image_class }}"
|
||||||
alt="{{ page.extra.local_image }}"
|
alt="{{ page.extra.local_image }}"
|
||||||
src="{{ get_url(path=page.extra.local_image) }}"
|
src="{{ get_url(path=page.extra.local_image) }}"
|
||||||
{% if meta.width %}width="{{ meta.width }}"{% endif %}
|
{% if meta.width %}width="{{ meta.width }}"{% endif %}
|
||||||
{% if meta.height %}height="{{ meta.height }}"{% endif %}>
|
{% if meta.height %}height="{{ meta.height }}"{% endif %}>
|
||||||
{% elif page.extra.remote_image %}
|
{% elif page.extra.remote_image %}
|
||||||
<img class="card-image"
|
<img class="{{ card_image_class }}"
|
||||||
alt="{{ page.extra.remote_image }}"
|
alt="{{ page.extra.remote_image }}"
|
||||||
src="{{ page.extra.remote_image }}">
|
src="{{ page.extra.remote_image }}">
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|||||||
Reference in New Issue
Block a user