mirror of
				https://github.com/inventree/inventree-website.git
				synced 2025-10-30 21:15:48 +00:00 
			
		
		
		
	Adds gallery / carousel for app images
This commit is contained in:
		
							
								
								
									
										26
									
								
								_includes/app_carousel.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								_includes/app_carousel.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| <section id='image-carousel' class='splide'> | ||||
|     <div class='splide__track'> | ||||
|         <ul class='splide__list' style='list-style-type: none; list-style: none;'> | ||||
|         {% for image in site.static_files %} | ||||
|             {% if image.path contains 'appgallery/' %} | ||||
|             <li class='splide__slide'> | ||||
|                 <img src="{{ image.path | relative_url }}" alt="" /> | ||||
|             </li> | ||||
|             {% endif %} | ||||
|         {% endfor %} | ||||
|         </ul> | ||||
|     </div> | ||||
| </section> | ||||
|  | ||||
| <script> | ||||
| document.addEventListener( 'DOMContentLoaded', function () { | ||||
|     new Splide('#image-carousel', { | ||||
|         type: 'loop', | ||||
|         perPage: 3, | ||||
|         autoPlay: true, | ||||
|         pagination: false, | ||||
|         // pagination: false, | ||||
|         // focus: 'center', | ||||
|     }).mount(); | ||||
| }); | ||||
| </script> | ||||
		Reference in New Issue
	
	Block a user