2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-04-27 21:26:43 +00:00

Merge pull request #3 from SchrodingersGat/master

Use the {{ base_url }} template variable
This commit is contained in:
Oliver 2020-09-21 23:23:16 +10:00 committed by GitHub
commit 81dbc9194c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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