mirror of
https://github.com/welpo/tabi.git
synced 2026-04-25 09:27:20 +02:00
Docs + fixes
This commit is contained in:
parent
c1840dfd36
commit
48afab90e3
5 changed files with 31 additions and 11 deletions
|
|
@ -19,6 +19,12 @@
|
|||
data-tags="{% for tax_name, terms in page.taxonomies %}{% for term in terms | unique %}{{ term | lower }}{% if not loop.last %},{% endif %}{% endfor %}{% endfor %}"
|
||||
{% 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_dark and not page.extra.local_image %}
|
||||
{{ throw(message="ERROR: `local_image_dark` requires `local_image` to be set in " ~ page.path) }}
|
||||
{% endif %}
|
||||
{% if page.extra.remote_image_dark and not page.extra.remote_image %}
|
||||
{{ throw(message="ERROR: `remote_image_dark` requires `remote_image` to be set in " ~ page.path) }}
|
||||
{% endif %}
|
||||
{% if page.extra.local_image %}
|
||||
{% if page.extra.local_image_dark %}
|
||||
{# Show light image only in light mode, dark image only in dark mode #}
|
||||
|
|
@ -43,8 +49,8 @@
|
|||
alt="{{ page.extra.remote_image_dark }}"
|
||||
src="{{ page.extra.remote_image_dark }}">
|
||||
{% endif %}
|
||||
{% set meta = get_image_metadata(path=page.extra.remote_image_dark, allow_missing=true) %}
|
||||
<img class="{{ card_image_class }}{% if page.extra.local_image_dark %} img-light{% endif %}"
|
||||
{% set meta = get_image_metadata(path=page.extra.remote_image, allow_missing=true) %}
|
||||
<img class="{{ card_image_class }}{% if page.extra.remote_image_dark %} img-light{% endif %}"
|
||||
alt="{{ page.extra.remote_image }}"
|
||||
src="{{ page.extra.remote_image }}">
|
||||
{% else %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue