mirror of
https://github.com/welpo/tabi.git
synced 2026-02-16 08:07:19 +01:00
Docs + fixes
This commit is contained in:
parent
c1840dfd36
commit
48afab90e3
5 changed files with 31 additions and 11 deletions
|
|
@ -97,7 +97,12 @@
|
|||
{% if post.extra.local_image or post.extra.remote_image %}
|
||||
<li class="post-thumbnail">
|
||||
<a href="{{ post.permalink }}">
|
||||
|
||||
{% if post.extra.local_image_dark and not post.extra.local_image %}
|
||||
{{ throw(message="ERROR: `local_image_dark` requires `local_image` to be set in " ~ post.path) }}
|
||||
{% endif %}
|
||||
{% if post.extra.remote_image_dark and not post.extra.remote_image %}
|
||||
{{ throw(message="ERROR: `remote_image_dark` requires `remote_image` to be set in " ~ post.path) }}
|
||||
{% endif %}
|
||||
{% if post.extra.local_image %}
|
||||
{% if post.extra.local_image_dark %}
|
||||
{# Show light image only in light mode, dark image only in dark mode #}
|
||||
|
|
@ -109,7 +114,7 @@
|
|||
{% if meta_dark.height %}height="{{ meta_dark.height }}"{% endif %}>
|
||||
{% endif %}
|
||||
{% set meta = get_image_metadata(path=post.extra.local_image, allow_missing=true) %}
|
||||
<img class="thumbnail-image{% if page.extra.local_image_dark %} img-light{% endif %}"
|
||||
<img class="thumbnail-image{% if post.extra.local_image_dark %} img-light{% endif %}"
|
||||
alt="{{ post.extra.local_image }}"
|
||||
src="{{ get_url(path=post.extra.local_image) }}"
|
||||
{% if meta.width %}width="{{ meta.width }}"{% endif %}
|
||||
|
|
@ -122,11 +127,13 @@
|
|||
alt="{{ post.extra.remote_image_dark }}"
|
||||
src="{{ get_url(path=post.extra.remote_image_dark) }}">
|
||||
{% endif %}
|
||||
<img class="thumbnail-image{% if page.extra.remote_image_dark %} img-light{% endif %}"
|
||||
<img class="thumbnail-image{% if post.extra.remote_image_dark %} img-light{% endif %}"
|
||||
alt="{{ post.extra.remote_image }}"
|
||||
src="{{ post.extra.remote_image }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if post.draft %}
|
||||
<li class="draft-label">{{ macros_translate::translate(key="draft", default="DRAFT", language_strings=language_strings) }}</li>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue