2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-06-12 02:05:29 +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

@ -2,11 +2,11 @@
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<a class="left carousel-control" href="#image-carousel" data-slide="prev">
<span class="fas fa-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<a class="right carousel-control" href="#image-carousel" data-slide="next">
<span class="fas fa-chevron-right"></span>
<span class="sr-only">Next</span>
</a>

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>

View File

@ -11,18 +11,4 @@
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="la.jpg" alt="Los Angeles" style="width:100%;">
</div>
<div class="item">
<img src="chicago.jpg" alt="Chicago" style="width:100%;">
</div>
<div class="item">
<img src="ny.jpg" alt="New york" style="width:100%;">
</div>
</div>

View File

@ -0,0 +1,49 @@
{% with image_count=11 %}
{% include "carousel_start.html" %}
{% endwith %}
{% with src="index/part_category.png", alt="Part Categories", active=True %}
{% include "carousel_img.html" %}
{% endwith %}
{% with src="index/part_stock.png", alt="Part Stock" %}
{% include "carousel_img.html" %}
{% endwith %}
{% with src="index/part_suppliers.png", alt="Part Suppliers" %}
{% include "carousel_img.html" %}
{% endwith %}
{% with src="index/stock_item.png", alt="Stock Item" %}
{% include "carousel_img.html" %}
{% endwith %}
{% with src="index/stock_location.png", alt="Stock Location" %}
{% include "carousel_img.html" %}
{% endwith %}
{% with src="index/stock_location_2.png", alt="Stock Location" %}
{% include "carousel_img.html" %}
{% endwith %}
{% with src="index/suppliers.png", alt="Suppliers" %}
{% include "carousel_img.html" %}
{% endwith %}
{% with src="index/part_admin.png", alt="Admin Interface" %}
{% include "carousel_img.html" %}
{% endwith %}
{% with src="index/category_params.png", alt="Part Parameters" %}
{% include "carousel_img.html" %}
{% endwith %}
{% with src="index/build_outputs.png", alt="Build Orders" %}
{% include "carousel_img.html" %}
{% endwith %}
{% with src="index/bom_add_item.png", alt="Bill of Materials" %}
{% include "carousel_img.html" %}
{% endwith %}
{% include "carousel_end.html" %}