From 0865ba012bbd525ec2f14a64bf9541c59f88619a Mon Sep 17 00:00:00 2001 From: poolitzer Date: Thu, 1 Jan 2026 23:54:22 +0100 Subject: [PATCH] Also support remote_image_dark --- templates/macros/list_posts.html | 13 +++++++++---- templates/partials/cards_pages.html | 10 +++++++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/templates/macros/list_posts.html b/templates/macros/list_posts.html index 0de34be7..ae7584a0 100644 --- a/templates/macros/list_posts.html +++ b/templates/macros/list_posts.html @@ -97,6 +97,7 @@ {% if post.extra.local_image or post.extra.remote_image %}
  • + {% if post.extra.local_image %} {% if post.extra.local_image_dark %} {# Show light image only in light mode, dark image only in dark mode #} @@ -114,13 +115,17 @@ {% if meta.width %}width="{{ meta.width }}"{% endif %} {% if meta.height %}height="{{ meta.height }}"{% endif %}> {% elif post.extra.remote_image %} - {{ post.extra.remote_image_dark }} + {% endif %} + {{ post.extra.remote_image }} {% endif %} - -
  • - {% endif %} {% if post.draft %}
  • {{ macros_translate::translate(key="draft", default="DRAFT", language_strings=language_strings) }}
  • diff --git a/templates/partials/cards_pages.html b/templates/partials/cards_pages.html index c03a7d98..246a5e25 100644 --- a/templates/partials/cards_pages.html +++ b/templates/partials/cards_pages.html @@ -36,7 +36,15 @@ {% if meta.width %}width="{{ meta.width }}"{% endif %} {% if meta.height %}height="{{ meta.height }}"{% endif %}> {% elif page.extra.remote_image %} - {{ page.extra.remote_image_dark }} + {% endif %} + {% set meta = get_image_metadata(path=page.extra.remote_image_dark, allow_missing=true) %} + {{ page.extra.remote_image }} {% else %}