2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-06-15 03:35:35 +00:00

Add image carousel to front page

This commit is contained in:
Oliver
2021-08-03 00:03:18 +10:00
parent f709084777
commit d7ab4f2420
18 changed files with 67 additions and 25 deletions

View File

@ -1,3 +1,15 @@
<div class='item'>
<img src='{{ src }}' alt='{{ alt }}' style='width: 100%'>
{% if 'readthedocs.org' in config.docs_dir %}
{% set assets = '/en/latest/assets' %}
{% else %}
{% set assets = '/assets' %}
{% endif %}
{% if 'http' in src %}
{% set img_url = src %}
{% else %}
{% set img_url = assets + '/images/' + src %}
{% endif %}
<div class='item{% if active %} active{% endif %}'>
<img src='{{ img_url }}' alt='{{ alt }}' style='width: 100%'>
</div>