2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-04-28 05:36:46 +00:00

Revert "Try config.site_url from macro context to serve images"

This commit is contained in:
Oliver 2020-09-22 13:05:56 +10:00 committed by GitHub
parent 6b4eadade7
commit 8db46b8e2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,11 +1,13 @@
{% set assets = '/en/latest/assets' %}
<figure class='image'>
{% if id %}
<!-- The link that, when clicked, will display the image in full screen -->
<a href="#{{ id }}">
{% elif url %}
<a href="{{ config.site_url }}assets/images/{{ url }}">
<a href="{{ assets }}/images/{{ url }}">
{% endif %}
<img class='img-inline' src='{{ config.site_url }}assets/images/{{ url }}' alt='{{ description }}' title='{{ description }}'
<img class='img-inline' src='{{ assets }}/images/{{ url }}' alt='{{ description }}' title='{{ description }}'
{% if maxwidth or maxheight %}style='
{% if maxwidth %} max-width:{{ maxwidth }};{% endif %}
{% if maxheight %} max-height: {{ maxheight }};{% endif %}
@ -18,7 +20,7 @@
{% if id %}
<!-- The full screen image, hidden by default -->
<a href="#_" class="overlay" id="{{ id }}">
<img src="{{ config.site_url }}assets/images/{{ url }}" alt="{{ description }}" />
<img src="{{ assets }}/images/{{ url }}" alt="{{ description }}" />
</a>
{% endif %}
</figure>