mirror of
https://github.com/inventree/inventree-docs.git
synced 2025-04-28 05:36:46 +00:00
Custom code for assets directory
- If deployed on READTHEDOCS, prefix some extra stuffs
This commit is contained in:
parent
471a4c83f4
commit
edbc2cc01e
@ -1,11 +1,17 @@
|
|||||||
|
{% if READTHEDOCS %}
|
||||||
|
{% set assets = '/en/latest/assets' %}
|
||||||
|
{% else %}
|
||||||
|
{% set assets = '/assets' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<figure class='image'>
|
<figure class='image'>
|
||||||
{% if id %}
|
{% if id %}
|
||||||
<!-- The link that, when clicked, will display the image in full screen -->
|
<!-- The link that, when clicked, will display the image in full screen -->
|
||||||
<a href="#{{ id }}">
|
<a href="#{{ id }}">
|
||||||
{% elif url %}
|
{% elif url %}
|
||||||
<a href="/assets/images/{{ url }}">
|
<a href="{{ assets }}/images/{{ url }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<img class='img-inline' src='/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 or maxheight %}style='
|
||||||
{% if maxwidth %} max-width:{{ maxwidth }};{% endif %}
|
{% if maxwidth %} max-width:{{ maxwidth }};{% endif %}
|
||||||
{% if maxheight %} max-height: {{ maxheight }};{% endif %}
|
{% if maxheight %} max-height: {{ maxheight }};{% endif %}
|
||||||
@ -18,7 +24,7 @@
|
|||||||
{% if id %}
|
{% if id %}
|
||||||
<!-- The full screen image, hidden by default -->
|
<!-- The full screen image, hidden by default -->
|
||||||
<a href="#_" class="overlay" id="{{ id }}">
|
<a href="#_" class="overlay" id="{{ id }}">
|
||||||
<img src="/assets/images/{{ url }}" alt="{{ description }}" />
|
<img src="{{ assets }}/images/{{ url }}" alt="{{ description }}" />
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</figure>
|
</figure>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user