forked from rDrama/rDrama
1
0
Fork 0

fix some broken images

master
Aevann 2023-08-18 23:33:29 +03:00
parent 9f30662bb0
commit fad062cea4
4 changed files with 6 additions and 6 deletions

View File

@ -44,7 +44,7 @@
{%- if not v and os_path.exists(path ~ "/cached.webp") -%} {%- if not v and os_path.exists(path ~ "/cached.webp") -%}
{% set banner_url = 'cached.webp' | asset_siteimg %} {% set banner_url = 'cached.webp' | asset_siteimg %}
{% elif os_path.exists(path ~ "/banners") -%} {% elif os_path.exists(path ~ "/banners") -%}
{% set banner_url = SITE_FULL_IMAGES ~ macros.random_image("assets/images/" ~ SITE_NAME ~ "/banners") %} {% set banner_url = macros.random_image("assets/images/" ~ SITE_NAME ~ "/banners") %}
{% else -%} {% else -%}
{% set banner_url = 'banner.webp' | asset_siteimg %} {% set banner_url = 'banner.webp' | asset_siteimg %}
{% endif %} {% endif %}

View File

@ -11,12 +11,12 @@
{%- elif v -%} {%- elif v -%}
{%- set image = macros.random_image("assets/images/" ~ SITE_NAME ~ "/sidebar") -%} {%- set image = macros.random_image("assets/images/" ~ SITE_NAME ~ "/sidebar") -%}
{%- else -%} {%- else -%}
{%- set image = '/i/' ~ SITE_NAME ~ '/sidebar.webp?x=6' -%} {%- set image = SITE_FULL_IMAGES ~ '/i/' ~ SITE_NAME ~ '/sidebar.webp?x=6' -%}
{%- endif -%} {%- endif -%}
{% if request.path != '/sidebar' %} {% if request.path != '/sidebar' %}
<a href="{{image}}"> <a href="{{image}}">
<img class="mb-4 sidebar-img" alt="sidebar image" data-nonce="{{g.nonce}}" data-onclick="expandImage()" loading="lazy" src="{{SITE_FULL_IMAGES}}{{image}}"> <img class="mb-4 sidebar-img" alt="sidebar image" data-nonce="{{g.nonce}}" data-onclick="expandImage()" loading="lazy" src="{{image}}">
</a> </a>
{% endif %} {% endif %}

View File

@ -21,7 +21,7 @@
</a> </a>
{% elif not (sub and sub.name == 'chudrama' and v and not v.can_see_chudrama) %} {% elif not (sub and sub.name == 'chudrama' and v and not v.can_see_chudrama) %}
<a href="{{image}}"> <a href="{{image}}">
<img class="mb-4 sidebar-img" alt="sidebar image" data-nonce="{{g.nonce}}" data-onclick="expandImage()" loading="lazy" src="{{SITE_FULL_IMAGES}}{{image}}"> <img class="mb-4 sidebar-img" alt="sidebar image" data-nonce="{{g.nonce}}" data-onclick="expandImage()" loading="lazy" src="{{image}}">
</a> </a>
{% endif %} {% endif %}
{% endif %} {% endif %}

View File

@ -5,7 +5,7 @@
{%- endmacro -%} {%- endmacro -%}
{%- macro random_image(path) -%} {%- macro random_image(path) -%}
{{- "/" ~ path ~ "/" ~ listdir('files/' ~ path)|random() ~ '?x=6' -}} {{- SITE_FULL_IMAGES ~ "/" ~ path ~ "/" ~ listdir('files/' ~ path)|random() ~ '?x=6' -}}
{%- endmacro -%} {%- endmacro -%}
{% macro post_meta(p) %} {% macro post_meta(p) %}